[vector] Is Mask inverted in XXXVector.xxxAll(Mask<>)?
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Wed Mar 20 21:20:41 UTC 2019
Thanks for the report, Lev!
Yes, it's a bug. Filed https://bugs.openjdk.java.net/browse/JDK-8221176
Best regards,
Vladimir Ivanov
On 19/03/2019 09:54, Lev Serebryakov wrote:
>
> This code gives me 100.0f and not expected 10.0f (Preferred Spices in
> 256 on my system, as I don't have AVX-512):
>
> FloatVector.FloatSpecies PFS = FloatVector.preferredSpecies();
> FloatVector.Mask m = FloatVector.maskFromValues(PFS,
> true, false, true, false, true, false, true, false
> );
> FloatVector v = FloatVector.fromArray(PFS, new float[]
> { 1.0f, 10.0f, 2.0f, 20.0f, 3.0f, 30.0f, 4.0f, 40.0f }, 0
> );
> float sum = v.addAll(m);
>
>
> Same problem with `mulAll()`.
>
More information about the panama-dev
mailing list