File Coverage

lib/PDL/FFT.xs
Criterion Covered Total %
statement 8 11 72.7
branch 5 12 41.6
condition n/a
subroutine n/a
pod n/a
total 13 23 56.5


line stmt bran cond sub pod time code
1              
2             #line 453 "lib/PDL/PP.pm"
3             /*
4             * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/FFT.pd! Do not modify!
5             */
6              
7             #define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \
8             if (destroy) { \
9             comp_free_code \
10             } \
11             if ((trans)->dims_redone) { \
12             ntpriv_free_code \
13             }
14              
15             #include "EXTERN.h"
16             #include "perl.h"
17             #include "XSUB.h"
18             #include "pdl.h"
19             #include "pdlcore.h"
20             #define PDL PDL_FFT
21             extern Core* PDL; /* Structure hold core C functions */
22             #line 23 "lib/PDL/FFT.xs"
23             pdl_error pdl_run_fft(pdl *real,pdl *imag);
24             pdl_error pdl_run_ifft(pdl *real,pdl *imag);
25              
26             #line 449 "lib/PDL/PP.pm"
27             #include "pdlperl.h"
28             #line 29 "lib/PDL/FFT.xs"
29              
30             Core* PDL = NULL; /* Structure hold core C functions */
31              
32             MODULE = PDL::FFT PACKAGE = PDL PREFIX=pdl_run_
33              
34             PROTOTYPES: DISABLE
35              
36              
37             void
38             _fft_int(real,imag)
39             pdl *real
40             pdl *imag
41             CODE:
42 41           PDL->barf_if_error(pdl_run_fft(real,imag));
43              
44             void
45             _ifft_int(real,imag)
46             pdl *real
47             pdl *imag
48             CODE:
49 23           PDL->barf_if_error(pdl_run_ifft(real,imag));
50              
51              
52             #line 483 "lib/PDL/PP.pm"
53             BOOT:
54             /* Get pointer to structure of core shared C routines */
55             /* make sure PDL::Core is loaded */
56             #line 57 "lib/PDL/FFT.xs"
57 5           perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */
58             #ifndef aTHX_
59             #define aTHX_
60             #endif
61 5 50         if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV));
    50          
    0          
62 5           SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */
63 5 50         if (!CoreSV)
64 0           Perl_croak(aTHX_ "We require the PDL::Core module, which was not found");
65 5 50         if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */
66 0           Perl_croak(aTHX_ "Got NULL pointer for PDL");
67 5 50         if (PDL->Version != PDL_CORE_VERSION)
68 0           Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::FFT needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION);