< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Int256Vector.java

Print this page

        

*** 161,171 **** throw new IllegalArgumentException("Vector length this species length differ"); return VectorIntrinsics.cast( Int256Vector.class, int.class, LENGTH, ! s.boxType(), s.elementType(), LENGTH, this, s, (species, vector) -> vector.castDefault(species) ); } --- 161,171 ---- throw new IllegalArgumentException("Vector length this species length differ"); return VectorIntrinsics.cast( Int256Vector.class, int.class, LENGTH, ! s.vectorType(), s.elementType(), LENGTH, this, s, (species, vector) -> vector.castDefault(species) ); }
*** 299,346 **** @Override @ForceInline public IntVector reshape(VectorSpecies<Integer> s) { Objects.requireNonNull(s); ! if (s.bitSize() == 64 && (s.boxType() == Int64Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int64Vector.class, int.class, Int64Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); ! } else if (s.bitSize() == 128 && (s.boxType() == Int128Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int128Vector.class, int.class, Int128Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); ! } else if (s.bitSize() == 256 && (s.boxType() == Int256Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int256Vector.class, int.class, Int256Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); ! } else if (s.bitSize() == 512 && (s.boxType() == Int512Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int512Vector.class, int.class, Int512Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); } else if ((s.bitSize() > 0) && (s.bitSize() <= 2048) ! && (s.bitSize() % 128 == 0) && (s.boxType() == IntMaxVector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, IntMaxVector.class, int.class, IntMaxVector.LENGTH, --- 299,346 ---- @Override @ForceInline public IntVector reshape(VectorSpecies<Integer> s) { Objects.requireNonNull(s); ! if (s.bitSize() == 64 && (s.vectorType() == Int64Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int64Vector.class, int.class, Int64Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); ! } else if (s.bitSize() == 128 && (s.vectorType() == Int128Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int128Vector.class, int.class, Int128Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); ! } else if (s.bitSize() == 256 && (s.vectorType() == Int256Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int256Vector.class, int.class, Int256Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); ! } else if (s.bitSize() == 512 && (s.vectorType() == Int512Vector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, Int512Vector.class, int.class, Int512Vector.LENGTH, this, s, (species, vector) -> (IntVector) vector.defaultReinterpret(species) ); } else if ((s.bitSize() > 0) && (s.bitSize() <= 2048) ! && (s.bitSize() % 128 == 0) && (s.vectorType() == IntMaxVector.class)) { return VectorIntrinsics.reinterpret( Int256Vector.class, int.class, LENGTH, IntMaxVector.class, int.class, IntMaxVector.LENGTH,
*** 663,718 **** return blend(xor(v), m); } @Override @ForceInline ! public Int256Vector shiftL(int s) { return VectorIntrinsics.broadcastInt( VECTOR_OP_LSHIFT, Int256Vector.class, int.class, LENGTH, this, s, (v, i) -> v.uOp((__, a) -> (int) (a << i))); } @Override @ForceInline ! public Int256Vector shiftL(int s, VectorMask<Integer> m) { ! return blend(shiftL(s), m); } @Override @ForceInline ! public Int256Vector shiftR(int s) { return VectorIntrinsics.broadcastInt( VECTOR_OP_URSHIFT, Int256Vector.class, int.class, LENGTH, this, s, (v, i) -> v.uOp((__, a) -> (int) (a >>> i))); } @Override @ForceInline ! public Int256Vector shiftR(int s, VectorMask<Integer> m) { ! return blend(shiftR(s), m); } @Override @ForceInline ! public Int256Vector aShiftR(int s) { return VectorIntrinsics.broadcastInt( VECTOR_OP_RSHIFT, Int256Vector.class, int.class, LENGTH, this, s, (v, i) -> v.uOp((__, a) -> (int) (a >> i))); } @Override @ForceInline ! public Int256Vector aShiftR(int s, VectorMask<Integer> m) { ! return blend(aShiftR(s), m); } @Override @ForceInline ! public Int256Vector shiftL(Vector<Integer> s) { Int256Vector shiftv = (Int256Vector)s; // As per shift specification for Java, mask the shift count. shiftv = shiftv.and(IntVector.broadcast(SPECIES, 0x1f)); return VectorIntrinsics.binaryOp( VECTOR_OP_LSHIFT, Int256Vector.class, int.class, LENGTH, --- 663,718 ---- return blend(xor(v), m); } @Override @ForceInline ! public Int256Vector shiftLeft(int s) { return VectorIntrinsics.broadcastInt( VECTOR_OP_LSHIFT, Int256Vector.class, int.class, LENGTH, this, s, (v, i) -> v.uOp((__, a) -> (int) (a << i))); } @Override @ForceInline ! public Int256Vector shiftLeft(int s, VectorMask<Integer> m) { ! return blend(shiftLeft(s), m); } @Override @ForceInline ! public Int256Vector shiftRight(int s) { return VectorIntrinsics.broadcastInt( VECTOR_OP_URSHIFT, Int256Vector.class, int.class, LENGTH, this, s, (v, i) -> v.uOp((__, a) -> (int) (a >>> i))); } @Override @ForceInline ! public Int256Vector shiftRight(int s, VectorMask<Integer> m) { ! return blend(shiftRight(s), m); } @Override @ForceInline ! public Int256Vector shiftArithmeticRight(int s) { return VectorIntrinsics.broadcastInt( VECTOR_OP_RSHIFT, Int256Vector.class, int.class, LENGTH, this, s, (v, i) -> v.uOp((__, a) -> (int) (a >> i))); } @Override @ForceInline ! public Int256Vector shiftArithmeticRight(int s, VectorMask<Integer> m) { ! return blend(shiftArithmeticRight(s), m); } @Override @ForceInline ! public Int256Vector shiftLeft(Vector<Integer> s) { Int256Vector shiftv = (Int256Vector)s; // As per shift specification for Java, mask the shift count. shiftv = shiftv.and(IntVector.broadcast(SPECIES, 0x1f)); return VectorIntrinsics.binaryOp( VECTOR_OP_LSHIFT, Int256Vector.class, int.class, LENGTH,
*** 720,730 **** (v1, v2) -> v1.bOp(v2,(i,a, b) -> (int) (a << b))); } @Override @ForceInline ! public Int256Vector shiftR(Vector<Integer> s) { Int256Vector shiftv = (Int256Vector)s; // As per shift specification for Java, mask the shift count. shiftv = shiftv.and(IntVector.broadcast(SPECIES, 0x1f)); return VectorIntrinsics.binaryOp( VECTOR_OP_URSHIFT, Int256Vector.class, int.class, LENGTH, --- 720,730 ---- (v1, v2) -> v1.bOp(v2,(i,a, b) -> (int) (a << b))); } @Override @ForceInline ! public Int256Vector shiftRight(Vector<Integer> s) { Int256Vector shiftv = (Int256Vector)s; // As per shift specification for Java, mask the shift count. shiftv = shiftv.and(IntVector.broadcast(SPECIES, 0x1f)); return VectorIntrinsics.binaryOp( VECTOR_OP_URSHIFT, Int256Vector.class, int.class, LENGTH,
*** 732,742 **** (v1, v2) -> v1.bOp(v2,(i,a, b) -> (int) (a >>> b))); } @Override @ForceInline ! public Int256Vector aShiftR(Vector<Integer> s) { Int256Vector shiftv = (Int256Vector)s; // As per shift specification for Java, mask the shift count. shiftv = shiftv.and(IntVector.broadcast(SPECIES, 0x1f)); return VectorIntrinsics.binaryOp( VECTOR_OP_RSHIFT, Int256Vector.class, int.class, LENGTH, --- 732,742 ---- (v1, v2) -> v1.bOp(v2,(i,a, b) -> (int) (a >>> b))); } @Override @ForceInline ! public Int256Vector shiftArithmeticRight(Vector<Integer> s) { Int256Vector shiftv = (Int256Vector)s; // As per shift specification for Java, mask the shift count. shiftv = shiftv.and(IntVector.broadcast(SPECIES, 0x1f)); return VectorIntrinsics.binaryOp( VECTOR_OP_RSHIFT, Int256Vector.class, int.class, LENGTH,
*** 1105,1125 **** } return new Float256Vector(res); } @Override ! public Int256Vector rotateEL(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length(); i++){ res[(j + i) % length()] = vec[i]; } return new Int256Vector(res); } @Override ! public Int256Vector rotateER(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length(); i++){ int z = i - j; if(j < 0) { --- 1105,1125 ---- } return new Float256Vector(res); } @Override ! public Int256Vector rotateLanesLeft(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length(); i++){ res[(j + i) % length()] = vec[i]; } return new Int256Vector(res); } @Override ! public Int256Vector rotateLanesRight(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length(); i++){ int z = i - j; if(j < 0) {
*** 1130,1150 **** } return new Int256Vector(res); } @Override ! public Int256Vector shiftEL(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length() - j; i++) { res[i] = vec[i + j]; } return new Int256Vector(res); } @Override ! public Int256Vector shiftER(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length() - j; i++){ res[i + j] = vec[i]; } --- 1130,1150 ---- } return new Int256Vector(res); } @Override ! public Int256Vector shiftLanesLeft(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length() - j; i++) { res[i] = vec[i + j]; } return new Int256Vector(res); } @Override ! public Int256Vector shiftLanesRight(int j) { int[] vec = getElements(); int[] res = new int[length()]; for (int i = 0; i < length() - j; i++){ res[i + j] = vec[i]; }
< prev index next >