isnan and isinf issue
noomio opened this issue · comments
Hi,
When I compile I get the following error with clang. I then try to link the library and it complains. Not quite sure why, I added in the main.c isnan and isinf and compiles ok. -lm is added to the linker.
Library compilation:
default/IsNaN.c:34:11: warning: implicit declaration of function 'isnanf' is invalid in C99 [-Wimplicit-function-declaration] py[i] = isnanf(v) ? 1 : 0;
Linker:
libonnx.a(.text+0x598): undefined reference to isnanf'
Oh its a float check. Didn't see it.
I added this to the makefile:
-Disinff=isinf -Disnanf=isnan
The math lib checks the type already and uses one function
yes, you are right, isinff and isnanf are alias to isinf and isnan, following commit patched it.
5ab486d