< prev index next >

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

Print this page




 828     }
 829 
 830     @Override
 831     public Short512Vector shiftER(int j) {
 832         short[] vec = getElements();
 833         short[] res = new short[length()];
 834         for (int i = 0; i < length() - j; i++){
 835             res[i + j] = vec[i];
 836         }
 837         return new Short512Vector(res);
 838     }
 839 
 840     @Override
 841     @ForceInline
 842     public Short512Vector rearrange(Vector<Short, Shapes.S512Bit> v,
 843                                   Shuffle<Short, Shapes.S512Bit> s, Mask<Short, Shapes.S512Bit> m) {
 844         return this.rearrange(s).blend(v.rearrange(s), m);
 845     }
 846 
 847     @Override
 848     public Short512Vector rearrange(Shuffle<Short, Shapes.S512Bit> s) {
 849         return uOp((i, a) -> {







 850             short[] vec = this.getElements();
 851             int ei = s.getElement(i);
 852             return vec[ei];
 853         });
 854     }
 855 
 856     @Override
 857     @ForceInline
 858     public Short512Vector blend(Vector<Short, Shapes.S512Bit> o1, Mask<Short, Shapes.S512Bit> o2) {
 859         Objects.requireNonNull(o1);
 860         Objects.requireNonNull(o2);
 861         Short512Vector v = (Short512Vector)o1;
 862         Short512Mask   m = (Short512Mask)o2;
 863 
 864         return VectorIntrinsics.blend(
 865             Short512Vector.class, Short512Mask.class, short.class, LENGTH,
 866             this, v, m,
 867             (v1, v2, m_) -> v1.bOp(v2, (i, a, b) -> m_.getElement(i) ? b : a));
 868     }
 869 
 870     // Accessors
 871 
 872     @Override
 873     public short get(int i) {




 828     }
 829 
 830     @Override
 831     public Short512Vector shiftER(int j) {
 832         short[] vec = getElements();
 833         short[] res = new short[length()];
 834         for (int i = 0; i < length() - j; i++){
 835             res[i + j] = vec[i];
 836         }
 837         return new Short512Vector(res);
 838     }
 839 
 840     @Override
 841     @ForceInline
 842     public Short512Vector rearrange(Vector<Short, Shapes.S512Bit> v,
 843                                   Shuffle<Short, Shapes.S512Bit> s, Mask<Short, Shapes.S512Bit> m) {
 844         return this.rearrange(s).blend(v.rearrange(s), m);
 845     }
 846 
 847     @Override
 848     @ForceInline
 849     public Short512Vector rearrange(Shuffle<Short, Shapes.S512Bit> o1) {
 850     Objects.requireNonNull(o1);
 851     Short512Shuffle s =  (Short512Shuffle)o1;
 852 
 853         return VectorIntrinsics.rearrangeOp(
 854             Short512Vector.class, Short512Shuffle.class, short.class, LENGTH,
 855             this, s,
 856             (v1, s_) -> v1.uOp((i, a) -> {
 857             short[] vec = this.getElements();
 858             int ei = s_.getElement(i);
 859             return vec[ei];
 860         }));
 861     }
 862 
 863     @Override
 864     @ForceInline
 865     public Short512Vector blend(Vector<Short, Shapes.S512Bit> o1, Mask<Short, Shapes.S512Bit> o2) {
 866         Objects.requireNonNull(o1);
 867         Objects.requireNonNull(o2);
 868         Short512Vector v = (Short512Vector)o1;
 869         Short512Mask   m = (Short512Mask)o2;
 870 
 871         return VectorIntrinsics.blend(
 872             Short512Vector.class, Short512Mask.class, short.class, LENGTH,
 873             this, v, m,
 874             (v1, v2, m_) -> v1.bOp(v2, (i, a, b) -> m_.getElement(i) ? b : a));
 875     }
 876 
 877     // Accessors
 878 
 879     @Override
 880     public short get(int i) {


< prev index next >