From 1d342e135c0385572ec715b1209049355f817b9f Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Fri, 22 Jan 2010 22:52:13 -0500 Subject: changed destination argument to reference --- unsupported/Eigen/FFT | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'unsupported/Eigen/FFT') diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index 6c8cf7fdd..97b1b2cdf 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -160,18 +160,18 @@ class FFT template inline - void fwd( std::vector * dst, const std::vector<_Input> & src) + void fwd( std::vector & dst, const std::vector<_Input> & src) { if ( NumTraits<_Input>::IsComplex == 0 && HasFlag(HalfSpectrum) ) - dst->resize( (src.size()>>1)+1); + dst.resize( (src.size()>>1)+1); else - dst->resize(src.size()); - fwd(&(*dst)[0],&src[0],static_cast(src.size())); + dst.resize(src.size()); + fwd(&dst[0],&src[0],static_cast(src.size())); } template inline - void fwd( MatrixBase * dst, const MatrixBase & src) + void fwd( MatrixBase & dst, const MatrixBase & src) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(InputDerived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived) @@ -182,15 +182,15 @@ class FFT THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES) if ( NumTraits< typename InputDerived::Scalar >::IsComplex == 0 && HasFlag(HalfSpectrum) ) - dst->derived().resize( (src.size()>>1)+1); + dst.derived().resize( (src.size()>>1)+1); else - dst->derived().resize(src.size()); + dst.derived().resize(src.size()); if (src.stride() != 1) { Matrix tmp = src; - fwd( &(*dst)[0],&tmp[0],src.size() ); + fwd( &dst[0],&tmp[0],src.size() ); }else{ - fwd( &(*dst)[0],&src[0],src.size() ); + fwd( &dst[0],&src[0],src.size() ); } } @@ -212,7 +212,7 @@ class FFT template inline - void inv( MatrixBase * dst, const MatrixBase & src) + void inv( MatrixBase & dst, const MatrixBase & src) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(OutputDerived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived) @@ -224,24 +224,24 @@ class FFT int nfft = src.size(); int nout = HasFlag(HalfSpectrum) ? ((nfft>>1)+1) : nfft; - dst->derived().resize( nout ); + dst.derived().resize( nout ); if (src.stride() != 1) { Matrix tmp = src; - inv( &(*dst)[0],&tmp[0], nfft); + inv( &dst[0],&tmp[0], nfft); }else{ - inv( &(*dst)[0],&src[0], nfft); + inv( &dst[0],&src[0], nfft); } } template inline - void inv( std::vector<_Output> * dst, const std::vector & src) + void inv( std::vector<_Output> & dst, const std::vector & src) { if ( NumTraits<_Output>::IsComplex == 0 && HasFlag(HalfSpectrum) ) - dst->resize( 2*(src.size()-1) ); + dst.resize( 2*(src.size()-1) ); else - dst->resize( src.size() ); - inv( &(*dst)[0],&src[0],static_cast(dst->size()) ); + dst.resize( src.size() ); + inv( &dst[0],&src[0],static_cast(dst.size()) ); } -- cgit v1.2.3