Files
UnrealEngine/Engine/Source/ThirdParty/Intel/ISPC/ispc-1.24.0/tests/2150.ispc
2025-05-18 13:04:45 +08:00

31 lines
620 B
Plaintext

#include "../test_static.isph"
task void f_f(uniform float RET[], uniform float aFOO[]) {
uniform int errorCount1 = 0;
uniform int errorCount2 = 0;
// uniform computation under varying condition should not be executed, as
// none of the lanes compare as "false".
if (aFOO[programIndex] < -1) {
errorCount1++;
}
if (aFOO[programIndex] < -2) {
++errorCount1;
}
if (aFOO[programIndex] < -3) {
errorCount2--;
}
if (aFOO[programIndex] < -4) {
--errorCount2;
}
RET[programIndex] = errorCount1 - errorCount2;
}
task void result(uniform float RET[]) {
RET[programIndex] = 0;
}