this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add constness

+13 -13
+13 -13
kissfft.hh
··· 12 12 13 13 using cpx_t = std::complex<scalar_t>; 14 14 15 - kissfft( std::size_t nfft, 16 - bool inverse ) 15 + kissfft( const std::size_t nfft, 16 + const bool inverse ) 17 17 :_nfft(nfft) 18 18 ,_inverse(inverse) 19 19 { ··· 50 50 /// had been newly constructed with the passed arguments. 51 51 /// However, the implementation may be faster than constructing a 52 52 /// new fft object. 53 - void assign( std::size_t nfft, 54 - bool inverse ) 53 + void assign( const std::size_t nfft, 54 + const bool inverse ) 55 55 { 56 56 if ( nfft != _nfft ) 57 57 { ··· 79 79 /// constructor. Hence when applying the same transform twice, but with 80 80 /// the inverse flag changed the second time, then the result will 81 81 /// be equal to the original input times @c N. 82 - void transform(const cpx_t * fft_in, cpx_t * fft_out, std::size_t stage = 0, std::size_t fstride = 1, std::size_t in_stride = 1) const 82 + void transform(const cpx_t * fft_in, cpx_t * fft_out, const std::size_t stage = 0, const std::size_t fstride = 1, const std::size_t in_stride = 1) const 83 83 { 84 84 const std::size_t p = _stageRadix[stage]; 85 85 const std::size_t m = _stageRemainder[stage]; ··· 143 143 /// Since C++11, these requirements are guaranteed to be satisfied for 144 144 /// @c scalar_ts being @c float, @c double or @c long @c double 145 145 /// together with @c cpx_t being @c std::complex<scalar_t>. 146 - void transform_real( const scalar_t * src, 147 - cpx_t * dst ) const 146 + void transform_real( const scalar_t * const src, 147 + cpx_t * const dst ) const 148 148 { 149 149 const std::size_t N = _nfft; 150 150 if ( N == 0 ) ··· 182 182 183 183 private: 184 184 185 - void kf_bfly2( cpx_t * Fout, const size_t fstride, std::size_t m) const 185 + void kf_bfly2( cpx_t * Fout, const size_t fstride, const std::size_t m) const 186 186 { 187 187 for (std::size_t k=0;k<m;++k) { 188 188 const cpx_t t = Fout[m+k] * _twiddles[k*fstride]; ··· 222 222 }while(--k); 223 223 } 224 224 225 - void kf_bfly4( cpx_t * Fout, const std::size_t fstride, const std::size_t m) const 225 + void kf_bfly4( cpx_t * const Fout, const std::size_t fstride, const std::size_t m) const 226 226 { 227 227 cpx_t scratch[7]; 228 228 const scalar_t negative_if_inverse = _inverse ? -1 : +1; ··· 245 245 } 246 246 } 247 247 248 - void kf_bfly5( cpx_t * Fout, const std::size_t fstride, const std::size_t m) const 248 + void kf_bfly5( cpx_t * const Fout, const std::size_t fstride, const std::size_t m) const 249 249 { 250 250 cpx_t *Fout0,*Fout1,*Fout2,*Fout3,*Fout4; 251 251 cpx_t scratch[13]; ··· 311 311 312 312 /* perform the butterfly for one stage of a mixed radix FFT */ 313 313 void kf_bfly_generic( 314 - cpx_t * Fout, 314 + cpx_t * const Fout, 315 315 const size_t fstride, 316 - std::size_t m, 317 - std::size_t p 316 + const std::size_t m, 317 + const std::size_t p 318 318 ) const 319 319 { 320 320 const cpx_t * twiddles = &_twiddles[0];