Updated.


On Mon, Jan 13, 2014 at 8:45 AM, Dmitry Babokin <notifications@github.com>wrote:

> In examples/perfbench/perfbench.ispc:
>
> > @@ -104,6 +104,50 @@ export void xyzSumSOA(uniform float array[], uniform int count,
> >      result[2] = reduce_add(zsum);
> >  }
> >
> > +export void xyzSumVarying(varying float array[], uniform int count,
> > +                          uniform float zeros[], uniform float result[]) {
> > +    float xsum = 0, ysum = 0, zsum = 0;
> > +    varying float * uniform ap = array;
> > +    assert(programCount <= 8);
> > +
> > +    for (uniform int i = 0; i < count/3; i += 8) {
>
> If we care about performance, this should be if () { for (){} } else { for
> (){} }.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ispc/ispc/pull/687/files#r8831110>
> .
>