< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Long256Vector.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 Long256Vector extends LongVector {
 43     static final LongSpecies VSPECIES =
 44         (LongSpecies) LongVector.SPECIES_256;
 45 
 46     static final VectorShape VSHAPE =
 47         VSPECIES.vectorShape();
 48 
 49     static final Class<Long256Vector> VCLASS = Long256Vector.class;
 50 
 51     static final int VSIZE = VSPECIES.vectorBitSize();

447     @ForceInline
448     public Long256Vector rearrange(VectorShuffle<Long> shuffle,
449                                   VectorMask<Long> m) {
450         return (Long256Vector)
451             super.rearrangeTemplate(Long256Shuffle.class,
452                                     Long256Mask.class,
453                                     (Long256Shuffle) shuffle,
454                                     (Long256Mask) m);  // specialize
455     }
456 
457     @Override
458     @ForceInline
459     public Long256Vector rearrange(VectorShuffle<Long> s,
460                                   Vector<Long> v) {
461         return (Long256Vector)
462             super.rearrangeTemplate(Long256Shuffle.class,
463                                     (Long256Shuffle) s,
464                                     (Long256Vector) v);  // specialize
465     }
466 
















467     @Override
468     @ForceInline
469     public Long256Vector selectFrom(Vector<Long> v) {
470         return (Long256Vector)
471             super.selectFromTemplate((Long256Vector) v);  // specialize
472     }
473 
474     @Override
475     @ForceInline
476     public Long256Vector selectFrom(Vector<Long> v,
477                                    VectorMask<Long> m) {
478         return (Long256Vector)
479             super.selectFromTemplate((Long256Vector) v,
480                                      (Long256Mask) m);  // specialize
481     }
482 
483 
484     @ForceInline
485     @Override
486     public long lane(int i) {

626                 this, species,
627                 (m, s) -> s.maskFactory(m.toArray()).check(s));
628         }
629 
630         @Override
631         @ForceInline
632         public Long256Mask eq(VectorMask<Long> mask) {
633             Objects.requireNonNull(mask);
634             Long256Mask m = (Long256Mask)mask;
635             return xor(m.not());
636         }
637 
638         // Unary operations
639 
640         @Override
641         @ForceInline
642         public Long256Mask not() {
643             return xor(maskAll(true));
644         }
645 









646         // Binary operations
647 
648         @Override
649         @ForceInline
650         public Long256Mask and(VectorMask<Long> mask) {
651             Objects.requireNonNull(mask);
652             Long256Mask m = (Long256Mask)mask;
653             return VectorSupport.binaryOp(VECTOR_OP_AND, Long256Mask.class, null, long.class, VLENGTH,
654                                           this, m, null,
655                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
656         }
657 
658         @Override
659         @ForceInline
660         public Long256Mask or(VectorMask<Long> mask) {
661             Objects.requireNonNull(mask);
662             Long256Mask m = (Long256Mask)mask;
663             return VectorSupport.binaryOp(VECTOR_OP_OR, Long256Mask.class, null, long.class, VLENGTH,
664                                           this, m, null,
665                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

818 
819     @ForceInline
820     @Override
821     final
822     LongVector fromArray0(long[] a, int offset, VectorMask<Long> m) {
823         return super.fromArray0Template(Long256Mask.class, a, offset, (Long256Mask) m);  // specialize
824     }
825 
826     @ForceInline
827     @Override
828     final
829     LongVector fromArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
830         return super.fromArray0Template(Long256Mask.class, a, offset, indexMap, mapOffset, (Long256Mask) m);
831     }
832 
833 
834 
835     @ForceInline
836     @Override
837     final
838     LongVector fromByteArray0(byte[] a, int offset) {
839         return super.fromByteArray0Template(a, offset);  // specialize
840     }
841 
842     @ForceInline
843     @Override
844     final
845     LongVector fromByteArray0(byte[] a, int offset, VectorMask<Long> m) {
846         return super.fromByteArray0Template(Long256Mask.class, a, offset, (Long256Mask) m);  // specialize
847     }
848 
849     @ForceInline
850     @Override
851     final
852     LongVector fromByteBuffer0(ByteBuffer bb, int offset) {
853         return super.fromByteBuffer0Template(bb, offset);  // specialize
854     }
855 
856     @ForceInline
857     @Override
858     final
859     LongVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Long> m) {
860         return super.fromByteBuffer0Template(Long256Mask.class, bb, offset, (Long256Mask) m);  // specialize
861     }
862 
863     @ForceInline
864     @Override
865     final
866     void intoArray0(long[] a, int offset) {
867         super.intoArray0Template(a, offset);  // specialize
868     }
869 
870     @ForceInline
871     @Override
872     final
873     void intoArray0(long[] a, int offset, VectorMask<Long> m) {
874         super.intoArray0Template(Long256Mask.class, a, offset, (Long256Mask) m);
875     }
876 
877     @ForceInline
878     @Override
879     final
880     void intoArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
881         super.intoArray0Template(Long256Mask.class, a, offset, indexMap, mapOffset, (Long256Mask) m);
882     }
883 
884 
885     @ForceInline
886     @Override
887     final
888     void intoByteArray0(byte[] a, int offset) {
889         super.intoByteArray0Template(a, offset);  // specialize
890     }
891 
892     @ForceInline
893     @Override
894     final
895     void intoByteArray0(byte[] a, int offset, VectorMask<Long> m) {
896         super.intoByteArray0Template(Long256Mask.class, a, offset, (Long256Mask) m);  // specialize
897     }
898 
899     @ForceInline
900     @Override
901     final
902     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Long> m) {
903         super.intoByteBuffer0Template(Long256Mask.class, bb, offset, (Long256Mask) m);
904     }
905 
906 
907     // End of specialized low-level memory operations.
908 
909     // ================================================
910 
911 }

  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 Long256Vector extends LongVector {
 43     static final LongSpecies VSPECIES =
 44         (LongSpecies) LongVector.SPECIES_256;
 45 
 46     static final VectorShape VSHAPE =
 47         VSPECIES.vectorShape();
 48 
 49     static final Class<Long256Vector> VCLASS = Long256Vector.class;
 50 
 51     static final int VSIZE = VSPECIES.vectorBitSize();

447     @ForceInline
448     public Long256Vector rearrange(VectorShuffle<Long> shuffle,
449                                   VectorMask<Long> m) {
450         return (Long256Vector)
451             super.rearrangeTemplate(Long256Shuffle.class,
452                                     Long256Mask.class,
453                                     (Long256Shuffle) shuffle,
454                                     (Long256Mask) m);  // specialize
455     }
456 
457     @Override
458     @ForceInline
459     public Long256Vector rearrange(VectorShuffle<Long> s,
460                                   Vector<Long> v) {
461         return (Long256Vector)
462             super.rearrangeTemplate(Long256Shuffle.class,
463                                     (Long256Shuffle) s,
464                                     (Long256Vector) v);  // specialize
465     }
466 
467     @Override
468     @ForceInline
469     public Long256Vector compress(VectorMask<Long> m) {
470         return (Long256Vector)
471             super.compressTemplate(Long256Mask.class,
472                                    (Long256Mask) m);  // specialize
473     }
474 
475     @Override
476     @ForceInline
477     public Long256Vector expand(VectorMask<Long> m) {
478         return (Long256Vector)
479             super.expandTemplate(Long256Mask.class,
480                                    (Long256Mask) m);  // specialize
481     }
482 
483     @Override
484     @ForceInline
485     public Long256Vector selectFrom(Vector<Long> v) {
486         return (Long256Vector)
487             super.selectFromTemplate((Long256Vector) v);  // specialize
488     }
489 
490     @Override
491     @ForceInline
492     public Long256Vector selectFrom(Vector<Long> v,
493                                    VectorMask<Long> m) {
494         return (Long256Vector)
495             super.selectFromTemplate((Long256Vector) v,
496                                      (Long256Mask) m);  // specialize
497     }
498 
499 
500     @ForceInline
501     @Override
502     public long lane(int i) {

642                 this, species,
643                 (m, s) -> s.maskFactory(m.toArray()).check(s));
644         }
645 
646         @Override
647         @ForceInline
648         public Long256Mask eq(VectorMask<Long> mask) {
649             Objects.requireNonNull(mask);
650             Long256Mask m = (Long256Mask)mask;
651             return xor(m.not());
652         }
653 
654         // Unary operations
655 
656         @Override
657         @ForceInline
658         public Long256Mask not() {
659             return xor(maskAll(true));
660         }
661 
662         @Override
663         @ForceInline
664         public Long256Mask compress() {
665             return (Long256Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
666                 Long256Vector.class, Long256Mask.class, ETYPE, VLENGTH, null, this,
667                 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
668         }
669 
670 
671         // Binary operations
672 
673         @Override
674         @ForceInline
675         public Long256Mask and(VectorMask<Long> mask) {
676             Objects.requireNonNull(mask);
677             Long256Mask m = (Long256Mask)mask;
678             return VectorSupport.binaryOp(VECTOR_OP_AND, Long256Mask.class, null, long.class, VLENGTH,
679                                           this, m, null,
680                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
681         }
682 
683         @Override
684         @ForceInline
685         public Long256Mask or(VectorMask<Long> mask) {
686             Objects.requireNonNull(mask);
687             Long256Mask m = (Long256Mask)mask;
688             return VectorSupport.binaryOp(VECTOR_OP_OR, Long256Mask.class, null, long.class, VLENGTH,
689                                           this, m, null,
690                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

843 
844     @ForceInline
845     @Override
846     final
847     LongVector fromArray0(long[] a, int offset, VectorMask<Long> m) {
848         return super.fromArray0Template(Long256Mask.class, a, offset, (Long256Mask) m);  // specialize
849     }
850 
851     @ForceInline
852     @Override
853     final
854     LongVector fromArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
855         return super.fromArray0Template(Long256Mask.class, a, offset, indexMap, mapOffset, (Long256Mask) m);
856     }
857 
858 
859 
860     @ForceInline
861     @Override
862     final
863     LongVector fromMemorySegment0(MemorySegment ms, long offset) {
864         return super.fromMemorySegment0Template(ms, offset);  // specialize
865     }
866 
867     @ForceInline
868     @Override
869     final
870     LongVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Long> m) {
871         return super.fromMemorySegment0Template(Long256Mask.class, ms, offset, (Long256Mask) m);  // specialize














872     }
873 
874     @ForceInline
875     @Override
876     final
877     void intoArray0(long[] a, int offset) {
878         super.intoArray0Template(a, offset);  // specialize
879     }
880 
881     @ForceInline
882     @Override
883     final
884     void intoArray0(long[] a, int offset, VectorMask<Long> m) {
885         super.intoArray0Template(Long256Mask.class, a, offset, (Long256Mask) m);
886     }
887 
888     @ForceInline
889     @Override
890     final
891     void intoArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
892         super.intoArray0Template(Long256Mask.class, a, offset, indexMap, mapOffset, (Long256Mask) m);
893     }
894 
895 
896     @ForceInline
897     @Override
898     final
899     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Long> m) {
900         super.intoMemorySegment0Template(Long256Mask.class, ms, offset, (Long256Mask) m);














901     }
902 
903 
904     // End of specialized low-level memory operations.
905 
906     // ================================================
907 
908 }
< prev index next >