Files
UnrealEngine/Engine/Source/ThirdParty/Intel/ISPC/ispc-1.19.0/tests/rdrand-2.ispc
2025-05-18 13:04:45 +08: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;
}