From 2d325ab69eed246ff713dcd203f691964664351a Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Thu, 8 May 2025 17:53:29 -0700 Subject: [PATCH] remove unused functions --- mkl_umath/src/mkl_umath_loops.c.src | 97 ----------------------------- mkl_umath/src/mkl_umath_loops.h.src | 32 ---------- 2 files changed, 129 deletions(-) diff --git a/mkl_umath/src/mkl_umath_loops.c.src b/mkl_umath/src/mkl_umath_loops.c.src index 2f2d8a9..09c6a86 100644 --- a/mkl_umath/src/mkl_umath_loops.c.src +++ b/mkl_umath/src/mkl_umath_loops.c.src @@ -255,39 +255,6 @@ mkl_umath_@TYPE@_sqrt(char **args, const npy_intp *dimensions, const npy_intp *s /**end repeat**/ -/**begin repeat - * Float types - * #type = npy_float, npy_double# - * #TYPE = FLOAT, DOUBLE# - * #c = s, d# - * #scalarf = (1.0f)/sqrtf, (1.0)/sqrt# - */ - -void -mkl_umath_@TYPE@_invsqrt(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)) -{ - const int contig = IS_UNARY_CONT(@type@, @type@); - const int disjoint_or_same = DISJOINT_OR_SAME(args[0], args[1], dimensions[0], sizeof(@type@)); - const int can_vectorize = contig && disjoint_or_same; - - if(can_vectorize && dimensions[0] > VML_TRANSCEDENTAL_THRESHOLD) - { - CHUNKED_VML_CALL2(v@c@InvSqrt, dimensions[0], @type@, args[0], args[1]); - /* v@c@InvSqrt(dimensions[0], (@type@*) args[0], (@type@*) args[1]); */ - } else { - UNARY_LOOP_DISPATCH( - @type@, @type@ - , - can_vectorize - , - const @type@ in1 = *(@type@ *)ip1; - *(@type@ *)op1 = @scalarf@(in1); - ) - } -} - -/**end repeat**/ - /**begin repeat * Float types * #type = npy_float, npy_double# @@ -400,39 +367,6 @@ mkl_umath_@TYPE@_expm1(char **args, const npy_intp *dimensions, const npy_intp * /**end repeat**/ -/**begin repeat - * Float types - * #type = npy_float, npy_double# - * #TYPE = FLOAT, DOUBLE# - * #c = s, d# - * #scalarf = erff, erf# - */ - -void -mkl_umath_@TYPE@_erf(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)) -{ - const int contig = IS_UNARY_CONT(@type@, @type@); - const int disjoint_or_same = DISJOINT_OR_SAME(args[0], args[1], dimensions[0], sizeof(@type@)); - const int can_vectorize = contig && disjoint_or_same; - - if( can_vectorize && dimensions[0] > VML_TRANSCEDENTAL_THRESHOLD) - { - CHUNKED_VML_CALL2(v@c@Erf, dimensions[0], @type@, args[0], args[1]); - /* v@c@Erf(dimensions[0], (@type@*) args[0], (@type@*) args[1]); */ - } else { - UNARY_LOOP_DISPATCH( - @type@, @type@ - , - can_vectorize - , - const @type@ in1 = *(@type@ *)ip1; - *(@type@ *)op1 = @scalarf@(in1); - ) - } -} - -/**end repeat**/ - /**begin repeat * Float types * #type = npy_float, npy_double# @@ -2189,14 +2123,6 @@ mkl_umath_@TYPE@_reciprocal(char **args, const npy_intp *dimensions, const npy_i } } -void -mkl_umath_@TYPE@__ones_like(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)) -{ - OUTPUT_LOOP { - *((@type@ *)op1) = 1; - } -} - void mkl_umath_@TYPE@_conjugate(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)) { @@ -2351,8 +2277,6 @@ mkl_umath_@TYPE@_ldexp_long(char **args, const npy_intp *dimensions, const npy_i } #endif -#define mkl_umath_@TYPE@_true_divide mkl_umath_@TYPE@_divide - /**end repeat**/ /* @@ -2651,15 +2575,6 @@ mkl_umath_@TYPE@_reciprocal(char **args, const npy_intp *dimensions, const npy_i } } -void -mkl_umath_@TYPE@__ones_like(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)) -{ - OUTPUT_LOOP { - ((@ftype@ *)op1)[0] = 1; - ((@ftype@ *)op1)[1] = 0; - } -} - void mkl_umath_@TYPE@_conjugate(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)) { const int contig = IS_UNARY_CONT(@type@, @type@); @@ -2703,16 +2618,6 @@ mkl_umath_@TYPE@_absolute(char **args, const npy_intp *dimensions, const npy_int } } -void -mkl_umath_@TYPE@__arg(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)) -{ - UNARY_LOOP { - const @ftype@ in1r = ((@ftype@ *)ip1)[0]; - const @ftype@ in1i = ((@ftype@ *)ip1)[1]; - *((@ftype@ *)op1) = atan2@c@(in1i, in1r); - } -} - void mkl_umath_@TYPE@_sign(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)) { @@ -2812,8 +2717,6 @@ mkl_umath_@TYPE@_@kind@(char **args, const npy_intp *dimensions, const npy_intp } /**end repeat1**/ -#define mkl_umath_@TYPE@_true_divide mkl_umath_@TYPE@_divide - /**end repeat**/ #undef CGE diff --git a/mkl_umath/src/mkl_umath_loops.h.src b/mkl_umath/src/mkl_umath_loops.h.src index 211e84e..be25745 100644 --- a/mkl_umath/src/mkl_umath_loops.h.src +++ b/mkl_umath/src/mkl_umath_loops.h.src @@ -57,10 +57,6 @@ MKL_UMATH_API void mkl_umath_@TYPE@_sqrt(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); -MKL_UMATH_API -void -mkl_umath_@TYPE@_invsqrt(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); - MKL_UMATH_API void mkl_umath_@TYPE@_exp(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); @@ -73,10 +69,6 @@ MKL_UMATH_API void mkl_umath_@TYPE@_expm1(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); -MKL_UMATH_API -void -mkl_umath_@TYPE@_erf(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); - MKL_UMATH_API void mkl_umath_@TYPE@_log(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); @@ -221,10 +213,6 @@ void mkl_umath_@TYPE@_@kind@(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); /**end repeat1**/ -MKL_UMATH_API -void -mkl_umath_@TYPE@_floor_divide(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); - MKL_UMATH_API void mkl_umath_@TYPE@_remainder(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); @@ -241,10 +229,6 @@ MKL_UMATH_API void mkl_umath_@TYPE@_reciprocal(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); -MKL_UMATH_API -void -mkl_umath_@TYPE@__ones_like(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); - MKL_UMATH_API void mkl_umath_@TYPE@_conjugate(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); @@ -287,8 +271,6 @@ void mkl_umath_@TYPE@_ldexp_long(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); #endif -#define mkl_umath_@TYPE@_true_divide mkl_umath_@TYPE@_divide - /**end repeat**/ /* @@ -326,10 +308,6 @@ MKL_UMATH_API void mkl_umath_@TYPE@_divide(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); -MKL_UMATH_API -void -mkl_umath_@TYPE@_floor_divide(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); - /**begin repeat1 * arithmetic @@ -350,10 +328,6 @@ MKL_UMATH_API void mkl_umath_@TYPE@_reciprocal(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); -MKL_UMATH_API -void -mkl_umath_@TYPE@__ones_like(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); - MKL_UMATH_API void mkl_umath_@TYPE@_conjugate(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); @@ -362,10 +336,6 @@ MKL_UMATH_API void mkl_umath_@TYPE@_absolute(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); -MKL_UMATH_API -void -mkl_umath_@TYPE@__arg(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); - MKL_UMATH_API void mkl_umath_@TYPE@_sign(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(data)); @@ -379,8 +349,6 @@ void mkl_umath_@TYPE@_@kind@(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func)); /**end repeat1**/ -#define mkl_umath_@TYPE@_true_divide mkl_umath_@TYPE@_divide - /**end repeat**/ #undef CGE