On Saturday 06 October 2018 04:03 AM, David wrote:
> Well i experimenting with this tool for a while now, im not really an
> expert.
> All i know (or experienced) PLUTO hates modulo operator. Also wouldn't
> be easier to just:
That's right - modulo operator in conditionals/bounds won't work unless
the modulo gets eliminated / simplified. However, modulo's will usually
be fine in array access functions; most of the stencil code examples
with Pluto are in fact written this way and this is the preferred way to
write them for best performance:
a[i%2][...] = f(a[(i+1)%2] ...
Pluto uses 'pet' to parse and get hold of the statement domains, access
functions initially (which are just isl structures and thus able to
represent mod's div's w.r.t constants precisely), and then does
dependence analysis using isl while passing these structures directly;
finally, the result of these are converted to Pluto's structures
(PlutoProg, PlutoConstraints, etc.). It is this last step that will fail
if the local dimensions introduced due to mod's, div's can't be
eliminated and represented using a "dense" set/relation, which is what
Pluto's PlutoConstraints can represent. One of the reasons that this
wasn't changed is that Pluto still primarily uses cloog-isl/ for code
generation (through its text/file interface), and Cloog's input format
didn't (or still doesn't) allow local variables to be specified in domains.
~ Uday
>
> for(i=0; i<N; i+=2)
> S1();
>
>
> 2018. október 5., péntek 18:35:37 UTC+2 időpontban Daniel Maier a
> következőt írta:
>
> Hi,
>
> I am trying to optimize loops with local dimensions like this:
>
> for(i=0; i<N; i++)
> if(i%2==0)
> S1();
>
> However, I realized that Pluto asserts that there are no local
> dimensions. What is the exact reason for this?
>
> Is there any way around this limitation?
>
> Best regards
> Daniel
>
> --
> You received this message because you are subscribed to the Google
> Groups "Pluto development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
pluto-developm...@googlegroups.com
> <mailto:
pluto-developm...@googlegroups.com>.
> To post to this group, send email to
pluto-de...@googlegroups.com
> <mailto:
pluto-de...@googlegroups.com>.
> Visit this group at
https://groups.google.com/group/pluto-development.
> For more options, visit
https://groups.google.com/d/optout.