Skip to content

Commit 79aeeb3

Browse files
committed
Span API support
- Remove auto cast arr_real -> arr_cmplx; - Add `complex(re)` function; - Add `span` implementation; - Return `span` from `slice` function for step=1; - Remove `base_array` reference from `slice`; - Check same array by pointer range; - Simplify cast for `cmplx_t` type; - Add `span` instead `base_array` for some `math` functions; - Update tests;
1 parent 39c10d3 commit 79aeeb3

File tree

18 files changed

+435
-144
lines changed

18 files changed

+435
-144
lines changed

benchs/fft.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ BENCHMARK(BM_FFTW3_DOUBLE)
8686
#endif
8787

8888
static void BM_FFT_DSPLIB(benchmark::State& state) {
89+
using namespace dsplib;
8990
const int n = state.range(0);
90-
dsplib::arr_cmplx x = dsplib::randn(n);
91-
dsplib::arr_cmplx y = dsplib::fft(x); ///< update cache
91+
auto x = randn(n) + 1i * randn(n);
92+
auto y = fft(x); ///< update cache
9293
for (auto _ : state) {
9394
x[0] += 1e-5;
94-
y = dsplib::fft(x);
95+
y = fft(x);
9596
}
9697
}
9798

0 commit comments

Comments
 (0)