Skip to content

remove unused functions #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 0 additions & 97 deletions mkl_umath/src/mkl_umath_loops.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -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#
Expand Down Expand Up @@ -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#
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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**/

/*
Expand Down Expand Up @@ -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@);
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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
Expand Down
32 changes: 0 additions & 32 deletions mkl_umath/src/mkl_umath_loops.h.src
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand Down Expand Up @@ -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));
Expand All @@ -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));
Expand Down Expand Up @@ -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**/

/*
Expand Down Expand Up @@ -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
Expand All @@ -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));
Expand All @@ -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));
Expand All @@ -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
Expand Down
Loading