Support for cache 2/3 and all targets
This commit is contained in:
22
tests/prefetch-varying.ispc
Normal file
22
tests/prefetch-varying.ispc
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
int64 zero = 0;
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
uniform int64 a[programCount];
|
||||
for (uniform int i = 0; i < programCount; ++i)
|
||||
a[i] = aFOO[i];
|
||||
|
||||
int64 *ptr = &(a[programIndex+zero]);
|
||||
prefetch_l1(ptr);
|
||||
prefetch_l2(ptr);
|
||||
prefetch_l3(ptr);
|
||||
prefetch_nt(ptr);
|
||||
int g = *ptr;
|
||||
RET[programIndex] = g;
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 1 + programIndex;
|
||||
}
|
||||
Reference in New Issue
Block a user