diff options
author | ghostop14 <ghostop14@gmail.com> | 2020-01-23 12:44:15 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-27 23:18:19 -0800 |
commit | 785a889ae877c5e4bb6086b3742a3ab13921919b (patch) | |
tree | 9bcd4b552ef38f881d3a3ce8e03d9a46582d4a7e /gr-uhd/lib/usrp_block_impl.h | |
parent | 540d9bf734fd9f257559a93c80205298070ea7cb (diff) |
Improve complex math speed by disabling NaN/Inf checks
This patch globally applies the -fcx-limited-range compiler flag, which
skips checks on complex multiplication. This compiler flag is currently
only available on gcc, for other compilers, there are no changes.
The effect of this flag is that range reduction and Inf/NaN checks are
skipped. This is not a problem for most complex data stemming from
real-life signals. Only when we have to expect Inf/NaN values, or
complex numbers that can cause numerical overflows, is this switch
a problem. For GNU Radio, the new standard will be to set the flag, and
to enable extra checking only for special cases (the default is to
perform checks on every multiplication/division by default). Regions of
code that require extra checking can use the
#pragma STDC CX_LIMITED_RANGE OFF
preprocessor command to enable range checks.
For well-behaved data, removing the checks is significantly faster.
Benchmark improvements of up to a factor of 6 have been observed in the
wild.
Diffstat (limited to 'gr-uhd/lib/usrp_block_impl.h')
0 files changed, 0 insertions, 0 deletions