test: Enable fast-math on tests, and increase tolerance with SNS checks

This commit is contained in:
Antoine SOULIER
2022-07-25 15:38:20 +02:00
parent b5e7751068
commit 663e3dd8a2
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ depends = [ 'ctypes.h' ] + \
includes = [ SRC_DIR, INC_DIR ] includes = [ SRC_DIR, INC_DIR ]
extension = Extension('lc3', extension = Extension('lc3',
extra_compile_args = ['-std=c11'], extra_compile_args = [ '-std=c11', '-ffast-math' ],
define_macros = [ ('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION') ], define_macros = [ ('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION') ],
sources = sources, sources = sources,
depends = depends, depends = depends,

View File

@@ -506,7 +506,7 @@ def check_synthesis(rng, dt, sr):
y = synthesis.run(x) y = synthesis.run(x)
y_c = lc3.sns_synthesize(dt, sr, synthesis.get_data(), x) y_c = lc3.sns_synthesize(dt, sr, synthesis.get_data(), x)
ok = ok and np.amax(np.abs(y - y_c)) < 1e0 ok = ok and np.amax(np.abs(y - y_c)) < 2e0
return ok return ok