Add some generic local size support to fft
This commit is contained in:
parent
ec4e895fd8
commit
c5908624e0
@ -33,6 +33,11 @@ public: \
|
|||||||
static real_type *alloc_real(size_t N) { return prefix ## _alloc_real(N); } \
|
static real_type *alloc_real(size_t N) { return prefix ## _alloc_real(N); } \
|
||||||
static void free(void *p) { fftw_free(p); } \
|
static void free(void *p) { fftw_free(p); } \
|
||||||
\
|
\
|
||||||
|
template<size_t Nd> \
|
||||||
|
static ptrdiff_t local_size(std::array<ptrdiff_t,Nd> 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, \
|
static ptrdiff_t local_size_2d(ptrdiff_t N0, ptrdiff_t N1, MPI_Comm comm, \
|
||||||
ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \
|
ptrdiff_t *local_n0, ptrdiff_t *local_0_start) { \
|
||||||
return prefix ## _mpi_local_size_2d(N0, N1, comm, local_n0, local_0_start); \
|
return prefix ## _mpi_local_size_2d(N0, N1, comm, local_n0, local_0_start); \
|
||||||
|
Loading…
Reference in New Issue
Block a user