Skip to content

Commit

Permalink
fluidfft_fftw.fft2d.with_fftw2d
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Feb 2, 2024
1 parent 3ead91c commit 1e2a45b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
52 changes: 28 additions & 24 deletions plugins/fluidfft-fftw/src/fluidfft_fftw/fft2d/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,33 @@ py.install_sources(
subdir: 'fluidfft_fftw/fft2d',
)

pyx = custom_target(
'with_fftw1d.pyx',
output: 'with_fftw1d.pyx',
command: ['fluidfft-builder-make-file', '@OUTPUT@', 'FFT2DWithFFTW1D'],
)
foreach dim : ['1', '2']

pxd = custom_target(
'fft2d_with_fftw1d.pxd',
output: 'fft2d_with_fftw1d.pxd',
command: ['fluidfft-builder-make-file', '@OUTPUT@', 'FFT2DWithFFTW1D'],
)
pyx = custom_target(
f'with_fftw@dim@d.pyx',
output: f'with_fftw@dim@d.pyx',
command: ['fluidfft-builder-make-file', '@OUTPUT@', f'FFT2DWithFFTW@dim@D'],
)

py.extension_module(
'with_fftw1d',
pyx,
pxd,
'fft2d_with_fftw1d.cpp',
'fft2d_with_fftw1d.h',
include_path_fluidfft_builder / 'base_fft2d.cpp',
include_path_fluidfft_builder / 'base_fft.cpp',
dependencies: fftw_dep,
override_options : ['cython_language=cpp'],
include_directories: include_path_fluidfft_builder,
install: true,
subdir: 'fluidfft_fftw/fft2d',
)
pxd = custom_target(
f'fft2d_with_fftw@dim@d.pxd',
output: f'fft2d_with_fftw@dim@d.pxd',
command: ['fluidfft-builder-make-file', '@OUTPUT@', f'FFT2DWithFFTW@dim@D'],
)

py.extension_module(
f'with_fftw@dim@d',
pyx,
pxd,
f'fft2d_with_fftw@dim@d.cpp',
f'fft2d_with_fftw@dim@d.h',
include_path_fluidfft_builder / 'base_fft2d.cpp',
include_path_fluidfft_builder / 'base_fft.cpp',
dependencies: fftw_dep,
override_options : ['cython_language=cpp'],
include_directories: include_path_fluidfft_builder,
install: true,
subdir: 'fluidfft_fftw/fft2d',
)

endforeach
3 changes: 2 additions & 1 deletion plugins/fluidfft-fftw/tests/test_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ class Tests(TestCase):
pass


complete_test_class_2d("fft2d.with_fftw1d", Tests)
for dim in "12":
complete_test_class_2d(f"fft2d.with_fftw{dim}d", Tests)

0 comments on commit 1e2a45b

Please sign in to comment.