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