< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java
Print this page
rev 55891 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
rev 55894 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
*** 110,120 ****
* @return a zero vector of given species
*/
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector zero(VectorSpecies<Long> species) {
! return VectorIntrinsics.broadcastCoerced((Class<LongVector>) species.boxType(), long.class, species.length(),
0, species,
((bits, s) -> ((LongSpecies)s).op(i -> (long)bits)));
}
/**
--- 110,120 ----
* @return a zero vector of given species
*/
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector zero(VectorSpecies<Long> species) {
! return VectorIntrinsics.broadcastCoerced((Class<LongVector>) species.vectorType(), long.class, species.length(),
0, species,
((bits, s) -> ((LongSpecies)s).op(i -> (long)bits)));
}
/**
*** 140,150 ****
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector fromByteArray(VectorSpecies<Long> species, byte[] a, int offset) {
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<LongVector>) species.boxType(), long.class, species.length(),
a, ((long) offset) + Unsafe.ARRAY_BYTE_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> {
ByteBuffer bbc = ByteBuffer.wrap(c, idx, a.length - idx).order(ByteOrder.nativeOrder());
LongBuffer tb = bbc.asLongBuffer();
--- 140,150 ----
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector fromByteArray(VectorSpecies<Long> species, byte[] a, int offset) {
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<LongVector>) species.vectorType(), long.class, species.length(),
a, ((long) offset) + Unsafe.ARRAY_BYTE_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> {
ByteBuffer bbc = ByteBuffer.wrap(c, idx, a.length - idx).order(ByteOrder.nativeOrder());
LongBuffer tb = bbc.asLongBuffer();
*** 198,208 ****
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector fromArray(VectorSpecies<Long> species, long[] a, int offset){
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
! return VectorIntrinsics.load((Class<LongVector>) species.boxType(), long.class, species.length(),
a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_LONG_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> ((LongSpecies)s).op(n -> c[idx + n]));
}
--- 198,208 ----
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector fromArray(VectorSpecies<Long> species, long[] a, int offset){
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
! return VectorIntrinsics.load((Class<LongVector>) species.vectorType(), long.class, species.length(),
a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_LONG_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> ((LongSpecies)s).op(n -> c[idx + n]));
}
*** 264,275 ****
// Index vector: vix[0:n] = k -> a_offset + indexMap[i_offset + k]
IntVector vix = IntVector.fromArray(IntVector.species(species.indexShape()), indexMap, i_offset).add(a_offset);
vix = VectorIntrinsics.checkIndex(vix, a.length);
! return VectorIntrinsics.loadWithMap((Class<LongVector>) species.boxType(), long.class, species.length(),
! IntVector.species(species.indexShape()).boxType(), a, Unsafe.ARRAY_LONG_BASE_OFFSET, vix,
a, a_offset, indexMap, i_offset, species,
(long[] c, int idx, int[] iMap, int idy, VectorSpecies<Long> s) ->
((LongSpecies)s).op(n -> c[idx + iMap[idy+n]]));
}
--- 264,275 ----
// Index vector: vix[0:n] = k -> a_offset + indexMap[i_offset + k]
IntVector vix = IntVector.fromArray(IntVector.species(species.indexShape()), indexMap, i_offset).add(a_offset);
vix = VectorIntrinsics.checkIndex(vix, a.length);
! return VectorIntrinsics.loadWithMap((Class<LongVector>) species.vectorType(), long.class, species.length(),
! IntVector.species(species.indexShape()).vectorType(), a, Unsafe.ARRAY_LONG_BASE_OFFSET, vix,
a, a_offset, indexMap, i_offset, species,
(long[] c, int idx, int[] iMap, int idy, VectorSpecies<Long> s) ->
((LongSpecies)s).op(n -> c[idx + iMap[idy+n]]));
}
*** 334,344 ****
public static LongVector fromByteBuffer(VectorSpecies<Long> species, ByteBuffer bb, int offset) {
if (bb.order() != ByteOrder.nativeOrder()) {
throw new IllegalArgumentException();
}
offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<LongVector>) species.boxType(), long.class, species.length(),
U.getReference(bb, BYTE_BUFFER_HB), U.getLong(bb, BUFFER_ADDRESS) + offset,
bb, offset, species,
(c, idx, s) -> {
ByteBuffer bbc = c.duplicate().position(idx).order(ByteOrder.nativeOrder());
LongBuffer tb = bbc.asLongBuffer();
--- 334,344 ----
public static LongVector fromByteBuffer(VectorSpecies<Long> species, ByteBuffer bb, int offset) {
if (bb.order() != ByteOrder.nativeOrder()) {
throw new IllegalArgumentException();
}
offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<LongVector>) species.vectorType(), long.class, species.length(),
U.getReference(bb, BYTE_BUFFER_HB), U.getLong(bb, BUFFER_ADDRESS) + offset,
bb, offset, species,
(c, idx, s) -> {
ByteBuffer bbc = c.duplicate().position(idx).order(ByteOrder.nativeOrder());
LongBuffer tb = bbc.asLongBuffer();
*** 390,408 ****
/**
* Returns a vector where all lane elements are set to the primitive
* value {@code e}.
*
* @param species species of the desired vector
! * @param e the value
* @return a vector of vector where all lane elements are set to
* the primitive value {@code e}
*/
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector broadcast(VectorSpecies<Long> species, long e) {
return VectorIntrinsics.broadcastCoerced(
! (Class<LongVector>) species.boxType(), long.class, species.length(),
e, species,
((bits, sp) -> ((LongSpecies)sp).op(i -> (long)bits)));
}
/**
--- 390,408 ----
/**
* Returns a vector where all lane elements are set to the primitive
* value {@code e}.
*
* @param species species of the desired vector
! * @param e the value to be broadcasted
* @return a vector of vector where all lane elements are set to
* the primitive value {@code e}
*/
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector broadcast(VectorSpecies<Long> species, long e) {
return VectorIntrinsics.broadcastCoerced(
! (Class<LongVector>) species.vectorType(), long.class, species.length(),
e, species,
((bits, sp) -> ((LongSpecies)sp).op(i -> (long)bits)));
}
/**
*** 422,432 ****
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector scalars(VectorSpecies<Long> species, long... es) {
Objects.requireNonNull(es);
int ix = VectorIntrinsics.checkIndex(0, es.length, species.length());
! return VectorIntrinsics.load((Class<LongVector>) species.boxType(), long.class, species.length(),
es, Unsafe.ARRAY_LONG_BASE_OFFSET,
es, ix, species,
(c, idx, sp) -> ((LongSpecies)sp).op(n -> c[idx + n]));
}
--- 422,432 ----
@ForceInline
@SuppressWarnings("unchecked")
public static LongVector scalars(VectorSpecies<Long> species, long... es) {
Objects.requireNonNull(es);
int ix = VectorIntrinsics.checkIndex(0, es.length, species.length());
! return VectorIntrinsics.load((Class<LongVector>) species.vectorType(), long.class, species.length(),
es, Unsafe.ARRAY_LONG_BASE_OFFSET,
es, ix, species,
(c, idx, sp) -> ((LongSpecies)sp).op(n -> c[idx + n]));
}
*** 800,828 ****
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector rotateEL(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector rotateER(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector shiftEL(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector shiftER(int i);
/**
* Bitwise ANDs this vector with an input vector.
--- 800,828 ----
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector rotateLanesLeft(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector rotateLanesRight(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector shiftLanesLeft(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract LongVector shiftLanesRight(int i);
/**
* Bitwise ANDs this vector with an input vector.
*** 997,1170 ****
/**
* Logically left shifts this vector by the broadcast of an input scalar.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane.
*
* @param s the input scalar; the number of the bits to left shift
! * @return the result of logically left shifting left this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftL(int s);
/**
* Logically left shifts this vector by the broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane.
*
* @param s the input scalar; the number of the bits to left shift
* @param m the mask controlling lane selection
* @return the result of logically left shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftL(int s, VectorMask<Long> m);
/**
* Logically left shifts this vector by an input vector.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane.
*
* @param v the input vector
* @return the result of logically left shifting this vector by the input
* vector
*/
! public abstract LongVector shiftL(Vector<Long> v);
/**
* Logically left shifts this vector by an input vector, selecting lane
* elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of logically left shifting this vector by the input
* vector
*/
! public LongVector shiftL(Vector<Long> v, VectorMask<Long> m) {
! return bOp(v, m, (i, a, b) -> (long) (a << b));
}
// logical, or unsigned, shift right
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @return the result of logically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftR(int s);
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @param m the mask controlling lane selection
* @return the result of logically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftR(int s, VectorMask<Long> m);
/**
* Logically right shifts (or unsigned right shifts) this vector by an
* input vector.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>>}) to each lane.
*
* @param v the input vector
* @return the result of logically right shifting this vector by the
* input vector
*/
! public abstract LongVector shiftR(Vector<Long> v);
/**
* Logically right shifts (or unsigned right shifts) this vector by an
* input vector, selecting lane elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>>}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of logically right shifting this vector by the
* input vector
*/
! public LongVector shiftR(Vector<Long> v, VectorMask<Long> m) {
! return bOp(v, m, (i, a, b) -> (long) (a >>> b));
}
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @return the result of arithmetically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector aShiftR(int s);
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @param m the mask controlling lane selection
* @return the result of arithmetically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector aShiftR(int s, VectorMask<Long> m);
/**
* Arithmetically right shifts (or signed right shifts) this vector by an
* input vector.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane.
*
* @param v the input vector
* @return the result of arithmetically right shifting this vector by the
* input vector
*/
! public abstract LongVector aShiftR(Vector<Long> v);
/**
* Arithmetically right shifts (or signed right shifts) this vector by an
* input vector, selecting lane elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of arithmetically right shifting this vector by the
* input vector
*/
! public LongVector aShiftR(Vector<Long> v, VectorMask<Long> m) {
! return bOp(v, m, (i, a, b) -> (long) (a >> b));
}
/**
* Rotates left this vector by the broadcast of an input scalar.
* <p>
--- 997,1182 ----
/**
* Logically left shifts this vector by the broadcast of an input scalar.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane to left shift the
! * element by shift value as specified by the input scalar.
*
* @param s the input scalar; the number of the bits to left shift
! * @return the result of logically left shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftLeft(int s);
/**
* Logically left shifts this vector by the broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane to left shift the
! * element by shift value as specified by the input scalar.
*
* @param s the input scalar; the number of the bits to left shift
* @param m the mask controlling lane selection
* @return the result of logically left shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftLeft(int s, VectorMask<Long> m);
/**
* Logically left shifts this vector by an input vector.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane. For each lane of this vector, the
! * shift value is the corresponding lane of input vector.
*
* @param v the input vector
* @return the result of logically left shifting this vector by the input
* vector
*/
! public abstract LongVector shiftLeft(Vector<Long> v);
/**
* Logically left shifts this vector by an input vector, selecting lane
* elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical left shift
! * operation ({@code <<}) to each lane. For each lane of this vector, the
! * shift value is the corresponding lane of input vector.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of logically left shifting this vector by the input
* vector
*/
! public LongVector shiftLeft(Vector<Long> v, VectorMask<Long> m) {
! return blend(shiftLeft(v), m);
}
// logical, or unsigned, shift right
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>>}) to each lane to logically right shift the
! * element by shift value as specified by the input scalar.
*
* @param s the input scalar; the number of the bits to right shift
* @return the result of logically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftRight(int s);
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>}) to each lane to logically right shift the
! * element by shift value as specified by the input scalar.
*
* @param s the input scalar; the number of the bits to right shift
* @param m the mask controlling lane selection
* @return the result of logically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftRight(int s, VectorMask<Long> m);
/**
* Logically right shifts (or unsigned right shifts) this vector by an
* input vector.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>>}) to each lane. For each lane of this vector, the
! * shift value is the corresponding lane of input vector.
*
* @param v the input vector
* @return the result of logically right shifting this vector by the
* input vector
*/
! public abstract LongVector shiftRight(Vector<Long> v);
/**
* Logically right shifts (or unsigned right shifts) this vector by an
* input vector, selecting lane elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive logical right shift
! * operation ({@code >>>}) to each lane. For each lane of this vector, the
! * shift value is the corresponding lane of input vector.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of logically right shifting this vector by the
* input vector
*/
! public LongVector shiftRight(Vector<Long> v, VectorMask<Long> m) {
! return blend(shiftRight(v), m);
}
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane to arithmetically
! * right shift the element by shift value as specified by the input scalar.
*
* @param s the input scalar; the number of the bits to right shift
* @return the result of arithmetically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftArithmeticRight(int s);
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane to arithmetically
! * right shift the element by shift value as specified by the input scalar.
*
* @param s the input scalar; the number of the bits to right shift
* @param m the mask controlling lane selection
* @return the result of arithmetically right shifting this vector by the
* broadcast of an input scalar
*/
! public abstract LongVector shiftArithmeticRight(int s, VectorMask<Long> m);
/**
* Arithmetically right shifts (or signed right shifts) this vector by an
* input vector.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane. For each lane of this vector, the
! * shift value is the corresponding lane of input vector.
*
* @param v the input vector
* @return the result of arithmetically right shifting this vector by the
* input vector
*/
! public abstract LongVector shiftArithmeticRight(Vector<Long> v);
/**
* Arithmetically right shifts (or signed right shifts) this vector by an
* input vector, selecting lane elements controlled by a mask.
* <p>
* This is a lane-wise binary operation which applies the primitive arithmetic right
! * shift operation ({@code >>}) to each lane. For each lane of this vector, the
! * shift value is the corresponding lane of input vector.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of arithmetically right shifting this vector by the
* input vector
*/
! public LongVector shiftArithmeticRight(Vector<Long> v, VectorMask<Long> m) {
! return blend(shiftArithmeticRight(v), m);
}
/**
* Rotates left this vector by the broadcast of an input scalar.
* <p>
*** 1177,1188 ****
* @param s the input scalar; the number of the bits to rotate left
* @return the result of rotating left this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateL(int s) {
! return shiftL(s).or(shiftR(-s));
}
/**
* Rotates left this vector by the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
--- 1189,1200 ----
* @param s the input scalar; the number of the bits to rotate left
* @return the result of rotating left this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateLeft(int s) {
! return shiftLeft(s).or(shiftRight(-s));
}
/**
* Rotates left this vector by the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
*** 1197,1208 ****
* @param m the mask controlling lane selection
* @return the result of rotating left this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateL(int s, VectorMask<Long> m) {
! return shiftL(s, m).or(shiftR(-s, m), m);
}
/**
* Rotates right this vector by the broadcast of an input scalar.
* <p>
--- 1209,1220 ----
* @param m the mask controlling lane selection
* @return the result of rotating left this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateLeft(int s, VectorMask<Long> m) {
! return shiftLeft(s, m).or(shiftRight(-s, m), m);
}
/**
* Rotates right this vector by the broadcast of an input scalar.
* <p>
*** 1215,1226 ****
* @param s the input scalar; the number of the bits to rotate right
* @return the result of rotating right this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateR(int s) {
! return shiftR(s).or(shiftL(-s));
}
/**
* Rotates right this vector by the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
--- 1227,1238 ----
* @param s the input scalar; the number of the bits to rotate right
* @return the result of rotating right this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateRight(int s) {
! return shiftRight(s).or(shiftLeft(-s));
}
/**
* Rotates right this vector by the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
*** 1235,1246 ****
* @param m the mask controlling lane selection
* @return the result of rotating right this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateR(int s, VectorMask<Long> m) {
! return shiftR(s, m).or(shiftL(-s, m), m);
}
/**
* {@inheritDoc}
*/
--- 1247,1258 ----
* @param m the mask controlling lane selection
* @return the result of rotating right this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final LongVector rotateRight(int s, VectorMask<Long> m) {
! return shiftRight(s, m).or(shiftLeft(-s, m), m);
}
/**
* {@inheritDoc}
*/
*** 1274,1284 ****
* operation ({@code +}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the addition of all the lane elements of this vector
*/
! public abstract long addAll();
/**
* Adds all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1286,1296 ----
* operation ({@code +}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the addition of all the lane elements of this vector
*/
! public abstract long addLanes();
/**
* Adds all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1287,1308 ****
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the addition of the selected lane elements of this vector
*/
! public abstract long addAll(VectorMask<Long> m);
/**
* Multiplies all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the
* multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1}.
*
* @return the multiplication of all the lane elements of this vector
*/
! public abstract long mulAll();
/**
* Multiplies all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1299,1320 ----
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the addition of the selected lane elements of this vector
*/
! public abstract long addLanes(VectorMask<Long> m);
/**
* Multiplies all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the
* multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1}.
*
* @return the multiplication of all the lane elements of this vector
*/
! public abstract long mulLanes();
/**
* Multiplies all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1311,1321 ****
* and the identity value is {@code 1}.
*
* @param m the mask controlling lane selection
* @return the multiplication of all the lane elements of this vector
*/
! public abstract long mulAll(VectorMask<Long> m);
/**
* Returns the minimum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
--- 1323,1333 ----
* and the identity value is {@code 1}.
*
* @param m the mask controlling lane selection
* @return the multiplication of all the lane elements of this vector
*/
! public abstract long mulLanes(VectorMask<Long> m);
/**
* Returns the minimum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
*** 1323,1333 ****
* and the identity value is
* {@link Long#MAX_VALUE}.
*
* @return the minimum lane element of this vector
*/
! public abstract long minAll();
/**
* Returns the minimum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1335,1345 ----
* and the identity value is
* {@link Long#MAX_VALUE}.
*
* @return the minimum lane element of this vector
*/
! public abstract long minLanes();
/**
* Returns the minimum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1337,1347 ****
* {@link Long#MAX_VALUE}.
*
* @param m the mask controlling lane selection
* @return the minimum lane element of this vector
*/
! public abstract long minAll(VectorMask<Long> m);
/**
* Returns the maximum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
--- 1349,1359 ----
* {@link Long#MAX_VALUE}.
*
* @param m the mask controlling lane selection
* @return the minimum lane element of this vector
*/
! public abstract long minLanes(VectorMask<Long> m);
/**
* Returns the maximum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
*** 1349,1359 ****
* and the identity value is
* {@link Long#MIN_VALUE}.
*
* @return the maximum lane element of this vector
*/
! public abstract long maxAll();
/**
* Returns the maximum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1361,1371 ----
* and the identity value is
* {@link Long#MIN_VALUE}.
*
* @return the maximum lane element of this vector
*/
! public abstract long maxLanes();
/**
* Returns the maximum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1363,1384 ****
* {@link Long#MIN_VALUE}.
*
* @param m the mask controlling lane selection
* @return the maximum lane element of this vector
*/
! public abstract long maxAll(VectorMask<Long> m);
/**
* Logically ORs all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the logical OR
* operation ({@code |}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the logical OR all the lane elements of this vector
*/
! public abstract long orAll();
/**
* Logically ORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1375,1396 ----
* {@link Long#MIN_VALUE}.
*
* @param m the mask controlling lane selection
* @return the maximum lane element of this vector
*/
! public abstract long maxLanes(VectorMask<Long> m);
/**
* Logically ORs all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the logical OR
* operation ({@code |}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the logical OR all the lane elements of this vector
*/
! public abstract long orLanes();
/**
* Logically ORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1387,1408 ****
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the logical OR all the lane elements of this vector
*/
! public abstract long orAll(VectorMask<Long> m);
/**
* Logically ANDs all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the logical AND
* operation ({@code |}) to lane elements,
* and the identity value is {@code -1}.
*
* @return the logical AND all the lane elements of this vector
*/
! public abstract long andAll();
/**
* Logically ANDs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1399,1420 ----
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the logical OR all the lane elements of this vector
*/
! public abstract long orLanes(VectorMask<Long> m);
/**
* Logically ANDs all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the logical AND
* operation ({@code |}) to lane elements,
* and the identity value is {@code -1}.
*
* @return the logical AND all the lane elements of this vector
*/
! public abstract long andLanes();
/**
* Logically ANDs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1411,1432 ****
* and the identity value is {@code -1}.
*
* @param m the mask controlling lane selection
* @return the logical AND all the lane elements of this vector
*/
! public abstract long andAll(VectorMask<Long> m);
/**
* Logically XORs all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the logical XOR
* operation ({@code ^}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the logical XOR all the lane elements of this vector
*/
! public abstract long xorAll();
/**
* Logically XORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1423,1444 ----
* and the identity value is {@code -1}.
*
* @param m the mask controlling lane selection
* @return the logical AND all the lane elements of this vector
*/
! public abstract long andLanes(VectorMask<Long> m);
/**
* Logically XORs all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the logical XOR
* operation ({@code ^}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the logical XOR all the lane elements of this vector
*/
! public abstract long xorLanes();
/**
* Logically XORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1435,1445 ****
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the logical XOR all the lane elements of this vector
*/
! public abstract long xorAll(VectorMask<Long> m);
// Type specific accessors
/**
* Gets the lane element at lane index {@code i}
--- 1447,1457 ----
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the logical XOR all the lane elements of this vector
*/
! public abstract long xorLanes(VectorMask<Long> m);
// Type specific accessors
/**
* Gets the lane element at lane index {@code i}
*** 1578,1594 ****
*/
static final class LongSpecies extends AbstractSpecies<Long> {
final Function<long[], LongVector> vectorFactory;
private LongSpecies(VectorShape shape,
! Class<?> boxType,
Class<?> maskType,
Function<long[], LongVector> vectorFactory,
Function<boolean[], VectorMask<Long>> maskFactory,
Function<IntUnaryOperator, VectorShuffle<Long>> shuffleFromArrayFactory,
fShuffleFromArray<Long> shuffleFromOpFactory) {
! super(shape, long.class, Long.SIZE, boxType, maskType, maskFactory,
shuffleFromArrayFactory, shuffleFromOpFactory);
this.vectorFactory = vectorFactory;
}
interface FOp {
--- 1590,1606 ----
*/
static final class LongSpecies extends AbstractSpecies<Long> {
final Function<long[], LongVector> vectorFactory;
private LongSpecies(VectorShape shape,
! Class<?> vectorType,
Class<?> maskType,
Function<long[], LongVector> vectorFactory,
Function<boolean[], VectorMask<Long>> maskFactory,
Function<IntUnaryOperator, VectorShuffle<Long>> shuffleFromArrayFactory,
fShuffleFromArray<Long> shuffleFromOpFactory) {
! super(shape, long.class, Long.SIZE, vectorType, maskType, maskFactory,
shuffleFromArrayFactory, shuffleFromOpFactory);
this.vectorFactory = vectorFactory;
}
interface FOp {
< prev index next >