< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template

Print this page
rev 55589 : 8221817: [vector] No suitable species for indexMap of Gather/Scatter VectorAPI
Reviewed-by: duke

*** 266,279 **** #if[longOrDouble] if (species.length() == 1) { return $abstractvectortype$.fromArray(species, a, i + indexMap[j]); } - #end[longOrDouble] // Index vector: vix[0:n] = k -> i + indexMap[j + i] IntVector vix = IntVector.fromArray(species.indexSpecies(), indexMap, j).add(i); vix = VectorIntrinsics.checkIndex(vix, a.length); return VectorIntrinsics.loadWithMap((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(), species.indexSpecies().vectorType(), a, Unsafe.ARRAY_$TYPE$_BASE_OFFSET, vix, --- 266,287 ---- #if[longOrDouble] if (species.length() == 1) { return $abstractvectortype$.fromArray(species, a, i + indexMap[j]); } // Index vector: vix[0:n] = k -> i + indexMap[j + 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); + } + #else[longOrDouble] + // Index vector: vix[0:n] = k -> i + indexMap[j + i] IntVector vix = IntVector.fromArray(species.indexSpecies(), indexMap, j).add(i); + #end[longOrDouble] vix = VectorIntrinsics.checkIndex(vix, a.length); return VectorIntrinsics.loadWithMap((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(), species.indexSpecies().vectorType(), a, Unsafe.ARRAY_$TYPE$_BASE_OFFSET, vix,
*** 2834,2846 **** abstract Mask<$Boxtype$> opm(FOpm f); #if[!byteOrShort] abstract IntVector.IntSpecies indexSpecies(); - #end[!byteOrShort] // Factories @Override public abstract $abstractvectortype$ zero(); --- 2842,2857 ---- abstract Mask<$Boxtype$> opm(FOpm f); #if[!byteOrShort] abstract IntVector.IntSpecies indexSpecies(); + #if[longOrDouble] + abstract Mask<Integer> indexMask(); + #end[longOrDouble] + #end[!byteOrShort] // Factories @Override public abstract $abstractvectortype$ zero();
< prev index next >