Initial commit.
This commit is contained in:
19
tests/short-vec-5.ispc
Normal file
19
tests/short-vec-5.ispc
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
typedef int<4> int4;
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_fu(uniform float ret[], uniform float aa[], uniform float b) {
|
||||
float a = aa[programIndex];
|
||||
int4 v0 = { b, 2*b, 3*b, 2 };
|
||||
int4 v1 = { a, 2*a, 3*a, 1 };
|
||||
v0.y /= 2.;
|
||||
if (programIndex & 1)
|
||||
v1[0] += 1;
|
||||
ret[programIndex] = (v0+v1).y + (v0+v1).x;
|
||||
}
|
||||
|
||||
export void result(uniform float ret[]) {
|
||||
ret[programIndex] = 5 + 2 * (programIndex+1) + 5 + (programIndex+1);
|
||||
if (programIndex & 1) ++ret[programIndex];
|
||||
}
|
||||
Reference in New Issue
Block a user