< prev index next >

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

Print this page

   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.incubator.vector;
  26 
  27 import java.nio.ByteBuffer;
  28 import java.util.Arrays;
  29 import java.util.Objects;
  30 import java.util.function.IntUnaryOperator;
  31 

  32 import jdk.internal.vm.annotation.ForceInline;
  33 import jdk.internal.vm.vector.VectorSupport;
  34 
  35 import static jdk.internal.vm.vector.VectorSupport.*;
  36 
  37 import static jdk.incubator.vector.VectorOperators.*;
  38 
  39 // -- This file was mechanically generated: Do not edit! -- //
  40 
  41 @SuppressWarnings("cast")  // warning: redundant cast
  42 final class Byte512Vector extends ByteVector {
  43     static final ByteSpecies VSPECIES =
  44         (ByteSpecies) ByteVector.SPECIES_512;
  45 
  46     static final VectorShape VSHAPE =
  47         VSPECIES.vectorShape();
  48 
  49     static final Class<Byte512Vector> VCLASS = Byte512Vector.class;
  50 
  51     static final int VSIZE = VSPECIES.vectorBitSize();

 457     @ForceInline
 458     public Byte512Vector rearrange(VectorShuffle<Byte> shuffle,
 459                                   VectorMask<Byte> m) {
 460         return (Byte512Vector)
 461             super.rearrangeTemplate(Byte512Shuffle.class,
 462                                     Byte512Mask.class,
 463                                     (Byte512Shuffle) shuffle,
 464                                     (Byte512Mask) m);  // specialize
 465     }
 466 
 467     @Override
 468     @ForceInline
 469     public Byte512Vector rearrange(VectorShuffle<Byte> s,
 470                                   Vector<Byte> v) {
 471         return (Byte512Vector)
 472             super.rearrangeTemplate(Byte512Shuffle.class,
 473                                     (Byte512Shuffle) s,
 474                                     (Byte512Vector) v);  // specialize
 475     }
 476 
















 477     @Override
 478     @ForceInline
 479     public Byte512Vector selectFrom(Vector<Byte> v) {
 480         return (Byte512Vector)
 481             super.selectFromTemplate((Byte512Vector) v);  // specialize
 482     }
 483 
 484     @Override
 485     @ForceInline
 486     public Byte512Vector selectFrom(Vector<Byte> v,
 487                                    VectorMask<Byte> m) {
 488         return (Byte512Vector)
 489             super.selectFromTemplate((Byte512Vector) v,
 490                                      (Byte512Mask) m);  // specialize
 491     }
 492 
 493 
 494     @ForceInline
 495     @Override
 496     public byte lane(int i) {

 756                 this, species,
 757                 (m, s) -> s.maskFactory(m.toArray()).check(s));
 758         }
 759 
 760         @Override
 761         @ForceInline
 762         public Byte512Mask eq(VectorMask<Byte> mask) {
 763             Objects.requireNonNull(mask);
 764             Byte512Mask m = (Byte512Mask)mask;
 765             return xor(m.not());
 766         }
 767 
 768         // Unary operations
 769 
 770         @Override
 771         @ForceInline
 772         public Byte512Mask not() {
 773             return xor(maskAll(true));
 774         }
 775 









 776         // Binary operations
 777 
 778         @Override
 779         @ForceInline
 780         public Byte512Mask and(VectorMask<Byte> mask) {
 781             Objects.requireNonNull(mask);
 782             Byte512Mask m = (Byte512Mask)mask;
 783             return VectorSupport.binaryOp(VECTOR_OP_AND, Byte512Mask.class, null, byte.class, VLENGTH,
 784                                           this, m, null,
 785                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
 786         }
 787 
 788         @Override
 789         @ForceInline
 790         public Byte512Mask or(VectorMask<Byte> mask) {
 791             Objects.requireNonNull(mask);
 792             Byte512Mask m = (Byte512Mask)mask;
 793             return VectorSupport.binaryOp(VECTOR_OP_OR, Byte512Mask.class, null, byte.class, VLENGTH,
 794                                           this, m, null,
 795                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

 955 
 956 
 957 
 958     @ForceInline
 959     @Override
 960     final
 961     ByteVector fromBooleanArray0(boolean[] a, int offset) {
 962         return super.fromBooleanArray0Template(a, offset);  // specialize
 963     }
 964 
 965     @ForceInline
 966     @Override
 967     final
 968     ByteVector fromBooleanArray0(boolean[] a, int offset, VectorMask<Byte> m) {
 969         return super.fromBooleanArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);  // specialize
 970     }
 971 
 972     @ForceInline
 973     @Override
 974     final
 975     ByteVector fromByteArray0(byte[] a, int offset) {
 976         return super.fromByteArray0Template(a, offset);  // specialize
 977     }
 978 
 979     @ForceInline
 980     @Override
 981     final
 982     ByteVector fromByteArray0(byte[] a, int offset, VectorMask<Byte> m) {
 983         return super.fromByteArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);  // specialize
 984     }
 985 
 986     @ForceInline
 987     @Override
 988     final
 989     ByteVector fromByteBuffer0(ByteBuffer bb, int offset) {
 990         return super.fromByteBuffer0Template(bb, offset);  // specialize
 991     }
 992 
 993     @ForceInline
 994     @Override
 995     final
 996     ByteVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Byte> m) {
 997         return super.fromByteBuffer0Template(Byte512Mask.class, bb, offset, (Byte512Mask) m);  // specialize
 998     }
 999 
1000     @ForceInline
1001     @Override
1002     final
1003     void intoArray0(byte[] a, int offset) {
1004         super.intoArray0Template(a, offset);  // specialize
1005     }
1006 
1007     @ForceInline
1008     @Override
1009     final
1010     void intoArray0(byte[] a, int offset, VectorMask<Byte> m) {
1011         super.intoArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);
1012     }
1013 
1014 
1015     @ForceInline
1016     @Override
1017     final
1018     void intoBooleanArray0(boolean[] a, int offset, VectorMask<Byte> m) {
1019         super.intoBooleanArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);
1020     }
1021 
1022     @ForceInline
1023     @Override
1024     final
1025     void intoByteArray0(byte[] a, int offset) {
1026         super.intoByteArray0Template(a, offset);  // specialize
1027     }
1028 
1029     @ForceInline
1030     @Override
1031     final
1032     void intoByteArray0(byte[] a, int offset, VectorMask<Byte> m) {
1033         super.intoByteArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);  // specialize
1034     }
1035 
1036     @ForceInline
1037     @Override
1038     final
1039     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Byte> m) {
1040         super.intoByteBuffer0Template(Byte512Mask.class, bb, offset, (Byte512Mask) m);
1041     }
1042 
1043 
1044     // End of specialized low-level memory operations.
1045 
1046     // ================================================
1047 
1048 }

   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.incubator.vector;
  26 

  27 import java.util.Arrays;
  28 import java.util.Objects;
  29 import java.util.function.IntUnaryOperator;
  30 
  31 import jdk.incubator.foreign.MemorySegment;
  32 import jdk.internal.vm.annotation.ForceInline;
  33 import jdk.internal.vm.vector.VectorSupport;
  34 
  35 import static jdk.internal.vm.vector.VectorSupport.*;
  36 
  37 import static jdk.incubator.vector.VectorOperators.*;
  38 
  39 // -- This file was mechanically generated: Do not edit! -- //
  40 
  41 @SuppressWarnings("cast")  // warning: redundant cast
  42 final class Byte512Vector extends ByteVector {
  43     static final ByteSpecies VSPECIES =
  44         (ByteSpecies) ByteVector.SPECIES_512;
  45 
  46     static final VectorShape VSHAPE =
  47         VSPECIES.vectorShape();
  48 
  49     static final Class<Byte512Vector> VCLASS = Byte512Vector.class;
  50 
  51     static final int VSIZE = VSPECIES.vectorBitSize();

 457     @ForceInline
 458     public Byte512Vector rearrange(VectorShuffle<Byte> shuffle,
 459                                   VectorMask<Byte> m) {
 460         return (Byte512Vector)
 461             super.rearrangeTemplate(Byte512Shuffle.class,
 462                                     Byte512Mask.class,
 463                                     (Byte512Shuffle) shuffle,
 464                                     (Byte512Mask) m);  // specialize
 465     }
 466 
 467     @Override
 468     @ForceInline
 469     public Byte512Vector rearrange(VectorShuffle<Byte> s,
 470                                   Vector<Byte> v) {
 471         return (Byte512Vector)
 472             super.rearrangeTemplate(Byte512Shuffle.class,
 473                                     (Byte512Shuffle) s,
 474                                     (Byte512Vector) v);  // specialize
 475     }
 476 
 477     @Override
 478     @ForceInline
 479     public Byte512Vector compress(VectorMask<Byte> m) {
 480         return (Byte512Vector)
 481             super.compressTemplate(Byte512Mask.class,
 482                                    (Byte512Mask) m);  // specialize
 483     }
 484 
 485     @Override
 486     @ForceInline
 487     public Byte512Vector expand(VectorMask<Byte> m) {
 488         return (Byte512Vector)
 489             super.expandTemplate(Byte512Mask.class,
 490                                    (Byte512Mask) m);  // specialize
 491     }
 492 
 493     @Override
 494     @ForceInline
 495     public Byte512Vector selectFrom(Vector<Byte> v) {
 496         return (Byte512Vector)
 497             super.selectFromTemplate((Byte512Vector) v);  // specialize
 498     }
 499 
 500     @Override
 501     @ForceInline
 502     public Byte512Vector selectFrom(Vector<Byte> v,
 503                                    VectorMask<Byte> m) {
 504         return (Byte512Vector)
 505             super.selectFromTemplate((Byte512Vector) v,
 506                                      (Byte512Mask) m);  // specialize
 507     }
 508 
 509 
 510     @ForceInline
 511     @Override
 512     public byte lane(int i) {

 772                 this, species,
 773                 (m, s) -> s.maskFactory(m.toArray()).check(s));
 774         }
 775 
 776         @Override
 777         @ForceInline
 778         public Byte512Mask eq(VectorMask<Byte> mask) {
 779             Objects.requireNonNull(mask);
 780             Byte512Mask m = (Byte512Mask)mask;
 781             return xor(m.not());
 782         }
 783 
 784         // Unary operations
 785 
 786         @Override
 787         @ForceInline
 788         public Byte512Mask not() {
 789             return xor(maskAll(true));
 790         }
 791 
 792         @Override
 793         @ForceInline
 794         public Byte512Mask compress() {
 795             return (Byte512Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
 796                 Byte512Vector.class, Byte512Mask.class, ETYPE, VLENGTH, null, this,
 797                 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
 798         }
 799 
 800 
 801         // Binary operations
 802 
 803         @Override
 804         @ForceInline
 805         public Byte512Mask and(VectorMask<Byte> mask) {
 806             Objects.requireNonNull(mask);
 807             Byte512Mask m = (Byte512Mask)mask;
 808             return VectorSupport.binaryOp(VECTOR_OP_AND, Byte512Mask.class, null, byte.class, VLENGTH,
 809                                           this, m, null,
 810                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
 811         }
 812 
 813         @Override
 814         @ForceInline
 815         public Byte512Mask or(VectorMask<Byte> mask) {
 816             Objects.requireNonNull(mask);
 817             Byte512Mask m = (Byte512Mask)mask;
 818             return VectorSupport.binaryOp(VECTOR_OP_OR, Byte512Mask.class, null, byte.class, VLENGTH,
 819                                           this, m, null,
 820                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

 980 
 981 
 982 
 983     @ForceInline
 984     @Override
 985     final
 986     ByteVector fromBooleanArray0(boolean[] a, int offset) {
 987         return super.fromBooleanArray0Template(a, offset);  // specialize
 988     }
 989 
 990     @ForceInline
 991     @Override
 992     final
 993     ByteVector fromBooleanArray0(boolean[] a, int offset, VectorMask<Byte> m) {
 994         return super.fromBooleanArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);  // specialize
 995     }
 996 
 997     @ForceInline
 998     @Override
 999     final
1000     ByteVector fromMemorySegment0(MemorySegment ms, long offset) {
1001         return super.fromMemorySegment0Template(ms, offset);  // specialize
1002     }
1003 
1004     @ForceInline
1005     @Override
1006     final
1007     ByteVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Byte> m) {
1008         return super.fromMemorySegment0Template(Byte512Mask.class, ms, offset, (Byte512Mask) m);  // specialize














1009     }
1010 
1011     @ForceInline
1012     @Override
1013     final
1014     void intoArray0(byte[] a, int offset) {
1015         super.intoArray0Template(a, offset);  // specialize
1016     }
1017 
1018     @ForceInline
1019     @Override
1020     final
1021     void intoArray0(byte[] a, int offset, VectorMask<Byte> m) {
1022         super.intoArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);
1023     }
1024 
1025 
1026     @ForceInline
1027     @Override
1028     final
1029     void intoBooleanArray0(boolean[] a, int offset, VectorMask<Byte> m) {
1030         super.intoBooleanArray0Template(Byte512Mask.class, a, offset, (Byte512Mask) m);
1031     }
1032 
1033     @ForceInline
1034     @Override
1035     final
1036     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Byte> m) {
1037         super.intoMemorySegment0Template(Byte512Mask.class, ms, offset, (Byte512Mask) m);














1038     }
1039 
1040 
1041     // End of specialized low-level memory operations.
1042 
1043     // ================================================
1044 
1045 }
< prev index next >