< prev index next >

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

444     @ForceInline
445     public Float512Vector rearrange(VectorShuffle<Float> shuffle,
446                                   VectorMask<Float> m) {
447         return (Float512Vector)
448             super.rearrangeTemplate(Float512Shuffle.class,
449                                     Float512Mask.class,
450                                     (Float512Shuffle) shuffle,
451                                     (Float512Mask) m);  // specialize
452     }
453 
454     @Override
455     @ForceInline
456     public Float512Vector rearrange(VectorShuffle<Float> s,
457                                   Vector<Float> v) {
458         return (Float512Vector)
459             super.rearrangeTemplate(Float512Shuffle.class,
460                                     (Float512Shuffle) s,
461                                     (Float512Vector) v);  // specialize
462     }
463 
















464     @Override
465     @ForceInline
466     public Float512Vector selectFrom(Vector<Float> v) {
467         return (Float512Vector)
468             super.selectFromTemplate((Float512Vector) v);  // specialize
469     }
470 
471     @Override
472     @ForceInline
473     public Float512Vector selectFrom(Vector<Float> v,
474                                    VectorMask<Float> m) {
475         return (Float512Vector)
476             super.selectFromTemplate((Float512Vector) v,
477                                      (Float512Mask) m);  // specialize
478     }
479 
480 
481     @ForceInline
482     @Override
483     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 Float512Mask eq(VectorMask<Float> mask) {
656             Objects.requireNonNull(mask);
657             Float512Mask m = (Float512Mask)mask;
658             return xor(m.not());
659         }
660 
661         // Unary operations
662 
663         @Override
664         @ForceInline
665         public Float512Mask not() {
666             return xor(maskAll(true));
667         }
668 









669         // Binary operations
670 
671         @Override
672         @ForceInline
673         public Float512Mask and(VectorMask<Float> mask) {
674             Objects.requireNonNull(mask);
675             Float512Mask m = (Float512Mask)mask;
676             return VectorSupport.binaryOp(VECTOR_OP_AND, Float512Mask.class, null, int.class, VLENGTH,
677                                           this, m, null,
678                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
679         }
680 
681         @Override
682         @ForceInline
683         public Float512Mask or(VectorMask<Float> mask) {
684             Objects.requireNonNull(mask);
685             Float512Mask m = (Float512Mask)mask;
686             return VectorSupport.binaryOp(VECTOR_OP_OR, Float512Mask.class, null, int.class, VLENGTH,
687                                           this, m, null,
688                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

841 
842     @ForceInline
843     @Override
844     final
845     FloatVector fromArray0(float[] a, int offset, VectorMask<Float> m) {
846         return super.fromArray0Template(Float512Mask.class, a, offset, (Float512Mask) m);  // specialize
847     }
848 
849     @ForceInline
850     @Override
851     final
852     FloatVector fromArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
853         return super.fromArray0Template(Float512Mask.class, a, offset, indexMap, mapOffset, (Float512Mask) m);
854     }
855 
856 
857 
858     @ForceInline
859     @Override
860     final
861     FloatVector fromByteArray0(byte[] a, int offset) {
862         return super.fromByteArray0Template(a, offset);  // specialize
863     }
864 
865     @ForceInline
866     @Override
867     final
868     FloatVector fromByteArray0(byte[] a, int offset, VectorMask<Float> m) {
869         return super.fromByteArray0Template(Float512Mask.class, a, offset, (Float512Mask) m);  // specialize
870     }
871 
872     @ForceInline
873     @Override
874     final
875     FloatVector fromByteBuffer0(ByteBuffer bb, int offset) {
876         return super.fromByteBuffer0Template(bb, offset);  // specialize
877     }
878 
879     @ForceInline
880     @Override
881     final
882     FloatVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Float> m) {
883         return super.fromByteBuffer0Template(Float512Mask.class, bb, offset, (Float512Mask) m);  // specialize
884     }
885 
886     @ForceInline
887     @Override
888     final
889     void intoArray0(float[] a, int offset) {
890         super.intoArray0Template(a, offset);  // specialize
891     }
892 
893     @ForceInline
894     @Override
895     final
896     void intoArray0(float[] a, int offset, VectorMask<Float> m) {
897         super.intoArray0Template(Float512Mask.class, a, offset, (Float512Mask) m);
898     }
899 
900     @ForceInline
901     @Override
902     final
903     void intoArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
904         super.intoArray0Template(Float512Mask.class, a, offset, indexMap, mapOffset, (Float512Mask) m);
905     }
906 
907 
908     @ForceInline
909     @Override
910     final
911     void intoByteArray0(byte[] a, int offset) {
912         super.intoByteArray0Template(a, offset);  // specialize
913     }
914 
915     @ForceInline
916     @Override
917     final
918     void intoByteArray0(byte[] a, int offset, VectorMask<Float> m) {
919         super.intoByteArray0Template(Float512Mask.class, a, offset, (Float512Mask) m);  // specialize
920     }
921 
922     @ForceInline
923     @Override
924     final
925     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Float> m) {
926         super.intoByteBuffer0Template(Float512Mask.class, bb, offset, (Float512Mask) m);
927     }
928 
929 
930     // End of specialized low-level memory operations.
931 
932     // ================================================
933 
934 }

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

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

665                 this, species,
666                 (m, s) -> s.maskFactory(m.toArray()).check(s));
667         }
668 
669         @Override
670         @ForceInline
671         public Float512Mask eq(VectorMask<Float> mask) {
672             Objects.requireNonNull(mask);
673             Float512Mask m = (Float512Mask)mask;
674             return xor(m.not());
675         }
676 
677         // Unary operations
678 
679         @Override
680         @ForceInline
681         public Float512Mask not() {
682             return xor(maskAll(true));
683         }
684 
685         @Override
686         @ForceInline
687         public Float512Mask compress() {
688             return (Float512Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
689                 Float512Vector.class, Float512Mask.class, ETYPE, VLENGTH, null, this,
690                 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
691         }
692 
693 
694         // Binary operations
695 
696         @Override
697         @ForceInline
698         public Float512Mask and(VectorMask<Float> mask) {
699             Objects.requireNonNull(mask);
700             Float512Mask m = (Float512Mask)mask;
701             return VectorSupport.binaryOp(VECTOR_OP_AND, Float512Mask.class, null, int.class, VLENGTH,
702                                           this, m, null,
703                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
704         }
705 
706         @Override
707         @ForceInline
708         public Float512Mask or(VectorMask<Float> mask) {
709             Objects.requireNonNull(mask);
710             Float512Mask m = (Float512Mask)mask;
711             return VectorSupport.binaryOp(VECTOR_OP_OR, Float512Mask.class, null, int.class, VLENGTH,
712                                           this, m, null,
713                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

866 
867     @ForceInline
868     @Override
869     final
870     FloatVector fromArray0(float[] a, int offset, VectorMask<Float> m) {
871         return super.fromArray0Template(Float512Mask.class, a, offset, (Float512Mask) m);  // specialize
872     }
873 
874     @ForceInline
875     @Override
876     final
877     FloatVector fromArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
878         return super.fromArray0Template(Float512Mask.class, a, offset, indexMap, mapOffset, (Float512Mask) m);
879     }
880 
881 
882 
883     @ForceInline
884     @Override
885     final
886     FloatVector fromMemorySegment0(MemorySegment ms, long offset) {
887         return super.fromMemorySegment0Template(ms, offset);  // specialize
888     }
889 
890     @ForceInline
891     @Override
892     final
893     FloatVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Float> m) {
894         return super.fromMemorySegment0Template(Float512Mask.class, ms, offset, (Float512Mask) m);  // specialize














895     }
896 
897     @ForceInline
898     @Override
899     final
900     void intoArray0(float[] a, int offset) {
901         super.intoArray0Template(a, offset);  // specialize
902     }
903 
904     @ForceInline
905     @Override
906     final
907     void intoArray0(float[] a, int offset, VectorMask<Float> m) {
908         super.intoArray0Template(Float512Mask.class, a, offset, (Float512Mask) m);
909     }
910 
911     @ForceInline
912     @Override
913     final
914     void intoArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
915         super.intoArray0Template(Float512Mask.class, a, offset, indexMap, mapOffset, (Float512Mask) m);
916     }
917 
918 
919     @ForceInline
920     @Override
921     final
922     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Float> m) {
923         super.intoMemorySegment0Template(Float512Mask.class, ms, offset, (Float512Mask) m);














924     }
925 
926 
927     // End of specialized low-level memory operations.
928 
929     // ================================================
930 
931 }
< prev index next >