Skip to content

Commit 726c611

Browse files
committed
Rename mkl_op_type to mkl_ftype (aka MKL floating type)
1 parent 0d523c4 commit 726c611

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

mkl_umath/src/mkl_umath_loops.c.src

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
#define MKL_INT_MAX ((npy_intp) ((~((MKL_UINT) 0)) >> 1))
7575

76-
#define CHUNKED_VML_CALL2(vml_func, n, type, mkl_type, mkl_op_type, in1, op1) \
76+
#define CHUNKED_VML_CALL2(vml_func, n, type, mkl_type, mkl_ftype, in1, op1) \
7777
do { \
7878
npy_intp _n_ = (n); \
7979
const npy_intp _chunk_size = MKL_INT_MAX; \
@@ -82,7 +82,7 @@
8282
while (_n_ > 0) { \
8383
npy_intp _current_chunk = (_n_ > _chunk_size) ? _chunk_size : _n_; \
8484
vml_func((MKL_INT) _current_chunk, (mkl_type *)(void *) in1p, \
85-
(mkl_op_type *)(void *) op1p); \
85+
(mkl_ftype *)(void *) op1p); \
8686
_n_ -= _current_chunk; \
8787
in1p += _current_chunk; \
8888
op1p += _current_chunk; \
@@ -1191,7 +1191,7 @@ mkl_umath_@TYPE@_ldexp_long(char **args, const npy_intp *dimensions, const npy_i
11911191
* #ftype = npy_float, npy_double#
11921192
* #type = npy_cfloat, npy_cdouble#
11931193
* #mkl_type = MKL_Complex8, MKL_Complex16#
1194-
* #mkl_op_type = float, double#
1194+
* #mkl_ftype = float, double#
11951195
* #c = f, #
11961196
* #C = F, #
11971197
* #s = c, z#
@@ -1515,18 +1515,27 @@ mkl_umath_@TYPE@_conjugate(char **args, const npy_intp *dimensions, const npy_in
15151515
}
15161516
}
15171517

1518+
/**begin repeat
1519+
* complex types
1520+
* #TYPE = CFLOAT, CDOUBLE#
1521+
* #ftype = npy_float, npy_double#
1522+
* #type = npy_cfloat, npy_cdouble#
1523+
* #mkl_ftype = float, double#
1524+
* #mkl_type = MKL_Complex8, MKL_Complex16#
1525+
1526+
*/
15181527
void
15191528
mkl_umath_@TYPE@_absolute(char **args, const npy_intp *dimensions, const npy_intp *steps, void *NPY_UNUSED(func))
15201529
{
1521-
const int contig = IS_UNARY_CONT(@mkl_type@, @mkl_op_type@);
1530+
const int contig = IS_UNARY_CONT(@mkl_type@, @mkl_ftype@);
15221531
const int disjoint_or_same = DISJOINT_OR_SAME_TWO_DTYPES(args[0], args[1], dimensions[0], sizeof(@type@), sizeof(@ftype@));
15231532
const int can_vectorize = contig && disjoint_or_same;
15241533
int ignore_fpstatus = 0;
15251534

15261535
if (can_vectorize && dimensions[0] > VML_TRANSCEDENTAL_THRESHOLD) {
15271536
ignore_fpstatus = 1;
1528-
CHUNKED_VML_CALL2(v@s@Abs, dimensions[0], @type@, @mkl_type@, @mkl_op_type@, args[0], args[1]);
1529-
/* v@s@Abs(dimensions[0], (@mkl_type@*) args[0], (@mkl_op_type@*) args[1]); */
1537+
CHUNKED_VML_CALL2(v@s@Abs, dimensions[0], @type@, @mkl_type@, @mkl_ftype@, args[0], args[1]);
1538+
/* v@s@Abs(dimensions[0], (@mkl_type@*) args[0], (@mkl_ftype@*) args[1]); */
15301539
}
15311540
else {
15321541
UNARY_LOOP {

0 commit comments

Comments
 (0)