Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fft_channelizer: use volk_32fc_s32fc_multiply2_32fc #206

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions lib/fft_channelizer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,18 +342,35 @@ int fft_channelizer_impl::work(int noutput_items,
// Construct the input to the reverse FFT. We need to copy the two halves
// as the output of the initial FFT still is [DC, Positive Freq, Negative
// Freq].

gr_complex scale = 1. / d_fft_size;
#if VOLK_VERSION_MAJOR >= 3 && VOLK_VERSION_MINOR >= 1
volk_32fc_s32fc_multiply2_32fc(
&d_ifft.get_inbuf()[0],
&d_fft.get_outbuf()[positive_offset(
d_fft_size, d_output_step, j, d_ifft_size)],
&scale,
d_ifft_size / 2);
volk_32fc_s32fc_multiply2_32fc(
&d_ifft.get_inbuf()[d_ifft_size / 2],
&d_fft.get_outbuf()[negative_offset(
d_fft_size, d_output_step, j, d_ifft_size)],
&scale,
d_ifft_size / 2);
#else
volk_32fc_s32fc_multiply_32fc(
&d_ifft.get_inbuf()[0],
&d_fft.get_outbuf()[positive_offset(
d_fft_size, d_output_step, j, d_ifft_size)],
1. / d_fft_size,
scale,
d_ifft_size / 2);
volk_32fc_s32fc_multiply_32fc(
&d_ifft.get_inbuf()[d_ifft_size / 2],
&d_fft.get_outbuf()[negative_offset(
d_fft_size, d_output_step, j, d_ifft_size)],
1. / d_fft_size,
scale,
d_ifft_size / 2);
#endif
d_ifft.execute();

if (output_items.size() > 0) {
Expand Down
Loading