(divbyzero=False, overflow=False,
underflow=False, invalid=False,
all=False)
| 7 | from numpy.core._multiarray_umath import __cpu_baseline__ |
| 8 | |
| 9 | def check_floatstatus(divbyzero=False, overflow=False, |
| 10 | underflow=False, invalid=False, |
| 11 | all=False): |
| 12 | #define NPY_FPE_DIVIDEBYZERO 1 |
| 13 | #define NPY_FPE_OVERFLOW 2 |
| 14 | #define NPY_FPE_UNDERFLOW 4 |
| 15 | #define NPY_FPE_INVALID 8 |
| 16 | err = get_floatstatus() |
| 17 | ret = (all or divbyzero) and (err & 1) != 0 |
| 18 | ret |= (all or overflow) and (err & 2) != 0 |
| 19 | ret |= (all or underflow) and (err & 4) != 0 |
| 20 | ret |= (all or invalid) and (err & 8) != 0 |
| 21 | return ret |
| 22 | |
| 23 | class _Test_Utility: |
| 24 | # submodule of the desired SIMD extension, e.g. targets["AVX512F"] |
no test coverage detected