[vectorIntrinsics+mask] RFR: 8264563: Add masked vector intrinsics for binary/store operations [v6]
Xiaohong Gong
xgong at openjdk.java.net
Mon Apr 26 06:33:04 UTC 2021
On Thu, 22 Apr 2021 10:18:10 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java line 649:
>>
>>> 647: ((jdk.incubator.vector.VectorMask<Byte>) m).vectorSpecies();
>>> 648: if (maskSpecies != vspecies()) {
>>> 649: throw AbstractSpecies.checkFailed(maskSpecies, vspecies());
>>
>> @iwanowww @PaulSandoz , the new commit add a type check to the mask value in the masked `lanewise` API. This could raise an implicit null check for the mask value. I tried to use `m.getClass()` at first, but I didn't find a reasonable way to use it in this API. Does this change make sense for you? Thanks!
>
> Yes, it looks fine to me.
>
> I suggest to factor the check into a helper method (`AbstractVector::check(VectorMask m)`) and call it next to the check on `Vector`s.
Thanks! I will update the codes according to your suggestion!
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/57
More information about the panama-dev
mailing list