added emulation of "soa" data types via shared-memory
This commit is contained in:
@@ -6,6 +6,17 @@ export uniform int width() { return programCount; }
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
float a = aFOO[programIndex];
|
||||
|
||||
#ifdef __NVPTX__ /* soa is converted to shared memory story for now, use smaller amount to check the test */
|
||||
soa<8> Point pts[4];
|
||||
//CO uniform Point pts[80];
|
||||
foreach (i = 0 ... 40) {
|
||||
pts[i].x = b*i;
|
||||
pts[i].y[0] = 2*b*i;
|
||||
pts[i].y[1] = 2*b*i+1;
|
||||
pts[i].y[2] = 2*b*i+2;
|
||||
pts[i].z = 3*b*i;
|
||||
}
|
||||
#else
|
||||
soa<8> Point pts[10];
|
||||
//CO uniform Point pts[80];
|
||||
foreach (i = 0 ... 80) {
|
||||
@@ -15,6 +26,7 @@ export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
pts[i].y[2] = 2*b*i+2;
|
||||
pts[i].z = 3*b*i;
|
||||
}
|
||||
#endif
|
||||
|
||||
assert(programCount < 80);
|
||||
RET[programIndex] = pts[programIndex].y[2];
|
||||
|
||||
Reference in New Issue
Block a user