< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java
Print this page
rev 55589 : 8221817: [vector] No suitable species for indexMap of Gather/Scatter VectorAPI
Reviewed-by: duke
@@ -260,11 +260,16 @@
if (species.length() == 1) {
return DoubleVector.fromArray(species, a, i + indexMap[j]);
}
// Index vector: vix[0:n] = k -> i + indexMap[j + i]
- IntVector vix = IntVector.fromArray(species.indexSpecies(), indexMap, j).add(i);
+ IntVector vix;
+ if (species.indexMask() != null) {
+ vix = IntVector.fromArray(species.indexSpecies(), indexMap, j, species.indexMask()).add(i);
+ } else {
+ vix = IntVector.fromArray(species.indexSpecies(), indexMap, j).add(i);
+ }
vix = VectorIntrinsics.checkIndex(vix, a.length);
return VectorIntrinsics.loadWithMap((Class<DoubleVector>) species.boxType(), double.class, species.length(),
species.indexSpecies().vectorType(), a, Unsafe.ARRAY_DOUBLE_BASE_OFFSET, vix,
@@ -2042,10 +2047,11 @@
abstract Mask<Double> opm(FOpm f);
abstract IntVector.IntSpecies indexSpecies();
+ abstract Mask<Integer> indexMask();
// Factories
@Override
public abstract DoubleVector zero();
< prev index next >