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