From c3bcd90cde1c311e51899b900c8e7689c8370068 Mon Sep 17 00:00:00 2001 From: "E. G. Patrick Bos" Date: Thu, 12 Oct 2017 17:32:00 +0200 Subject: [PATCH] Made templates inline, does not change performance #6, https://github.com/egpbos/xtensor-fftw/issues/6#issuecomment-335512576 --- include/xtensor-fftw/basic.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/xtensor-fftw/basic.hpp b/include/xtensor-fftw/basic.hpp index 0430318..87e09b3 100644 --- a/include/xtensor-fftw/basic.hpp +++ b/include/xtensor-fftw/basic.hpp @@ -74,12 +74,12 @@ namespace xt { //// template - xt::xarray _fft_ (const xt::xarray &input) { + inline xt::xarray _fft_ (const xt::xarray &input) { static_assert(sizeof(prec_t) == 0, "Only specializations of _fft_ can be used"); } template - xt::xarray _ifft_ (const xt::xarray &input) { + inline xt::xarray _ifft_ (const xt::xarray &input) { static_assert(sizeof(prec_t) == 0, "Only specializations of _ifft_ can be used"); } @@ -92,7 +92,7 @@ namespace xt { && std::is_floating_point< prec_t >::value > > - xt::xarray _fft_(const xt::xarray &input) { + inline xt::xarray _fft_(const xt::xarray &input) { xt::xarray output(input.shape(), input.strides()); using fftw_input_t = fftw_number_t; @@ -117,7 +117,7 @@ namespace xt { && std::is_floating_point< prec_t >::value > > - xt::xarray _ifft_(const xt::xarray &input) { + inline xt::xarray _ifft_(const xt::xarray &input) { xt::xarray output(input.shape(), input.strides()); using fftw_input_t = fftw_number_t;