Just found extract() .... :)
Seems a lot like the broadcast() one :)




On Saturday, October 15, 2016 at 10:28:53 AM UTC-7, Morten Mikkelsen wrote:
>
> So I have a for-loop along the lines of:
>
> for(int i=programIndex; i<numEntries; i+=programCount)
>
>
> inside this for-loop there's a point where I'd like to update exactly one 
> uniform with a value the last lane has access to. So something along the 
> lines of:
>
> if(programIndex==(programCount-1))
> {
> piData[0] += totNumValue;
> }
>
> here piData is a uniform int piData[] and totNumValue is varying.
> As you can imagine this does not compile so my question is what is the 
> right way to do this with ispc? I guess what I really want is for last 
> lane's copy of totNumValue to be written out as a uniform. I looked at the 
> broadcast intrinsic but it doesn't seem to return a uniform.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ispc-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to