Add size_t, ptrdiff_t, and [u]intptr_t types.

This commit is contained in:
Matt Pharr
2012-04-11 05:32:53 -07:00
parent 2aa61007c6
commit 70a5348f43
3 changed files with 50 additions and 2 deletions

19
tests/intptr.ispc Normal file
View File

@@ -0,0 +1,19 @@
export uniform int width() { return programCount; }
export void f_v(uniform float RET[]) {
RET[programIndex] = sizeof(uniform intptr_t);
}
export void result(uniform float RET[]) {
RET[programIndex] =
#if (ISPC_POINTER_SIZE==32)
4
#elif (ISPC_POINTER_SIZE==64)
8
#else
#error Unknown pointer size
#endif
;
}