< prev index next >

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

Print this page




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







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




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


< prev index next >