On 25 October 2012 02:01, Iain Buclaw <span dir="ltr"><<a href="mailto:ibuclaw@ubuntu.com" target="_blank">ibuclaw@ubuntu.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 24 October 2012 23:46, Manu <<a href="mailto:turkeyman@gmail.com">turkeyman@gmail.com</a>> wrote: </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">
> Let's consider your example above for instance, I would rewrite (given<br>
> existing syntax):<br>
><br>
> // vector length of context = 1; current_mask = T<br>
> int4 v = [0,3,4,1];<br>
> int4 w = 3; // [3,3,3,3] via broadcast<br>
> uint4 m = maskLess(v, w); // [T,F,F,T] (T == ones, F == zeroes)<br>
> v += int4(1); // [1,4,5,2]<br>
><br>
> // the if block is trivially rewritten:<br>
> int4 trueSide = v + int4(2);<br>
> int4 falseSize = v + int4(3);<br>
> v = select(m, trueSide, falseSide); // [3,7,8,4]<br>
><br>
><br>
<br>
</div></div>This should work....<br>
<br>
int4 trueSide = v + 2;<br>
int4 falseSide = v + 3;<br></blockquote><div><br></div><div>Probably, just wasn't sure.</div></div>