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 Long64Vector extends LongVector {
43 static final LongSpecies VSPECIES =
44 (LongSpecies) LongVector.SPECIES_64;
45
46 static final VectorShape VSHAPE =
47 VSPECIES.vectorShape();
48
49 static final Class<Long64Vector> VCLASS = Long64Vector.class;
50
51 static final int VSIZE = VSPECIES.vectorBitSize();
447 @ForceInline
448 public Long64Vector rearrange(VectorShuffle<Long> shuffle,
449 VectorMask<Long> m) {
450 return (Long64Vector)
451 super.rearrangeTemplate(Long64Shuffle.class,
452 Long64Mask.class,
453 (Long64Shuffle) shuffle,
454 (Long64Mask) m); // specialize
455 }
456
457 @Override
458 @ForceInline
459 public Long64Vector rearrange(VectorShuffle<Long> s,
460 Vector<Long> v) {
461 return (Long64Vector)
462 super.rearrangeTemplate(Long64Shuffle.class,
463 (Long64Shuffle) s,
464 (Long64Vector) v); // specialize
465 }
466
467 @Override
468 @ForceInline
469 public Long64Vector selectFrom(Vector<Long> v) {
470 return (Long64Vector)
471 super.selectFromTemplate((Long64Vector) v); // specialize
472 }
473
474 @Override
475 @ForceInline
476 public Long64Vector selectFrom(Vector<Long> v,
477 VectorMask<Long> m) {
478 return (Long64Vector)
479 super.selectFromTemplate((Long64Vector) v,
480 (Long64Mask) m); // specialize
481 }
482
483
484 @ForceInline
485 @Override
486 public long lane(int i) {
620 this, species,
621 (m, s) -> s.maskFactory(m.toArray()).check(s));
622 }
623
624 @Override
625 @ForceInline
626 public Long64Mask eq(VectorMask<Long> mask) {
627 Objects.requireNonNull(mask);
628 Long64Mask m = (Long64Mask)mask;
629 return xor(m.not());
630 }
631
632 // Unary operations
633
634 @Override
635 @ForceInline
636 public Long64Mask not() {
637 return xor(maskAll(true));
638 }
639
640 // Binary operations
641
642 @Override
643 @ForceInline
644 public Long64Mask and(VectorMask<Long> mask) {
645 Objects.requireNonNull(mask);
646 Long64Mask m = (Long64Mask)mask;
647 return VectorSupport.binaryOp(VECTOR_OP_AND, Long64Mask.class, null, long.class, VLENGTH,
648 this, m, null,
649 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
650 }
651
652 @Override
653 @ForceInline
654 public Long64Mask or(VectorMask<Long> mask) {
655 Objects.requireNonNull(mask);
656 Long64Mask m = (Long64Mask)mask;
657 return VectorSupport.binaryOp(VECTOR_OP_OR, Long64Mask.class, null, long.class, VLENGTH,
658 this, m, null,
659 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
812
813 @ForceInline
814 @Override
815 final
816 LongVector fromArray0(long[] a, int offset, VectorMask<Long> m) {
817 return super.fromArray0Template(Long64Mask.class, a, offset, (Long64Mask) m); // specialize
818 }
819
820 @ForceInline
821 @Override
822 final
823 LongVector fromArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
824 return super.fromArray0Template(Long64Mask.class, a, offset, indexMap, mapOffset, (Long64Mask) m);
825 }
826
827
828
829 @ForceInline
830 @Override
831 final
832 LongVector fromByteArray0(byte[] a, int offset) {
833 return super.fromByteArray0Template(a, offset); // specialize
834 }
835
836 @ForceInline
837 @Override
838 final
839 LongVector fromByteArray0(byte[] a, int offset, VectorMask<Long> m) {
840 return super.fromByteArray0Template(Long64Mask.class, a, offset, (Long64Mask) m); // specialize
841 }
842
843 @ForceInline
844 @Override
845 final
846 LongVector fromByteBuffer0(ByteBuffer bb, int offset) {
847 return super.fromByteBuffer0Template(bb, offset); // specialize
848 }
849
850 @ForceInline
851 @Override
852 final
853 LongVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Long> m) {
854 return super.fromByteBuffer0Template(Long64Mask.class, bb, offset, (Long64Mask) m); // specialize
855 }
856
857 @ForceInline
858 @Override
859 final
860 void intoArray0(long[] a, int offset) {
861 super.intoArray0Template(a, offset); // specialize
862 }
863
864 @ForceInline
865 @Override
866 final
867 void intoArray0(long[] a, int offset, VectorMask<Long> m) {
868 super.intoArray0Template(Long64Mask.class, a, offset, (Long64Mask) m);
869 }
870
871 @ForceInline
872 @Override
873 final
874 void intoArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
875 super.intoArray0Template(Long64Mask.class, a, offset, indexMap, mapOffset, (Long64Mask) m);
876 }
877
878
879 @ForceInline
880 @Override
881 final
882 void intoByteArray0(byte[] a, int offset) {
883 super.intoByteArray0Template(a, offset); // specialize
884 }
885
886 @ForceInline
887 @Override
888 final
889 void intoByteArray0(byte[] a, int offset, VectorMask<Long> m) {
890 super.intoByteArray0Template(Long64Mask.class, a, offset, (Long64Mask) m); // specialize
891 }
892
893 @ForceInline
894 @Override
895 final
896 void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Long> m) {
897 super.intoByteBuffer0Template(Long64Mask.class, bb, offset, (Long64Mask) m);
898 }
899
900
901 // End of specialized low-level memory operations.
902
903 // ================================================
904
905 }
|
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 Long64Vector extends LongVector {
43 static final LongSpecies VSPECIES =
44 (LongSpecies) LongVector.SPECIES_64;
45
46 static final VectorShape VSHAPE =
47 VSPECIES.vectorShape();
48
49 static final Class<Long64Vector> VCLASS = Long64Vector.class;
50
51 static final int VSIZE = VSPECIES.vectorBitSize();
447 @ForceInline
448 public Long64Vector rearrange(VectorShuffle<Long> shuffle,
449 VectorMask<Long> m) {
450 return (Long64Vector)
451 super.rearrangeTemplate(Long64Shuffle.class,
452 Long64Mask.class,
453 (Long64Shuffle) shuffle,
454 (Long64Mask) m); // specialize
455 }
456
457 @Override
458 @ForceInline
459 public Long64Vector rearrange(VectorShuffle<Long> s,
460 Vector<Long> v) {
461 return (Long64Vector)
462 super.rearrangeTemplate(Long64Shuffle.class,
463 (Long64Shuffle) s,
464 (Long64Vector) v); // specialize
465 }
466
467 @Override
468 @ForceInline
469 public Long64Vector compress(VectorMask<Long> m) {
470 return (Long64Vector)
471 super.compressTemplate(Long64Mask.class,
472 (Long64Mask) m); // specialize
473 }
474
475 @Override
476 @ForceInline
477 public Long64Vector expand(VectorMask<Long> m) {
478 return (Long64Vector)
479 super.expandTemplate(Long64Mask.class,
480 (Long64Mask) m); // specialize
481 }
482
483 @Override
484 @ForceInline
485 public Long64Vector selectFrom(Vector<Long> v) {
486 return (Long64Vector)
487 super.selectFromTemplate((Long64Vector) v); // specialize
488 }
489
490 @Override
491 @ForceInline
492 public Long64Vector selectFrom(Vector<Long> v,
493 VectorMask<Long> m) {
494 return (Long64Vector)
495 super.selectFromTemplate((Long64Vector) v,
496 (Long64Mask) m); // specialize
497 }
498
499
500 @ForceInline
501 @Override
502 public long lane(int i) {
636 this, species,
637 (m, s) -> s.maskFactory(m.toArray()).check(s));
638 }
639
640 @Override
641 @ForceInline
642 public Long64Mask eq(VectorMask<Long> mask) {
643 Objects.requireNonNull(mask);
644 Long64Mask m = (Long64Mask)mask;
645 return xor(m.not());
646 }
647
648 // Unary operations
649
650 @Override
651 @ForceInline
652 public Long64Mask not() {
653 return xor(maskAll(true));
654 }
655
656 @Override
657 @ForceInline
658 public Long64Mask compress() {
659 return (Long64Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
660 Long64Vector.class, Long64Mask.class, ETYPE, VLENGTH, null, this,
661 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
662 }
663
664
665 // Binary operations
666
667 @Override
668 @ForceInline
669 public Long64Mask and(VectorMask<Long> mask) {
670 Objects.requireNonNull(mask);
671 Long64Mask m = (Long64Mask)mask;
672 return VectorSupport.binaryOp(VECTOR_OP_AND, Long64Mask.class, null, long.class, VLENGTH,
673 this, m, null,
674 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
675 }
676
677 @Override
678 @ForceInline
679 public Long64Mask or(VectorMask<Long> mask) {
680 Objects.requireNonNull(mask);
681 Long64Mask m = (Long64Mask)mask;
682 return VectorSupport.binaryOp(VECTOR_OP_OR, Long64Mask.class, null, long.class, VLENGTH,
683 this, m, null,
684 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
837
838 @ForceInline
839 @Override
840 final
841 LongVector fromArray0(long[] a, int offset, VectorMask<Long> m) {
842 return super.fromArray0Template(Long64Mask.class, a, offset, (Long64Mask) m); // specialize
843 }
844
845 @ForceInline
846 @Override
847 final
848 LongVector fromArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
849 return super.fromArray0Template(Long64Mask.class, a, offset, indexMap, mapOffset, (Long64Mask) m);
850 }
851
852
853
854 @ForceInline
855 @Override
856 final
857 LongVector fromMemorySegment0(MemorySegment ms, long offset) {
858 return super.fromMemorySegment0Template(ms, offset); // specialize
859 }
860
861 @ForceInline
862 @Override
863 final
864 LongVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Long> m) {
865 return super.fromMemorySegment0Template(Long64Mask.class, ms, offset, (Long64Mask) m); // specialize
866 }
867
868 @ForceInline
869 @Override
870 final
871 void intoArray0(long[] a, int offset) {
872 super.intoArray0Template(a, offset); // specialize
873 }
874
875 @ForceInline
876 @Override
877 final
878 void intoArray0(long[] a, int offset, VectorMask<Long> m) {
879 super.intoArray0Template(Long64Mask.class, a, offset, (Long64Mask) m);
880 }
881
882 @ForceInline
883 @Override
884 final
885 void intoArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
886 super.intoArray0Template(Long64Mask.class, a, offset, indexMap, mapOffset, (Long64Mask) m);
887 }
888
889
890 @ForceInline
891 @Override
892 final
893 void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Long> m) {
894 super.intoMemorySegment0Template(Long64Mask.class, ms, offset, (Long64Mask) m);
895 }
896
897
898 // End of specialized low-level memory operations.
899
900 // ================================================
901
902 }
|