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 double addAll() {
847 long bits = (long) VectorIntrinsics.reductionCoerced(
848 VECTOR_OP_ADD, Double512Vector.class, double.class, LENGTH,
849 this,
850 v -> {
851 double r = v.rOp((double) 0, (i, a, b) -> (double) (a + b));
852 return (long)Double.doubleToLongBits(r);
853 });
854 return Double.longBitsToDouble(bits);
855 }
856
857 @Override
858 @ForceInline
859 public double subAll() {
860 long bits = (long) VectorIntrinsics.reductionCoerced(
861 VECTOR_OP_SUB, Double512Vector.class, double.class, LENGTH,
862 this,
863 v -> {
864 double r = v.rOp((double) 0, (i, a, b) -> (double) (a - b));
865 return (long)Double.doubleToLongBits(r);
866 });
867 return Double.longBitsToDouble(bits);
868 }
869
870 @Override
871 @ForceInline
872 public double mulAll() {
873 long bits = (long) VectorIntrinsics.reductionCoerced(
874 VECTOR_OP_MUL, Double512Vector.class, double.class, LENGTH,
875 this,
876 v -> {
877 double r = v.rOp((double) 1, (i, a, b) -> (double) (a * b));
878 return (long)Double.doubleToLongBits(r);
879 });
880 return Double.longBitsToDouble(bits);
881 }
882
883 @Override
884 @ForceInline
885 public double minAll() {
886 long bits = (long) VectorIntrinsics.reductionCoerced(
887 VECTOR_OP_MIN, Double512Vector.class, double.class, LENGTH,
888 this,
889 v -> {
890 double r = v.rOp(Double.MAX_VALUE , (i, a, b) -> (double) Math.min(a, b));
891 return (long)Double.doubleToLongBits(r);
894 }
895
896 @Override
897 @ForceInline
898 public double maxAll() {
899 long bits = (long) VectorIntrinsics.reductionCoerced(
900 VECTOR_OP_MAX, Double512Vector.class, double.class, LENGTH,
901 this,
902 v -> {
903 double r = v.rOp(Double.MIN_VALUE , (i, a, b) -> (double) Math.max(a, b));
904 return (long)Double.doubleToLongBits(r);
905 });
906 return Double.longBitsToDouble(bits);
907 }
908
909
910 @Override
911 @ForceInline
912 public double addAll(Mask<Double> m) {
913 return blend(SPECIES.broadcast((double) 0), m).addAll();
914 }
915
916 @Override
917 @ForceInline
918 public double subAll(Mask<Double> m) {
919 return blend(SPECIES.broadcast((double) 0), m).subAll();
920 }
921
922 @Override
923 @ForceInline
924 public double mulAll(Mask<Double> m) {
925 return blend(SPECIES.broadcast((double) 1), m).mulAll();
926 }
927
928 @Override
929 @ForceInline
930 public double minAll(Mask<Double> m) {
931 return blend(SPECIES.broadcast(Double.MAX_VALUE), m).minAll();
932 }
933
934 @Override
935 @ForceInline
936 public double maxAll(Mask<Double> m) {
937 return blend(SPECIES.broadcast(Double.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 double addAll() {
847 long bits = (long) VectorIntrinsics.reductionCoerced(
848 VECTOR_OP_ADD, Double512Vector.class, double.class, LENGTH,
849 this,
850 v -> {
851 double r = v.rOp((double) 0, (i, a, b) -> (double) (a + b));
852 return (long)Double.doubleToLongBits(r);
853 });
854 return Double.longBitsToDouble(bits);
855 }
856
857 @Override
858 @ForceInline
859 public double mulAll() {
860 long bits = (long) VectorIntrinsics.reductionCoerced(
861 VECTOR_OP_MUL, Double512Vector.class, double.class, LENGTH,
862 this,
863 v -> {
864 double r = v.rOp((double) 1, (i, a, b) -> (double) (a * b));
865 return (long)Double.doubleToLongBits(r);
866 });
867 return Double.longBitsToDouble(bits);
868 }
869
870 @Override
871 @ForceInline
872 public double minAll() {
873 long bits = (long) VectorIntrinsics.reductionCoerced(
874 VECTOR_OP_MIN, Double512Vector.class, double.class, LENGTH,
875 this,
876 v -> {
877 double r = v.rOp(Double.MAX_VALUE , (i, a, b) -> (double) Math.min(a, b));
878 return (long)Double.doubleToLongBits(r);
881 }
882
883 @Override
884 @ForceInline
885 public double maxAll() {
886 long bits = (long) VectorIntrinsics.reductionCoerced(
887 VECTOR_OP_MAX, Double512Vector.class, double.class, LENGTH,
888 this,
889 v -> {
890 double r = v.rOp(Double.MIN_VALUE , (i, a, b) -> (double) Math.max(a, b));
891 return (long)Double.doubleToLongBits(r);
892 });
893 return Double.longBitsToDouble(bits);
894 }
895
896
897 @Override
898 @ForceInline
899 public double addAll(Mask<Double> m) {
900 return blend(SPECIES.broadcast((double) 0), m).addAll();
901 }
902
903 @Override
904 @ForceInline
905 public double mulAll(Mask<Double> m) {
906 return blend(SPECIES.broadcast((double) 1), m).mulAll();
907 }
908
909 @Override
910 @ForceInline
911 public double minAll(Mask<Double> m) {
912 return blend(SPECIES.broadcast(Double.MAX_VALUE), m).minAll();
913 }
914
915 @Override
916 @ForceInline
917 public double maxAll(Mask<Double> m) {
918 return blend(SPECIES.broadcast(Double.MIN_VALUE), m).maxAll();
919 }
920
|