adda-team / adda

ADDA - light scattering simulator based on the discrete dipole approximation
GNU General Public License v3.0
95 stars 57 forks source link

Port Fourier transform of the interaction matrix (D-matrix) to GPU #248

Open myurkin opened 6 years ago

myurkin commented 6 years ago

Is your feature request related to a problem? Please describe.

Right now the Fourier transform of the D-matrix is done with the FFTW even in OpenCL mode. This brings redundant library dependence and slightly affects performance.

Describe the solution you'd like

In OpenCL mode all Fourier transforms should be made with the clFFT. This package is mature enough.

Additional context

The performance impact is minor since this transform takes place only once. So this is low-priority issue.

myurkin commented 3 months ago

This becomes more important with modern powerful GPUs, which can make up to 100 iterations of the iterative solver for the same time as CPU-based preparation of Dmatrix.

The good news, however, is that is less important for orientation averaging. For the latter computations, GPU are especially effective even with the current code (potentially also using OCL_BLAS - #199) if not a lot of -ntheta is needed (#226).