Skip to content

Commit 9bff9c1

Browse files
committed
use npy_hypot
1 parent 110f02f commit 9bff9c1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ set_target_properties(${_trgt} PROPERTIES
111111
C_STANDARD 99
112112
)
113113
target_include_directories(${_trgt} PUBLIC mkl_umath/src/ ${Python_NumPy_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
114+
set(NPYMATH_PATH "${Python_NumPy_INCLUDE_DIRS}/../lib")
115+
target_link_libraries(${_trgt} PRIVATE ${NPYMATH_PATH}/libnpymath.a)
114116
target_link_libraries(${_trgt} PUBLIC MKL::MKL ${Python_LIBRARIES})
115117
target_link_options(${_trgt} PUBLIC ${_linker_options})
116118
target_compile_options(${_trgt} PUBLIC -fveclib=SVML)

mkl_umath/src/mkl_umath_loops.c.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2695,7 +2695,7 @@ mkl_umath_@TYPE@_absolute(char **args, const npy_intp *dimensions, const npy_int
26952695
UNARY_LOOP {
26962696
const @ftype@ in1r = ((@ftype@ *)ip1)[0];
26972697
const @ftype@ in1i = ((@ftype@ *)ip1)[1];
2698-
*((@ftype@ *)op1) = hypot@c@(in1r, in1i);
2698+
*((@ftype@ *)op1) = npy_hypot@c@(in1r, in1i);
26992699
}
27002700
}
27012701
if(ignore_fpstatus) {

0 commit comments

Comments
 (0)