Slide 45
Slide 45 text
4/24/2024
Copyright © 2021, Oracle and/or its affiliates |
45
1st Solution
Species species = IntVector.SPECIES_PREFERRED;
for (int index = 0; index < v1.length;
index += species.length()) {
var mask = species.indexInRange(index, v1.length);
var V1 = IntVector.fromArray(species, v1, index, mask);
var V2 = IntVector.fromArray(species, v2, index, mask);
var RESULT = V1.add(V2, mask);
RESULT.intoArray(result, index, mask);
}