On 25 October 2012 02:01, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
On 24 October 2012 23:46, Manu <turkeyman@gmail.com> wrote: 
> Let's consider your example above for instance, I would rewrite (given
> existing syntax):
>
> // vector length of context = 1; current_mask = T
> int4 v = [0,3,4,1];
> int4 w = 3; // [3,3,3,3] via broadcast
> uint4 m = maskLess(v, w); // [T,F,F,T] (T == ones, F == zeroes)
> v += int4(1); // [1,4,5,2]
>
> // the if block is trivially rewritten:
> int4 trueSide = v + int4(2);
> int4 falseSize = v + int4(3);
> v = select(m, trueSide, falseSide); // [3,7,8,4]
>
>

This should work....

int4 trueSide = v + 2;
int4 falseSide = v + 3;

Probably, just wasn't sure.