Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 31 lines (22 sloc) 0.783 kb
89cb809 Short-circuit evaluation of ? : operator for varying tests.
Matt Pharr authored
1
2 export uniform int width() { return programCount; }
3
4 uniform double one = 1;
5
6 void copy(uniform double dst[], uniform double src[], uniform int count) {
7 foreach (i = 0 ... count)
8 dst[i] = one * src[i];
9 }
10
11 export void f_f(uniform float RET[], uniform float aFOO[]) {
12 uniform int count = 200 + aFOO[1];
13 uniform double * uniform src = uniform new uniform double[count];
14 for (uniform int i = 0; i < count; ++i)
15 src[i] = i;
16
17 uniform double * uniform dst = uniform new uniform double[count];
18 copy(dst, src, count);
19
20 uniform int errors = 0;
21 for (uniform int i = 0; i < count; ++i)
22 if (dst[i] != src[i])
23 ++errors;
24
25 RET[programIndex] = errors;
26 }
27
28 export void result(uniform float RET[]) {
29 RET[programIndex] = 0;
30 }
Something went wrong with that request. Please try again.