mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Use unique_ptr for fft
This commit is contained in:
parent
3e23b4a08c
commit
f6058c6b61
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf_cc.h"
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@ -118,10 +119,10 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
}
|
||||
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
|
@ -226,8 +226,8 @@ private:
|
||||
std::vector<gr_complex> d_fft_code_Q_A;
|
||||
std::vector<gr_complex> d_fft_code_Q_B;
|
||||
std::vector<gr_complex> d_inbuffer;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "galileo_pcps_8ms_acquisition_cc.h"
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@ -76,10 +77,10 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
d_magnitude = std::vector<float>(d_fft_size, 0.0F);
|
||||
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
|
@ -208,8 +208,8 @@ private:
|
||||
uint32_t d_num_doppler_bins;
|
||||
std::vector<gr_complex> d_fft_code_A;
|
||||
std::vector<gr_complex> d_fft_code_B;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#if HAS_STD_FILESYSTEM
|
||||
#if HAS_STD_FILESYSTEM_EXPERIMENTAL
|
||||
@ -80,10 +81,10 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
|
||||
d_magnitude.reserve(d_fft_size);
|
||||
d_10_ms_buffer.reserve(50 * d_samples_per_ms);
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = conf_.dump;
|
||||
@ -379,7 +380,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
int signal_samples = prn_replicas * d_fft_size;
|
||||
// int fft_size_extended = nextPowerOf2(signal_samples * zero_padding_factor);
|
||||
int fft_size_extended = signal_samples * zero_padding_factor;
|
||||
auto fft_operator = std::make_shared<gr::fft::fft_complex>(fft_size_extended, true);
|
||||
auto fft_operator = std::make_unique<gr::fft::fft_complex>(fft_size_extended, true);
|
||||
// zero padding the entire vector
|
||||
std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0));
|
||||
|
||||
|
@ -216,8 +216,8 @@ private:
|
||||
volk_gnsssdr::vector<float> d_magnitude;
|
||||
volk_gnsssdr::vector<volk_gnsssdr::vector<float>> d_grid_data;
|
||||
volk_gnsssdr::vector<volk_gnsssdr::vector<std::complex<float>>> d_grid_doppler_wipeoffs;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "concurrent_map.h"
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include "gps_acq_assist.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
@ -72,10 +73,10 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
d_fft_codes.reserve(d_fft_size);
|
||||
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
|
@ -217,8 +217,8 @@ private:
|
||||
std::vector<std::vector<float>> d_grid_data;
|
||||
std::vector<std::vector<std::complex<float>>> d_grid_doppler_wipeoffs;
|
||||
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "pcps_cccwsr_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h" // GPS_TWO_PI
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@ -86,10 +87,10 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
d_magnitude.reserve(d_fft_size);
|
||||
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
|
@ -203,8 +203,8 @@ private:
|
||||
uint32_t d_num_doppler_bins;
|
||||
std::vector<gr_complex> d_fft_code_data;
|
||||
std::vector<gr_complex> d_fft_code_pilot;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include "pcps_opencl_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h" // GPS_TWO_PI
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include "opencl/fft_base_kernels.h"
|
||||
#include "opencl/fft_internal.h"
|
||||
#include <glog/logging.h>
|
||||
@ -112,10 +113,10 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
|
||||
if (d_opencl != 0)
|
||||
{
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
}
|
||||
|
||||
// For dumping samples into a file
|
||||
|
@ -242,8 +242,8 @@ private:
|
||||
std::vector<std::vector<gr_complex>> d_grid_doppler_wipeoffs;
|
||||
uint32_t d_num_doppler_bins;
|
||||
std::vector<gr_complex> d_fft_codes;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@ -95,9 +96,9 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
d_code = std::vector<gr_complex>(d_samples_per_code, lv_cmake(0.0F, 0.0F));
|
||||
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
|
@ -236,8 +236,8 @@ private:
|
||||
std::vector<std::vector<gr_complex>> d_grid_doppler_wipeoffs;
|
||||
uint32_t d_num_doppler_bins;
|
||||
std::vector<gr_complex> d_fft_codes;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@ -102,10 +103,10 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
d_magnitude.reserve(d_fft_size);
|
||||
|
||||
// Direct FFT
|
||||
d_fft_if = std::make_shared<gr::fft::fft_complex>(d_fft_size, true);
|
||||
d_fft_if = std::make_unique<gr::fft::fft_complex>(d_fft_size, true);
|
||||
|
||||
// Inverse FFT
|
||||
d_ifft = std::make_shared<gr::fft::fft_complex>(d_fft_size, false);
|
||||
d_ifft = std::make_unique<gr::fft::fft_complex>(d_fft_size, false);
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
|
@ -222,8 +222,8 @@ private:
|
||||
uint32_t d_num_doppler_bins;
|
||||
std::vector<gr_complex> d_fft_codes;
|
||||
std::vector<std::vector<float>> d_grid_data;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::shared_ptr<gr::fft::fft_complex> d_ifft;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_fft_if;
|
||||
std::unique_ptr<gr::fft::fft_complex> d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
|
Loading…
Reference in New Issue
Block a user