File: max-uint-1.ispc

package info (click to toggle)
ispc 1.28.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 97,620 kB
  • sloc: cpp: 77,067; python: 8,303; yacc: 3,337; lex: 1,126; ansic: 631; sh: 475; makefile: 17
file content (14 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "test_static.isph"
task void f_fu(uniform float r[], uniform float a[], uniform float b) {
    #pragma ignore warning(perf)
    unsigned int i = (unsigned int)a[programIndex];
    #pragma ignore warning(perf)
    r[programIndex] = max((unsigned int)2, i);
    r[programCount-1] = max((unsigned int)10, (unsigned int)b);
}

task void result(uniform float r[]) {
    r[programIndex] = 1+programIndex;
    r[0] = 2;
    r[programCount - 1] = 10;
}