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