Skip to content

Commit d357e06

Browse files
committed
add XS function to call fftw_sprint_plan for debugging
1 parent a7d64cd commit d357e06

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

fftw3.pd

+12
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ pp_export_nothing();
104104
pp_addxs('', <<'EOXS');
105105
MODULE = PDL::FFTW3 PACKAGE = PDL::FFTW3
106106

107+
SV *
108+
dump_plan(planIV)
109+
IV planIV
110+
CODE:
111+
void* plan = NUM2PTR(void *, planIV);
112+
char *s = fftw_sprint_plan((const fftw_plan)plan);
113+
if (!s) croak("Got NULL string from fftw_sprint_plan");
114+
RETVAL = newSVpv(s, 0);
115+
free(s);
116+
OUTPUT:
117+
RETVAL
118+
107119
IV
108120
compute_plan( dims_ref, do_double_precision, is_real_fft, do_inverse_fft, in_pdl, out_pdl, in_alignment, out_alignment )
109121
SV* dims_ref

0 commit comments

Comments
 (0)