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

16 lines
455 B
Plaintext

#include "../test_static.isph"
int foo(uniform float * uniform base, uniform int uOfs, varying int vOfs) {
#pragma ignore warning(perf)
return (base+uOfs)[vOfs];
}
task void f_f(uniform float RET[], uniform float aFOO[]) {
uniform float * uniform ptr = &aFOO[0];
int val = foo(ptr, programCount, programIndex);
RET[programIndex] = val;
}
task void result(uniform float RET[]) {
RET[programIndex] = 1+programCount+programIndex;
}