From c5908624e0a8bd398357fe7a55d4134a994847ce Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 25 Mar 2019 11:42:34 +0200 Subject: [PATCH] Add some generic local size support to fft --- src/fourier/fft/fftw_calls_mpi.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fourier/fft/fftw_calls_mpi.hpp b/src/fourier/fft/fftw_calls_mpi.hpp index 1b14128..7a4cf0c 100644 --- a/src/fourier/fft/fftw_calls_mpi.hpp +++ b/src/fourier/fft/fftw_calls_mpi.hpp @@ -33,6 +33,11 @@ public: \ static real_type *alloc_real(size_t N) { return prefix ## _alloc_real(N); } \ static void free(void *p) { fftw_free(p); } \ \ + template \ + static ptrdiff_t local_size(std::array const& N, MPI_Comm comm, \ + ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \ + return prefix ## _mpi_local_size(Nd, N.data(), comm, local_n0, local_0_start); \ + } \ static ptrdiff_t local_size_2d(ptrdiff_t N0, ptrdiff_t N1, MPI_Comm comm, \ ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \ return prefix ## _mpi_local_size_2d(N0, N1, comm, local_n0, local_0_start); \