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

37 lines
775 B
Plaintext

#include "../test_static.isph"
uniform float Neg(uniform float inVal) {
return -inVal;
}
void test_uni(uniform float RET[]) {
uniform float val;
unsigned int signBit;
uniform float retval;
RET[programIndex] = 0;
val = 0.0;
signBit = signbits(val);
if (signBit != 0)
RET[programIndex] = 1;
retval = Neg(val);
signBit = signbits(retval);
if (signBit == 0)
RET[programIndex] = 1;
val = -0.0;
signBit = signbits(val);
if (signBit == 0)
RET[programIndex] = 1;
retval = Neg(val);
signBit = signbits(retval);
if (signBit != 0)
RET[programIndex] = 1;
}
task void f_v(uniform float RET[]) {
test_uni(RET);
}
task void result(uniform float RET[]) { RET[programIndex] = 0; }