Add memcpy(), memmove() and memset() to the standard library.
Issue #183.
This commit is contained in:
21
tests/memcpy-varying.ispc
Normal file
21
tests/memcpy-varying.ispc
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
int32 *src = new int32[1024];
|
||||
int32 *dst = new int32[1024];
|
||||
|
||||
for (uniform int i = 0; i < 1024; ++i)
|
||||
src[i] = programIndex * 10000 + i;
|
||||
|
||||
if (programIndex == 2)
|
||||
memcpy(dst, src, programCount*sizeof(uniform int));
|
||||
else
|
||||
memcpy(dst, src, programCount*sizeof(uniform int));
|
||||
|
||||
RET[programIndex] = dst[programIndex];
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 10000 * programIndex + programIndex;
|
||||
}
|
||||
Reference in New Issue
Block a user