>I guess you need "foreach_unique": http://ispc.github.io/ispc.html#iteration-over-unique-elements-foreach-unique
Nice! Thank you. On Sunday, September 25, 2016 at 10:49:21 AM UTC-7, Dmitry Babokin wrote: > > I guess you need "foreach_unique": > http://ispc.github.io/ispc.html#iteration-over-unique-elements-foreach-unique > > On Sun, Sep 25, 2016 at 5:54 PM, Morten Mikkelsen <[email protected] > <javascript:>> wrote: > >> So I have a scenario where I am tracing through a tree structure and the >> odds of hitting the same node is very significant due to how bundling was >> done. >> At the end as each simd lane has decided on a non uniform leaf node it >> wishes to visit I would like to iterate over all unique pointers across the >> simd and visit each one as a uniform pointer. And of course in a way >> that'll work with all possible simd widths (4, 8 and 16). What is a good >> way to do this in ispc? >> >> Just to be clear in my foreach() I have a higher value such as 64 in my >> case. Ideally I'd only want for it to serialize within the scope of the >> underlying simd width (4 for SSE and 8 for AVX etc) but I imagine >> there's no way to do this since uniform as a syntax applies to all 64 in >> this case. >> >> Just to try and make this more clear imagine SSE4 scenario and each lane >> .XYZW has a chosen index 2,1,2,5. >> The unique entries are then 1,2,5. And I wish to extract each unique >> entry as a uniform and use it. >> >> -- >> 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 [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
