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

18 lines
321 B
Plaintext

#include "../test_static.isph"
task void f_f(uniform float RET[], uniform float aFOO[]) {
#ifndef ISPC_HAS_RAND
RET[programIndex] = 1;
#else
float r = -1;
while (!rdrand(&r))
;
RET[programIndex] = (r >= 0 && r < 1);
#endif
}
task void result(uniform float RET[]) {
RET[programIndex] = 1;
}