diff options
author | Hood Chatham <roberthoodchatham@gmail.com> | 2022-06-11 11:19:42 -0700 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-14 09:32:14 -0700 |
commit | 3cb57d5902a6b2b120ecaeb7c7722a460eda8232 (patch) | |
tree | a73290e00ed32369960e0ec5341068bf4faecbe6 /numpy/array_api/_indexing_functions.py | |
parent | 4d07c069422974c425390772c8e19f585a4f0bdf (diff) | |
download | numpy-3cb57d5902a6b2b120ecaeb7c7722a460eda8232.tar.gz |
ENH: Add support for platforms with missing fenv flags
For instance wasm has no fenv support. musl-libc defines all the
fenv functions unconditionally (fesetexcept, feclearexcept, etc)
but on unsupported platforms they are no-ops:
https://git.musl-libc.org/cgit/musl/tree/src/fenv/fenv.c
However, the platform is expected to only define flags like
FE_OVERFLOW if they are supported. I haven't found an explanation
of the design decision, but it seems to be aimed at fine-grained
feature detection. musl-libc-test has code that uses fenv and wants
it to silently decay to a no-op on platforms missing support. I
copied their implementation of this behavior:
http://nsz.repo.hu/git/?p=libc-test;a=blob;f=src/common/mtest.h;h=706c1ba23ea8989b17a2f72ed1a919e187c06b6a;hb=HEAD#l30
Diffstat (limited to 'numpy/array_api/_indexing_functions.py')
0 files changed, 0 insertions, 0 deletions