< prev index next >

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

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
















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

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









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

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

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

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

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

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














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














897     }
898 
899 
900     // End of specialized low-level memory operations.
901 
902     // ================================================
903 
904 }
< prev index next >