< prev index next >

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

Print this page




 898     }
 899 
 900     @Override
 901     public Long256Vector shiftER(int j) {
 902         long[] vec = getElements();
 903         long[] res = new long[length()];
 904         for (int i = 0; i < length() - j; i++){
 905             res[i + j] = vec[i];
 906         }
 907         return new Long256Vector(res);
 908     }
 909 
 910     @Override
 911     @ForceInline
 912     public Long256Vector rearrange(Vector<Long, Shapes.S256Bit> v,
 913                                   Shuffle<Long, Shapes.S256Bit> s, Mask<Long, Shapes.S256Bit> m) {
 914         return this.rearrange(s).blend(v.rearrange(s), m);
 915     }
 916 
 917     @Override
 918     public Long256Vector rearrange(Shuffle<Long, Shapes.S256Bit> s) {
 919         return uOp((i, a) -> {







 920             long[] vec = this.getElements();
 921             int ei = s.getElement(i);
 922             return vec[ei];
 923         });
 924     }
 925 
 926     @Override
 927     @ForceInline
 928     public Long256Vector blend(Vector<Long, Shapes.S256Bit> o1, Mask<Long, Shapes.S256Bit> o2) {
 929         Objects.requireNonNull(o1);
 930         Objects.requireNonNull(o2);
 931         Long256Vector v = (Long256Vector)o1;
 932         Long256Mask   m = (Long256Mask)o2;
 933 
 934         return VectorIntrinsics.blend(
 935             Long256Vector.class, Long256Mask.class, long.class, LENGTH,
 936             this, v, m,
 937             (v1, v2, m_) -> v1.bOp(v2, (i, a, b) -> m_.getElement(i) ? b : a));
 938     }
 939 
 940     // Accessors
 941 
 942     @Override
 943     public long get(int i) {




 898     }
 899 
 900     @Override
 901     public Long256Vector shiftER(int j) {
 902         long[] vec = getElements();
 903         long[] res = new long[length()];
 904         for (int i = 0; i < length() - j; i++){
 905             res[i + j] = vec[i];
 906         }
 907         return new Long256Vector(res);
 908     }
 909 
 910     @Override
 911     @ForceInline
 912     public Long256Vector rearrange(Vector<Long, Shapes.S256Bit> v,
 913                                   Shuffle<Long, Shapes.S256Bit> s, Mask<Long, Shapes.S256Bit> m) {
 914         return this.rearrange(s).blend(v.rearrange(s), m);
 915     }
 916 
 917     @Override
 918     @ForceInline
 919     public Long256Vector rearrange(Shuffle<Long, Shapes.S256Bit> o1) {
 920     Objects.requireNonNull(o1);
 921     Long256Shuffle s =  (Long256Shuffle)o1;
 922 
 923         return VectorIntrinsics.rearrangeOp(
 924             Long256Vector.class, Long256Shuffle.class, long.class, LENGTH,
 925             this, s,
 926             (v1, s_) -> v1.uOp((i, a) -> {
 927             long[] vec = this.getElements();
 928             int ei = s_.getElement(i);
 929             return vec[ei];
 930         }));
 931     }
 932 
 933     @Override
 934     @ForceInline
 935     public Long256Vector blend(Vector<Long, Shapes.S256Bit> o1, Mask<Long, Shapes.S256Bit> o2) {
 936         Objects.requireNonNull(o1);
 937         Objects.requireNonNull(o2);
 938         Long256Vector v = (Long256Vector)o1;
 939         Long256Mask   m = (Long256Mask)o2;
 940 
 941         return VectorIntrinsics.blend(
 942             Long256Vector.class, Long256Mask.class, long.class, LENGTH,
 943             this, v, m,
 944             (v1, v2, m_) -> v1.bOp(v2, (i, a, b) -> m_.getElement(i) ? b : a));
 945     }
 946 
 947     // Accessors
 948 
 949     @Override
 950     public long get(int i) {


< prev index next >