[vectorIntrinsics+mask] RFR: 8264563: Add masked vector intrinsics for binary/store operations [v5]
Xiaohong Gong
xgong at openjdk.java.net
Thu Apr 22 09:45:31 UTC 2021
On Fri, 16 Apr 2021 03:21:55 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
> > > > I am tempted to have a template method for both non-mask and mask. Thus specialized code (that before calling the intrinsic) may be somewhat duplicated before calling `binaryMaskOp`, using a constant for the op -> lambda function, and passing in null or the mask value.
> > >
> > >
> > > Yeah, that's why I added the `lanewise0` and `lanewise0Template` methods.
> >
> >
> > I am suggesting to separate out templates for non-masked and masked, similar to the current pattern. That would result in some duplication for the special cases, but i think makes it easier to reason about in one place, rather than being somewhat spread out. Perhaps easier to explain as code. We should just iterate on the branch.
>
> Thanks for your more details! I think I misunderstood your point before. I will think about your suggestion. Thanks so much!
Hi @PaulSandoz , the latest commit changes something according to your suggestion. It totally separateS the special handles for the special cases for non-masked and masked version, although finally they still use one template `lanewise0Template`. Could you please take a look again? If it matches what you suggested above, do you think it need to separate out the template methods further? Thanks!
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/57
More information about the panama-dev
mailing list