37 Commits

Author SHA1 Message Date
Chris Robinson
7b67108b95 Avoid some more direct pointer manipulation 2024-03-16 21:20:11 -07:00
Chris Robinson
9018fe3f9a Avoid some pointer arithmetic 2024-03-12 08:12:37 -07:00
Chris Robinson
594908d726 Fix up some includes 2024-02-07 05:07:34 -08:00
Chris Robinson
fcffb7dc23 Assert that a value is in the expected range 2023-12-04 23:21:01 -08:00
Chris Robinson
5f8136680e Don't make a float version of complex_fft 2023-10-25 16:40:44 -07:00
Chris Robinson
4f596d16cc Use std::array instead of a C-style array 2023-09-25 19:56:04 -07:00
Chris Robinson
bc5b58464c Shift the appropriate type 2023-09-22 12:47:29 -07:00
Chris Robinson
97830c3868 Improve the FFT bit reversal computation
This also allows to include 11-bit indices in the fast lookup table path,
without exceeding GCC's internal limit of compile-time calculations.
2023-09-09 18:00:37 -07:00
Chris Robinson
d1c6814995 Optimize FFT calculations for lengths of 1024 or less
This replaces sin/cos calls with an array of 10 complex values for lookup
tables, and separates the first loop iteration with a constant x1 multiplier.
2023-09-09 01:29:04 -07:00
Chris Robinson
c14ca5f3aa Remove custom stuff for standard 2023-05-04 18:42:27 -07:00
Chris Robinson
fde74453a6 Use macros for the likely/unlikely attributes
The syntax parser for GCC 8 (and earlier?) fails when these attributes are in
certain places.
2023-03-01 11:35:39 -08:00
Chris Robinson
8e5db6e505 Remove a [[likely]] that confuses some versions of GCC 2023-02-28 09:09:44 -08:00
Chris Robinson
0de7ea42fa Avoid using auto for lambda parameters 2023-02-06 12:35:51 -08:00
Chris Robinson
eef886b0f2 Precalculate reused scale factors 2023-01-15 17:49:14 -08:00
Rosen Penev
0526ecd2f9 clang-tidy cleanups (#800)
* clang-tidy: use bool literals

Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: replace std::bind with lambdas

Found with modernize-avoid-bind

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: use data() instead of pointer stuff

Found with readability-container-data-pointe

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: use empty()

Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: remove static in anon namespace

Found with readability-static-definition-in-anonymous-namespace

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: remove const return

Found with readability-const-return-type

Signed-off-by: Rosen Penev <rosenp@gmail.com>

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-15 13:43:27 -08:00
Chris Robinson
c40e1bc1ce Better handle span sources from iterators 2022-12-14 17:39:47 -08:00
Chris Robinson
4d757068c4 Avoid using a macro to wrap standard attributes 2022-12-06 01:48:58 -08:00
Chris Robinson
df6d61dd40 Use standard likely/unlikely attributes when available 2022-12-05 14:51:03 -08:00
Chris Robinson
9bf67c75aa Use complex floats for convolution reverb FFTs 2022-11-24 22:00:02 -08:00
Chris Robinson
cbcb140760 Avoid returning an array for constexpr tables 2022-11-24 08:01:37 -08:00
Chris Robinson
524f254c3a Use a bind statement instead of a lambda 2022-08-29 01:12:09 -07:00
Chris Robinson
c9d59ebc4a Simplify FFT complex arg handling a bit 2022-01-30 04:55:13 -08:00
Chris Robinson
1bbea9cd30 Start and use a standard-like numbers header 2022-01-27 01:38:39 -08:00
Chris Robinson
423888b816 Use precalculated lookup tables to swap FFT elements
Rather than going through the whole array, calculating the bit-reversed index
of each element, and not doing anything for more than half of them.
2022-01-27 00:39:36 -08:00
Chris Robinson
da59ad5105 Make PopCount and CountTrailingZeros more standard-like 2021-01-22 04:58:42 -08:00