< prev index next >

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

Print this page
rev 55237 : javadoc changes


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


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




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













 857     public double mulAll() {
 858         long bits = (long) VectorIntrinsics.reductionCoerced(
 859                                 VECTOR_OP_MUL, Double64Vector.class, double.class, LENGTH,
 860                                 this,
 861                                 v -> {
 862                                     double r = v.rOp((double) 1, (i, a, b) -> (double) (a * b));
 863                                     return (long)Double.doubleToLongBits(r);
 864                                 });
 865         return Double.longBitsToDouble(bits);
 866     }
 867 
 868     @Override
 869     @ForceInline
 870     public double minAll() {
 871         long bits = (long) VectorIntrinsics.reductionCoerced(
 872                                 VECTOR_OP_MIN, Double64Vector.class, double.class, LENGTH,
 873                                 this,
 874                                 v -> {
 875                                     double r = v.rOp(Double.MAX_VALUE , (i, a, b) -> (double) Math.min(a, b));
 876                                     return (long)Double.doubleToLongBits(r);


 879     }
 880 
 881     @Override
 882     @ForceInline
 883     public double maxAll() {
 884         long bits = (long) VectorIntrinsics.reductionCoerced(
 885                                 VECTOR_OP_MAX, Double64Vector.class, double.class, LENGTH,
 886                                 this,
 887                                 v -> {
 888                                     double r = v.rOp(Double.MIN_VALUE , (i, a, b) -> (double) Math.max(a, b));
 889                                     return (long)Double.doubleToLongBits(r);
 890                                 });
 891         return Double.longBitsToDouble(bits);
 892     }
 893 
 894 
 895     @Override
 896     @ForceInline
 897     public double addAll(Mask<Double> m) {
 898         return blend(SPECIES.broadcast((double) 0), m).addAll();






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


< prev index next >