summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/ObjectLibrary/extra.ispc
blob: 5a4a4424990b9fb239771722e44695cab5286c58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

export void extra(uniform float vin[], uniform float vout[],
                   uniform int count) {
    foreach (index = 0 ... count) {
        float v = vin[index];
        if (v < 3.)
            v = v * v;
        else
            v = sqrt(v);
        vout[index] = v;
    }
}