Add memcpy(), memmove() and memset() to the standard library.

Issue #183.
This commit is contained in:
Matt Pharr
2012-03-05 16:09:00 -08:00
parent c152ae3c32
commit 3b95452481
9 changed files with 338 additions and 3 deletions

17
tests/memcpy-uniform.ispc Normal file
View File

@@ -0,0 +1,17 @@
export uniform int width() { return programCount; }
export void f_f(uniform float RET[], uniform float aFOO[]) {
int32 * uniform src = uniform new int32[1024];
int32 * uniform dst = uniform new int32[1024];
foreach (i = 0 ... 1024)
src[i] = i;
memcpy(&dst[32], src, (1024-32)*sizeof(uniform int));
RET[programIndex] = dst[64+programIndex];
}
export void result(uniform float RET[]) {
RET[programIndex] = 32 + programIndex;
}