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