|
48 | 48 | #define USE_NUMPY_2 |
49 | 49 | #endif |
50 | 50 |
|
51 | | -/* Adapated from NumPy's source code. |
| 51 | +/* Adapted from NumPy's source code. |
52 | 52 | * https://github.com/numpy/numpy/blob/main/LICENSE.txt */ |
53 | 53 |
|
54 | 54 | /* |
@@ -835,36 +835,6 @@ mkl_umath_@TYPE@_@kind@(char **args, const npy_intp *dimensions, const npy_intp |
835 | 835 | } |
836 | 836 | /**end repeat1**/ |
837 | 837 |
|
838 | | -void |
839 | | -mkl_umath_@TYPE@_remainder(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)) |
840 | | -{ |
841 | | - const int contig = IS_BINARY_CONT(@type@, @type@); |
842 | | - const int disjoint_or_same1 = DISJOINT_OR_SAME(args[0], args[2], dimensions[0], sizeof(@type@)); |
843 | | - const int disjoint_or_same2 = DISJOINT_OR_SAME(args[1], args[2], dimensions[0], sizeof(@type@)); |
844 | | - const int can_vectorize = contig && disjoint_or_same1 && disjoint_or_same2; |
845 | | - int ignore_fpstatus = 0; |
846 | | - |
847 | | - if (can_vectorize && dimensions[0] > VML_TRANSCEDENTAL_THRESHOLD) { |
848 | | - ignore_fpstatus = 1; |
849 | | - CHUNKED_VML_CALL3(v@s@Remainder, dimensions[0], @type@, args[0], args[1], args[2]); |
850 | | - /* v@s@Remainder(dimensions[0], (@type@*) args[0], (@type@*) args[1], (@type@*) args[2]); */ |
851 | | - } |
852 | | - else { |
853 | | - BINARY_LOOP { |
854 | | - const @type@ in1 = *(@type@ *)ip1; |
855 | | - const @type@ in2 = *(@type@ *)ip2; |
856 | | - int invalid_cases = !npy_isnan(in1) && in2 == 0; |
857 | | - invalid_cases |= (in1 == NPY_INFINITY || in1 == -NPY_INFINITY) && !npy_isnan(in2); |
858 | | - invalid_cases |= (in1 != NPY_INFINITY && in1 != -NPY_INFINITY) && (in2 == NPY_INFINITY || in2 == -NPY_INFINITY); |
859 | | - ignore_fpstatus |= invalid_cases; |
860 | | - divmod@c@(in1, in2, (@type@ *)op1); |
861 | | - } |
862 | | - } |
863 | | - if (ignore_fpstatus) { |
864 | | - feclearexcept(FE_UNDERFLOW | FE_INVALID); |
865 | | - } |
866 | | -} |
867 | | - |
868 | 838 | /**begin repeat1 |
869 | 839 | * # kind = cos, sin, tan, arccos, arcsin, arctan, cosh, sinh, tanh, arccosh, arcsinh, arctanh, fabs, floor, ceil, rint, trunc, cbrt, sqrt, expm1, log, log2, log1p, log10# |
870 | 840 | * # func = cos, sin, tan, acos, asin, atan, cosh, sinh, tanh, acosh, asinh, atanh, fabs, floor, ceil, rint, trunc, cbrt, sqrt, expm1, log, log2, log1p, log10# |
|
0 commit comments