Skip to content

Commit

Permalink
add XS function to call fftw_sprint_plan for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Nov 27, 2024
1 parent a7d64cd commit d357e06
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fftw3.pd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d357e06

Please sign in to comment.