/*! * \file gnss_sdr_fft.h * \brief Helper file for FFT interface * \author Carles Fernandez Prades, 2021. cfernandez(at)cttc.es * * ----------------------------------------------------------------------------- * * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. * This file is part of GNSS-SDR. * * Copyright (C) 2010-2021 (see AUTHORS file for a list of contributors) * SPDX-License-Identifier: GPL-3.0-or-later * * ----------------------------------------------------------------------------- */ #ifndef GNSS_SDR_GNSS_SDR_FFT_H #define GNSS_SDR_GNSS_SDR_FFT_H #include "gnss_sdr_make_unique.h" #include #include #include #if GNURADIO_FFT_USES_TEMPLATES using gnss_fft_complex_fwd = gr::fft::fft_complex_fwd; using gnss_fft_complex_rev = gr::fft::fft_complex_rev; template using gnss_fft_fwd_unique_ptr = std::unique_ptr; template gnss_fft_fwd_unique_ptr gnss_fft_fwd_make_unique(Args&&... args) { return std::make_unique(std::forward(args)...); } template using gnss_fft_rev_unique_ptr = std::unique_ptr; template gnss_fft_rev_unique_ptr gnss_fft_rev_make_unique(Args&&... args) { return std::make_unique(std::forward(args)...); } #else using gnss_fft_complex_fwd = gr::fft::fft_complex; using gnss_fft_complex_rev = gr::fft::fft_complex; template using gnss_fft_fwd_unique_ptr = std::unique_ptr; template gnss_fft_fwd_unique_ptr gnss_fft_fwd_make_unique(Args&&... args) { return std::make_unique(std::forward(args)..., true); } template using gnss_fft_rev_unique_ptr = std::unique_ptr; template gnss_fft_rev_unique_ptr gnss_fft_rev_make_unique(Args&&... args) { return std::make_unique(std::forward(args)..., false); } #endif #endif // GNSS_SDR_GNSS_SDR_FFT_H