File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 55from . import config
66
77
8- @njit (fastmath = True )
8+ @njit (fastmath = config . STUMPY_FASTMATH_TRUE )
99def _add_assoc (x , y ): # pragma: no cover
1010 """
1111 A dummy function to test the fastmath module
Original file line number Diff line number Diff line change @@ -98,6 +98,13 @@ check_fastmath()
9898 echo " Checking Missing fastmath flags in njit functions"
9999 ./fastmath.py --check stumpy
100100 check_errs $?
101+
102+ echo " Checking hardcoded fastmath flags in njit functions"
103+ if [[ $( grep -n fastmath= stumpy/* py | grep -vE ' fastmath=config' | wc -l) -gt " 0" ]]; then
104+ grep -n fastmath= stumpy/* py | grep -vE ' fastmath=config'
105+ echo " Found one or more \` @njit()\` functions with a hardcoded \` fastmath\` flag."
106+ exit 1
107+ fi
101108}
102109
103110check_naive ()
You can’t perform that action at this time.
0 commit comments