< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float64Vector.java

Print this page
rev 55237 : javadoc changes


 839             (w1, w2, w3) -> w1.tOp(w2, w3, (i, a, b, c) -> Math.fma(a, b, c)));
 840     }
 841 
 842     // Type specific horizontal reductions
 843 
 844     @Override
 845     @ForceInline
 846     public float addAll() {
 847         int bits = (int) VectorIntrinsics.reductionCoerced(
 848                                 VECTOR_OP_ADD, Float64Vector.class, float.class, LENGTH,
 849                                 this,
 850                                 v -> {
 851                                     float r = v.rOp((float) 0, (i, a, b) -> (float) (a + b));
 852                                     return (long)Float.floatToIntBits(r);
 853                                 });
 854         return Float.intBitsToFloat(bits);
 855     }
 856 
 857     @Override
 858     @ForceInline
 859     public float subAll() {
 860         int bits = (int) VectorIntrinsics.reductionCoerced(
 861                                 VECTOR_OP_SUB, Float64Vector.class, float.class, LENGTH,
 862                                 this,
 863                                 v -> {
 864                                     float r = v.rOp((float) 0, (i, a, b) -> (float) (a - b));
 865                                     return (long)Float.floatToIntBits(r);
 866                                 });
 867         return Float.intBitsToFloat(bits);
 868     }
 869 
 870     @Override
 871     @ForceInline
 872     public float mulAll() {
 873         int bits = (int) VectorIntrinsics.reductionCoerced(
 874                                 VECTOR_OP_MUL, Float64Vector.class, float.class, LENGTH,
 875                                 this,
 876                                 v -> {
 877                                     float r = v.rOp((float) 1, (i, a, b) -> (float) (a * b));
 878                                     return (long)Float.floatToIntBits(r);
 879                                 });
 880         return Float.intBitsToFloat(bits);
 881     }
 882 
 883     @Override
 884     @ForceInline
 885     public float minAll() {
 886         int bits = (int) VectorIntrinsics.reductionCoerced(
 887                                 VECTOR_OP_MIN, Float64Vector.class, float.class, LENGTH,
 888                                 this,
 889                                 v -> {
 890                                     float r = v.rOp(Float.MAX_VALUE , (i, a, b) -> (float) Math.min(a, b));
 891                                     return (long)Float.floatToIntBits(r);


 894     }
 895 
 896     @Override
 897     @ForceInline
 898     public float maxAll() {
 899         int bits = (int) VectorIntrinsics.reductionCoerced(
 900                                 VECTOR_OP_MAX, Float64Vector.class, float.class, LENGTH,
 901                                 this,
 902                                 v -> {
 903                                     float r = v.rOp(Float.MIN_VALUE , (i, a, b) -> (float) Math.max(a, b));
 904                                     return (long)Float.floatToIntBits(r);
 905                                 });
 906         return Float.intBitsToFloat(bits);
 907     }
 908 
 909 
 910     @Override
 911     @ForceInline
 912     public float addAll(Mask<Float> m) {
 913         return blend(SPECIES.broadcast((float) 0), m).addAll();
 914     }
 915 
 916     @Override
 917     @ForceInline
 918     public float subAll(Mask<Float> m) {
 919         return blend(SPECIES.broadcast((float) 0), m).subAll();
 920     }
 921 
 922     @Override
 923     @ForceInline
 924     public float mulAll(Mask<Float> m) {
 925         return blend(SPECIES.broadcast((float) 1), m).mulAll();
 926     }
 927 
 928     @Override
 929     @ForceInline
 930     public float minAll(Mask<Float> m) {
 931         return blend(SPECIES.broadcast(Float.MAX_VALUE), m).minAll();
 932     }
 933 
 934     @Override
 935     @ForceInline
 936     public float maxAll(Mask<Float> m) {
 937         return blend(SPECIES.broadcast(Float.MIN_VALUE), m).maxAll();
 938     }
 939 




 839             (w1, w2, w3) -> w1.tOp(w2, w3, (i, a, b, c) -> Math.fma(a, b, c)));
 840     }
 841 
 842     // Type specific horizontal reductions
 843 
 844     @Override
 845     @ForceInline
 846     public float addAll() {
 847         int bits = (int) VectorIntrinsics.reductionCoerced(
 848                                 VECTOR_OP_ADD, Float64Vector.class, float.class, LENGTH,
 849                                 this,
 850                                 v -> {
 851                                     float r = v.rOp((float) 0, (i, a, b) -> (float) (a + b));
 852                                     return (long)Float.floatToIntBits(r);
 853                                 });
 854         return Float.intBitsToFloat(bits);
 855     }
 856 
 857     @Override
 858     @ForceInline













 859     public float mulAll() {
 860         int bits = (int) VectorIntrinsics.reductionCoerced(
 861                                 VECTOR_OP_MUL, Float64Vector.class, float.class, LENGTH,
 862                                 this,
 863                                 v -> {
 864                                     float r = v.rOp((float) 1, (i, a, b) -> (float) (a * b));
 865                                     return (long)Float.floatToIntBits(r);
 866                                 });
 867         return Float.intBitsToFloat(bits);
 868     }
 869 
 870     @Override
 871     @ForceInline
 872     public float minAll() {
 873         int bits = (int) VectorIntrinsics.reductionCoerced(
 874                                 VECTOR_OP_MIN, Float64Vector.class, float.class, LENGTH,
 875                                 this,
 876                                 v -> {
 877                                     float r = v.rOp(Float.MAX_VALUE , (i, a, b) -> (float) Math.min(a, b));
 878                                     return (long)Float.floatToIntBits(r);


 881     }
 882 
 883     @Override
 884     @ForceInline
 885     public float maxAll() {
 886         int bits = (int) VectorIntrinsics.reductionCoerced(
 887                                 VECTOR_OP_MAX, Float64Vector.class, float.class, LENGTH,
 888                                 this,
 889                                 v -> {
 890                                     float r = v.rOp(Float.MIN_VALUE , (i, a, b) -> (float) Math.max(a, b));
 891                                     return (long)Float.floatToIntBits(r);
 892                                 });
 893         return Float.intBitsToFloat(bits);
 894     }
 895 
 896 
 897     @Override
 898     @ForceInline
 899     public float addAll(Mask<Float> m) {
 900         return blend(SPECIES.broadcast((float) 0), m).addAll();






 901     }
 902 
 903     @Override
 904     @ForceInline
 905     public float mulAll(Mask<Float> m) {
 906         return blend(SPECIES.broadcast((float) 1), m).mulAll();
 907     }
 908 
 909     @Override
 910     @ForceInline
 911     public float minAll(Mask<Float> m) {
 912         return blend(SPECIES.broadcast(Float.MAX_VALUE), m).minAll();
 913     }
 914 
 915     @Override
 916     @ForceInline
 917     public float maxAll(Mask<Float> m) {
 918         return blend(SPECIES.broadcast(Float.MIN_VALUE), m).maxAll();
 919     }
 920 


< prev index next >