[Rcpp-devel] Optimising 2d convolution
Hadley Wickham
hadley at rice.edu
Fri Jan 6 20:57:27 CET 2012
> Fancy indexing tricks aside, another avenue you might want to look
> into is doing the convolution in fourier space ...
I have looked into that, and I'm pretty sure for my case (k much
smaller than x), that it's less efficient (and less numerically
stable). In my experience, it also make the code much harder to
understand - convolutions in fourier space are circular, which means
you have to add a whole lot of extra padding and it's non-obvious how
to debug. I spent several months going down the fft route, and I've
already made more progress in a week of using loops.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
More information about the Rcpp-devel
mailing list