Add reduce_equal() function to standard library.

This commit is contained in:
Matt Pharr
2011-08-10 15:55:55 -07:00
parent d821a11c7c
commit 8c534d4d74
20 changed files with 313 additions and 0 deletions

15
tests/reduce-equal-9.ispc Normal file
View File

@@ -0,0 +1,15 @@
export uniform int width() { return programCount; }
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
double a = aFOO[programIndex/2];
RET[programIndex] = 1;
uniform bool eq = false;
if (a < 4)
eq = reduce_equal(a);
RET[programIndex] = eq;
}
export void result(uniform float RET[]) {
RET[programIndex] = 0;
}