This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fortran] Support inverted execution masks in WHEREs


On 2/22/06, Roger Sayle <roger@eyesopen.com> wrote:
>         cmask = malloc(...);
>         for (i=0; i<...; i++)
>           cmask[i] = cond(i);
>         for (i=0; i<...; i++)
>           if (cmask[i])
>             stmt1(i);
>         for (i=0; i<...; i++)
>           if (!cmask[i])
>             stmt2(i);
>         free(cmask);

I wonder why we use multiple loops here - at least fusing the last two ones
would be more cache friendly for use of the mask.  Or does fusing the loops
create worse code somehow?

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]