We have it, for example here:
https://github.com/ispc/ispc/blob/master/examples/aobench/ao.ispc#L216

Note, that tiled version is not much different. If you remove "_tiled" it
will work as well.

If you are asking why writing the former version, not the later, it yields
different code sequence. This way you guarantee that outer loops has
uniform control flow and it's really outer loop. With foreach you cannot
guarantee that. Though I think on practice the code should be the same.

Dmitry.

On Fri, May 22, 2020 at 10:44 AM Gabriel Alves Cunha <
gabriel925...@gmail.com> wrote:

> for (int i = 0; i <= isize; ++i)
>         foreach (j = 0 ... jsize, k = 0 ... ksize)
>             if (foo())
>                  *bar();*
>
> foreach (i = 0 ... isize, j = 0 ... jsize, k = 0 ... ksize)
> if (foo())
>                 *bar();*
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ispc-users/b7ebaacf-4a01-4823-b08f-ab9e01d9017b%40googlegroups.com
> <https://groups.google.com/d/msgid/ispc-users/b7ebaacf-4a01-4823-b08f-ab9e01d9017b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ispc-users/CACRFwugr3rVczVJa_r_Mw6Oo-%3Dv70SL4aaqk3pH1EoTzFzM1ng%40mail.gmail.com.

Reply via email to