73 lines
2.0 KiB
Plaintext
73 lines
2.0 KiB
Plaintext
#include "../test_static.isph"
|
|
void var_store(uniform int16 a[], varying int16 x) {
|
|
streaming_store(a, x);
|
|
}
|
|
|
|
uniform int var_load(uniform int16 a[], varying int16 x) {
|
|
uniform int ret = 0;
|
|
varying int16 loadval = streaming_load(a);
|
|
if(loadval != x) ret=1;
|
|
return ret;
|
|
}
|
|
|
|
void var_unsigned_store(uniform unsigned int16 a[], varying unsigned int16 x) {
|
|
streaming_store(a, x);
|
|
}
|
|
|
|
uniform int var_unsigned_load(uniform unsigned int16 a[], varying unsigned int16 x) {
|
|
uniform int ret = 0;
|
|
varying unsigned int16 loadval = streaming_load(a);
|
|
if(loadval != x) ret=1;
|
|
return ret;
|
|
}
|
|
|
|
void uni_store(uniform int16 a[], uniform int16 x) {
|
|
streaming_store(a, x);
|
|
}
|
|
|
|
uniform int uni_load(uniform int16 a[], uniform int16 x) {
|
|
uniform int ret = 0;
|
|
uniform int16 loadval = streaming_load_uniform(a);
|
|
if(loadval != x) ret=1;
|
|
return ret;
|
|
}
|
|
|
|
void uni_unsigned_store(uniform unsigned int16 a[], uniform unsigned int16 x) {
|
|
streaming_store(a, x);
|
|
}
|
|
|
|
uniform int uni_unsigned_load(uniform unsigned int16 a[],uniform unsigned int16 x) {
|
|
uniform int ret = 0;
|
|
uniform unsigned int16 loadval = streaming_load_uniform(a);
|
|
if(loadval != x) ret=1;
|
|
return ret;
|
|
}
|
|
|
|
task void f_f(uniform float RET[], uniform float aFOO[]) {
|
|
RET[programIndex] = 0;
|
|
|
|
uniform int16 a_1[programCount];
|
|
int16 x_1 = 1;
|
|
var_store(a_1,x_1);
|
|
if(var_load(a_1,x_1) != 0)RET[programIndex] = 1;
|
|
|
|
uniform unsigned int16 a_2[programCount];
|
|
unsigned int16 x_2 = 2;
|
|
var_unsigned_store(a_2,x_2);
|
|
if(var_unsigned_load(a_2,x_2) != 0)RET[programIndex] = 1;
|
|
|
|
uniform int16 a_3[programCount];
|
|
uniform int16 x_3 = 3;
|
|
uni_store(a_3,x_3);
|
|
if(uni_load(a_3,x_3) != 0)RET[programIndex] = 1;
|
|
|
|
uniform unsigned int16 a_4[programCount];
|
|
uniform unsigned int16 x_4 = 4;
|
|
uni_unsigned_store(a_4,x_4);
|
|
if(uni_unsigned_load(a_4,x_4) != 0)RET[programIndex] = 1;
|
|
}
|
|
|
|
task void result(uniform float RET[]) {
|
|
RET[programIndex] = 0;
|
|
}
|