From d357e06582bf3a664ee6667994a7fc3e5db8450e Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 27 Nov 2024 05:57:41 +0000 Subject: [PATCH] add XS function to call fftw_sprint_plan for debugging --- fftw3.pd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fftw3.pd b/fftw3.pd index 6721fb0..dfbfe14 100644 --- a/fftw3.pd +++ b/fftw3.pd @@ -104,6 +104,18 @@ pp_export_nothing(); pp_addxs('', <<'EOXS'); MODULE = PDL::FFTW3 PACKAGE = PDL::FFTW3 +SV * +dump_plan(planIV) + IV planIV +CODE: + void* plan = NUM2PTR(void *, planIV); + char *s = fftw_sprint_plan((const fftw_plan)plan); + if (!s) croak("Got NULL string from fftw_sprint_plan"); + RETVAL = newSVpv(s, 0); + free(s); +OUTPUT: + RETVAL + IV compute_plan( dims_ref, do_double_precision, is_real_fft, do_inverse_fft, in_pdl, out_pdl, in_alignment, out_alignment ) SV* dims_ref