MAINT, BLD: Fix unused inline functions warnings on clang#25555
MAINT, BLD: Fix unused inline functions warnings on clang#25555rgommers merged 2 commits intonumpy:mainfrom
Conversation
dd31d50 to
818742e
Compare
|
Thanks for fixing this! It makes it harder to see when I add compiler warnings if there is noise every time. I still see one unused function warning compiling this PR on an arm64 mac: |
To avoid unsed warrning on clang
It seems this overloaded function is defined but has never been used or disabled. |
|
close to rerun CI jobs |
rgommers
left a comment
There was a problem hiding this comment.
Thanks Sayed, this LGTM and fixes all the build warnings on macOS with the current Clang version.
Before merging, it'd be good to update the description for the sin/cos disabling, as I commented on inline.
The Azure timeouts can be ignored. I re-ran the two jobs, but they're hanging for >30 minutes already on:
Installing rtools...
| /* Disable SIMD code and revert to libm: see | ||
| * https://mail.python.org/archives/list/numpy-discussion@python.org/thread/C6EYZZSR4EWGVKHAZXLE7IBILRMNVK7L/ | ||
| * for detailed discussion on this*/ | ||
| #if 0 // NPY_SIMD_F64 |
There was a problem hiding this comment.
This is a functional change, right, not just fixing a build warning - the disabling wasn't done earlier after the May'23 mailing list discussion? If so, it'd be good to add this to the PR title and description.
There was a problem hiding this comment.
Could we just merge this and do a follow up to remove the F64 code as a distinct change? (the git history would reflect that discussion rather than being tied to this one) It feels like we're just cluttering the code base with it at this point given it'll need changing to 1ULP or adding the accuracy toggle.
There was a problem hiding this comment.
Also, not a functional change, it was disabled here first:
numpy/numpy/_core/src/umath/loops_trigonometric.dispatch.c.src
Lines 391 to 395 in 6e3b923
This function was just left out, causing the unused warning.
There was a problem hiding this comment.
Okay, thanks for checking! Wasn't clear to me from only the diff. Then I agree, let's get this in as is.
And +1 for figuring out whether or not to add the accuracy toggle, and otherwise removing the code.
closes #25471