< prev index next >

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

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
















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

634                 this, species,
635                 (m, s) -> s.maskFactory(m.toArray()).check(s));
636         }
637 
638         @Override
639         @ForceInline
640         public Long512Mask eq(VectorMask<Long> mask) {
641             Objects.requireNonNull(mask);
642             Long512Mask m = (Long512Mask)mask;
643             return xor(m.not());
644         }
645 
646         // Unary operations
647 
648         @Override
649         @ForceInline
650         public Long512Mask not() {
651             return xor(maskAll(true));
652         }
653 









654         // Binary operations
655 
656         @Override
657         @ForceInline
658         public Long512Mask and(VectorMask<Long> mask) {
659             Objects.requireNonNull(mask);
660             Long512Mask m = (Long512Mask)mask;
661             return VectorSupport.binaryOp(VECTOR_OP_AND, Long512Mask.class, null, long.class, VLENGTH,
662                                           this, m, null,
663                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
664         }
665 
666         @Override
667         @ForceInline
668         public Long512Mask or(VectorMask<Long> mask) {
669             Objects.requireNonNull(mask);
670             Long512Mask m = (Long512Mask)mask;
671             return VectorSupport.binaryOp(VECTOR_OP_OR, Long512Mask.class, null, long.class, VLENGTH,
672                                           this, m, null,
673                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

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

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

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

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

851 
852     @ForceInline
853     @Override
854     final
855     LongVector fromArray0(long[] a, int offset, VectorMask<Long> m) {
856         return super.fromArray0Template(Long512Mask.class, a, offset, (Long512Mask) m);  // specialize
857     }
858 
859     @ForceInline
860     @Override
861     final
862     LongVector fromArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
863         return super.fromArray0Template(Long512Mask.class, a, offset, indexMap, mapOffset, (Long512Mask) m);
864     }
865 
866 
867 
868     @ForceInline
869     @Override
870     final
871     LongVector fromMemorySegment0(MemorySegment ms, long offset) {
872         return super.fromMemorySegment0Template(ms, offset);  // specialize
873     }
874 
875     @ForceInline
876     @Override
877     final
878     LongVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Long> m) {
879         return super.fromMemorySegment0Template(Long512Mask.class, ms, offset, (Long512Mask) m);  // specialize














880     }
881 
882     @ForceInline
883     @Override
884     final
885     void intoArray0(long[] a, int offset) {
886         super.intoArray0Template(a, offset);  // specialize
887     }
888 
889     @ForceInline
890     @Override
891     final
892     void intoArray0(long[] a, int offset, VectorMask<Long> m) {
893         super.intoArray0Template(Long512Mask.class, a, offset, (Long512Mask) m);
894     }
895 
896     @ForceInline
897     @Override
898     final
899     void intoArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
900         super.intoArray0Template(Long512Mask.class, a, offset, indexMap, mapOffset, (Long512Mask) m);
901     }
902 
903 
904     @ForceInline
905     @Override
906     final
907     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Long> m) {
908         super.intoMemorySegment0Template(Long512Mask.class, ms, offset, (Long512Mask) m);














909     }
910 
911 
912     // End of specialized low-level memory operations.
913 
914     // ================================================
915 
916 }
< prev index next >