Files
UnrealEngine/Engine/Source/ThirdParty/Intel/ISPC/ispc-1.17.0/tests/half-3.ispc
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

20 lines
419 B
Plaintext

#include "../test_static.isph"
task void f_v(uniform float RET[]) {
int errors = 0;
foreach (i = 0 ... 65535) {
unsigned int16 h = i;
float f = half_to_float(i);
h = float_to_half(f);
int mismatches = (!isnan(f) && i != h);
errors += reduce_add(mismatches);
}
RET[programIndex] = errors;
}
task void result(uniform float RET[]) {
RET[programIndex] = 0;
}