File Coverage

Complex.xs
Criterion Covered Total %
statement 109 116 93.9
branch 368 966 38.1
condition n/a
subroutine n/a
pod n/a
total 477 1082 44.0


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 complex.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_Complex
21             extern Core* PDL; /* Structure hold core C functions */
22             #line 23 "Complex.xs"
23              
24             #include
25              
26             #ifndef M_PI
27             # define M_PI 3.1415926535897932384626433832795029
28             #endif
29             #ifndef M_2PI
30             # define M_2PI (2. * M_PI)
31             #endif
32              
33             #if __GLIBC__ > 1 && (defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC9X)
34             # define CABS(r,i) hypot (r, i)
35             #else
36             static double
37             CABS (double r, double i)
38             {
39             double t;
40              
41             if (r < 0) r = - r;
42             if (i < 0) i = - i;
43              
44             if (i > r)
45             {
46             t = r; r = i; i = t;
47             }
48              
49             if (r + i == r)
50             return r;
51              
52             t = i / r;
53             return r * sqrt (1 + t*t);
54             }
55             #endif
56              
57             #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && defined __USE_GNU
58             # define SINCOS(x,s,c) sincos ((x), &(s), &(c))
59             #else
60             # define SINCOS(x,s,c) \
61             (s) = sin (x); \
62             (c) = cos (x);
63             #endif
64              
65              
66             #define CSQRT(type,ar,ai,cr,ci) \
67             type mag = CABS ((ar), (ai)); \
68             type t; \
69             \
70             if (mag == 0) \
71             (cr) = (ci) = 0; \
72             else if ((ar) > 0) \
73             { \
74             t = sqrt (0.5 * (mag + (ar))); \
75             (cr) = t; \
76             (ci) = 0.5 * (ai) / t; \
77             } \
78             else \
79             { \
80             t = sqrt (0.5 * (mag - (ar))); \
81             \
82             if ((ai) < 0) \
83             t = -t; \
84             \
85             (cr) = 0.5 * (ai) / t; \
86             (ci) = t; \
87             }
88              
89              
90             #define CLOG(ar,ai,cr,ci) \
91             (cr) = log (CABS ((ar), (ai))); \
92             (ci) = atan2 ((ai), (ar));
93              
94             pdl_error pdl_run_r2C(pdl *r,pdl *c);
95             pdl_error pdl_run_i2C(pdl *r,pdl *c);
96             pdl_error pdl_run_Cr2p(pdl *r,pdl *p);
97             pdl_error pdl_run_Cp2r(pdl *r,pdl *p);
98             pdl_error pdl_run_Cadd(pdl *a,pdl *b,pdl *c);
99             pdl_error pdl_run_Csub(pdl *a,pdl *b,pdl *c);
100             pdl_error pdl_run_Cmul(pdl *a,pdl *b,pdl *c);
101             pdl_error pdl_run_Cprodover(pdl *a,pdl *c);
102             pdl_error pdl_run_Cscale(pdl *a,pdl *b,pdl *c);
103             pdl_error pdl_run_Cdiv(pdl *a,pdl *b,pdl *c);
104             pdl_error pdl_run_Ceq(pdl *a,pdl *b,pdl *c);
105             pdl_error pdl_run_Cconj(pdl *a,pdl *c);
106             pdl_error pdl_run_Cabs(pdl *a,pdl *c);
107             pdl_error pdl_run_Cabs2(pdl *a,pdl *c);
108             pdl_error pdl_run_Carg(pdl *a,pdl *c);
109             pdl_error pdl_run_Csin(pdl *a,pdl *c);
110             pdl_error pdl_run_Ccos(pdl *a,pdl *c);
111             pdl_error pdl_run_Cexp(pdl *a,pdl *c);
112             pdl_error pdl_run_Clog(pdl *a,pdl *c);
113             pdl_error pdl_run_Cpow(pdl *a,pdl *b,pdl *c);
114             pdl_error pdl_run_Csqrt(pdl *a,pdl *c);
115             pdl_error pdl_run_Casin(pdl *a,pdl *c);
116             pdl_error pdl_run_Cacos(pdl *a,pdl *c);
117             pdl_error pdl_run_Csinh(pdl *a,pdl *c);
118             pdl_error pdl_run_Ccosh(pdl *a,pdl *c);
119             pdl_error pdl_run_Ctanh(pdl *a,pdl *c);
120             pdl_error pdl_run_Casinh(pdl *a,pdl *c);
121             pdl_error pdl_run_Cacosh(pdl *a,pdl *c);
122             pdl_error pdl_run_Catanh(pdl *a,pdl *c);
123             pdl_error pdl_run_Cproj(pdl *a,pdl *c);
124             pdl_error pdl_run_Croots(pdl *a,pdl *c,int n);
125             pdl_error pdl_run_rCpolynomial(pdl *coeffs,pdl *x,pdl *out);
126             pdl_error pdl_run_Ctricpy(pdl *A,pdl *C,int uplo);
127             pdl_error pdl_run_Cmstack(pdl *x,pdl *y,pdl *out);
128             pdl_error pdl_run_Caugment(pdl *x,pdl *y,pdl *out);
129              
130             #line 449 "lib/PDL/PP.pm"
131             #include "pdlperl.h"
132             #line 133 "Complex.xs"
133              
134             Core* PDL = NULL; /* Structure hold core C functions */
135              
136             MODULE = PDL::Complex PACKAGE = PDL::Complex PREFIX=pdl_run_
137              
138             PROTOTYPES: DISABLE
139              
140              
141             void
142             _r2C_int(r,c)
143             pdl *r
144             pdl *c
145             CODE:
146 133           PDL->barf_if_error(pdl_run_r2C(r,c));
147              
148             void
149             _i2C_int(r,c)
150             pdl *r
151             pdl *c
152             CODE:
153 3           PDL->barf_if_error(pdl_run_i2C(r,c));
154              
155             void
156             pdl_run_Cr2p(r, p=p)
157             SV *p_SV = items > 1 ? ST(1) : NULL;
158             PREINIT:
159 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
160             INPUT:
161             pdl *r
162             pdl *p=NO_INIT
163             PPCODE:
164 2 50         PDL_XS_INPLACE(r, p)
    0          
    50          
    50          
165 2           PDL->barf_if_error(pdl_run_Cr2p(r,p));
166 2 50         PDL_XS_RETURN(ST(0) = p_SV)
    50          
    50          
    50          
    0          
167              
168             void
169             pdl_run_Cp2r(r, p=p)
170             SV *p_SV = items > 1 ? ST(1) : NULL;
171             PREINIT:
172 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
173             INPUT:
174             pdl *r
175             pdl *p=NO_INIT
176             PPCODE:
177 2 50         PDL_XS_INPLACE(r, p)
    0          
    50          
    50          
178 2           PDL->barf_if_error(pdl_run_Cp2r(r,p));
179 2 50         PDL_XS_RETURN(ST(0) = p_SV)
    50          
    50          
    50          
    0          
180              
181             void
182             pdl_run_Cadd(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
183             SV *c_SV = items > 2 ? ST(2) : NULL;
184             PREINIT:
185 81 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
186             INPUT:
187             pdl *a
188             pdl *b
189             pdl *c
190             PPCODE:
191 81           PDL->barf_if_error(pdl_run_Cadd(a,b,c));
192 81 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
193              
194             void
195             pdl_run_Csub(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
196             SV *c_SV = items > 2 ? ST(2) : NULL;
197             PREINIT:
198 15 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
199             INPUT:
200             pdl *a
201             pdl *b
202             pdl *c
203             PPCODE:
204 15           PDL->barf_if_error(pdl_run_Csub(a,b,c));
205 15 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
206              
207             void
208             pdl_run_Cmul(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
209             SV *c_SV = items > 2 ? ST(2) : NULL;
210             PREINIT:
211 38 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
212             INPUT:
213             pdl *a
214             pdl *b
215             pdl *c
216             PPCODE:
217 38           PDL->barf_if_error(pdl_run_Cmul(a,b,c));
218 38 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
219              
220             void
221             pdl_run_Cprodover(a, c=PDL_XS_PERLINIT_initsv(c_SV))
222             SV *c_SV = items > 1 ? ST(1) : NULL;
223             PREINIT:
224 11 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
225             INPUT:
226             pdl *a
227             pdl *c
228             PPCODE:
229 11           PDL->barf_if_error(pdl_run_Cprodover(a,c));
230 11 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
231              
232             void
233             pdl_run_Cscale(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
234             SV *c_SV = items > 2 ? ST(2) : NULL;
235             PREINIT:
236 4 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
237             INPUT:
238             pdl *a
239             pdl *b
240             pdl *c
241             PPCODE:
242 4           PDL->barf_if_error(pdl_run_Cscale(a,b,c));
243 4 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
244              
245             void
246             pdl_run_Cdiv(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
247             SV *c_SV = items > 2 ? ST(2) : NULL;
248             PREINIT:
249 13 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
250             INPUT:
251             pdl *a
252             pdl *b
253             pdl *c
254             PPCODE:
255 13           PDL->barf_if_error(pdl_run_Cdiv(a,b,c));
256 13 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
257              
258             void
259             _Ceq_int(a,b,c)
260             pdl *a
261             pdl *b
262             pdl *c
263             CODE:
264 8           PDL->barf_if_error(pdl_run_Ceq(a,b,c));
265              
266             void
267             pdl_run_Cconj(a, c=c)
268             SV *c_SV = items > 1 ? ST(1) : NULL;
269             PREINIT:
270 3 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
271             INPUT:
272             pdl *a
273             pdl *c=NO_INIT
274             PPCODE:
275 3 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
276 3           PDL->barf_if_error(pdl_run_Cconj(a,c));
277 3 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
278              
279             void
280             _Cabs_int(a,c)
281             pdl *a
282             pdl *c
283             CODE:
284 6           PDL->barf_if_error(pdl_run_Cabs(a,c));
285              
286             void
287             _Cabs2_int(a,c)
288             pdl *a
289             pdl *c
290             CODE:
291 2           PDL->barf_if_error(pdl_run_Cabs2(a,c));
292              
293             void
294             _Carg_int(a,c)
295             pdl *a
296             pdl *c
297             CODE:
298 2           PDL->barf_if_error(pdl_run_Carg(a,c));
299              
300             void
301             pdl_run_Csin(a, c=c)
302             SV *c_SV = items > 1 ? ST(1) : NULL;
303             PREINIT:
304 10 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
305             INPUT:
306             pdl *a
307             pdl *c=NO_INIT
308             PPCODE:
309 10 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
310 10           PDL->barf_if_error(pdl_run_Csin(a,c));
311 10 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
312              
313             void
314             pdl_run_Ccos(a, c=c)
315             SV *c_SV = items > 1 ? ST(1) : NULL;
316             PREINIT:
317 10 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
318             INPUT:
319             pdl *a
320             pdl *c=NO_INIT
321             PPCODE:
322 10 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
323 10           PDL->barf_if_error(pdl_run_Ccos(a,c));
324 10 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
325              
326             void
327             pdl_run_Cexp(a, c=c)
328             SV *c_SV = items > 1 ? ST(1) : NULL;
329             PREINIT:
330 3 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
331             INPUT:
332             pdl *a
333             pdl *c=NO_INIT
334             PPCODE:
335 3 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
336 3           PDL->barf_if_error(pdl_run_Cexp(a,c));
337 3 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
338              
339             void
340             pdl_run_Clog(a, c=c)
341             SV *c_SV = items > 1 ? ST(1) : NULL;
342             PREINIT:
343 5 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
344             INPUT:
345             pdl *a
346             pdl *c=NO_INIT
347             PPCODE:
348 5 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
349 5           PDL->barf_if_error(pdl_run_Clog(a,c));
350 5 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
351              
352             void
353             pdl_run_Cpow(a, b, c=c)
354             SV *c_SV = items > 2 ? ST(2) : NULL;
355             PREINIT:
356 10 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
357             INPUT:
358             pdl *a
359             pdl *b
360             pdl *c=NO_INIT
361             PPCODE:
362 10 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
363 10           PDL->barf_if_error(pdl_run_Cpow(a,b,c));
364 10 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
365              
366             void
367             pdl_run_Csqrt(a, c=c)
368             SV *c_SV = items > 1 ? ST(1) : NULL;
369             PREINIT:
370 3 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
371             INPUT:
372             pdl *a
373             pdl *c=NO_INIT
374             PPCODE:
375 3 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
376 3           PDL->barf_if_error(pdl_run_Csqrt(a,c));
377 3 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
378              
379             void
380             pdl_run_Casin(a, c=c)
381             SV *c_SV = items > 1 ? ST(1) : NULL;
382             PREINIT:
383 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
384             INPUT:
385             pdl *a
386             pdl *c=NO_INIT
387             PPCODE:
388 2 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
389 2           PDL->barf_if_error(pdl_run_Casin(a,c));
390 2 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
391              
392             void
393             pdl_run_Cacos(a, c=c)
394             SV *c_SV = items > 1 ? ST(1) : NULL;
395             PREINIT:
396 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
397             INPUT:
398             pdl *a
399             pdl *c=NO_INIT
400             PPCODE:
401 2 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
402 2           PDL->barf_if_error(pdl_run_Cacos(a,c));
403 2 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
404              
405             void
406             pdl_run_Csinh(a, c=c)
407             SV *c_SV = items > 1 ? ST(1) : NULL;
408             PREINIT:
409 3 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
410             INPUT:
411             pdl *a
412             pdl *c=NO_INIT
413             PPCODE:
414 3 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
415 3           PDL->barf_if_error(pdl_run_Csinh(a,c));
416 3 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
417              
418             void
419             pdl_run_Ccosh(a, c=c)
420             SV *c_SV = items > 1 ? ST(1) : NULL;
421             PREINIT:
422 3 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
423             INPUT:
424             pdl *a
425             pdl *c=NO_INIT
426             PPCODE:
427 3 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
428 3           PDL->barf_if_error(pdl_run_Ccosh(a,c));
429 3 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
430              
431             void
432             pdl_run_Ctanh(a, c=c)
433             SV *c_SV = items > 1 ? ST(1) : NULL;
434             PREINIT:
435 3 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
436             INPUT:
437             pdl *a
438             pdl *c=NO_INIT
439             PPCODE:
440 3 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
441 3           PDL->barf_if_error(pdl_run_Ctanh(a,c));
442 3 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
443              
444             void
445             pdl_run_Casinh(a, c=c)
446             SV *c_SV = items > 1 ? ST(1) : NULL;
447             PREINIT:
448 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
449             INPUT:
450             pdl *a
451             pdl *c=NO_INIT
452             PPCODE:
453 2 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
454 2           PDL->barf_if_error(pdl_run_Casinh(a,c));
455 2 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
456              
457             void
458             pdl_run_Cacosh(a, c=c)
459             SV *c_SV = items > 1 ? ST(1) : NULL;
460             PREINIT:
461 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
462             INPUT:
463             pdl *a
464             pdl *c=NO_INIT
465             PPCODE:
466 2 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
467 2           PDL->barf_if_error(pdl_run_Cacosh(a,c));
468 2 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
469              
470             void
471             pdl_run_Catanh(a, c=c)
472             SV *c_SV = items > 1 ? ST(1) : NULL;
473             PREINIT:
474 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
475             INPUT:
476             pdl *a
477             pdl *c=NO_INIT
478             PPCODE:
479 2 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    50          
480 2           PDL->barf_if_error(pdl_run_Catanh(a,c));
481 2 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
482              
483             void
484             pdl_run_Cproj(a, c=c)
485             SV *c_SV = items > 1 ? ST(1) : NULL;
486             PREINIT:
487 0 0         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
488             INPUT:
489             pdl *a
490             pdl *c=NO_INIT
491             PPCODE:
492 0 0         PDL_XS_INPLACE(a, c)
    0          
    0          
    0          
493 0           PDL->barf_if_error(pdl_run_Cproj(a,c));
494 0 0         PDL_XS_RETURN(ST(0) = c_SV)
    0          
    0          
    0          
    0          
495              
496             void
497             _Croots_int(a,c,n)
498             pdl *a
499             pdl *c
500             int n
501             CODE:
502 1           PDL->barf_if_error(pdl_run_Croots(a,c,n));
503              
504             void
505             _rCpolynomial_int(coeffs,x,out)
506             pdl *coeffs
507             pdl *x
508             pdl *out
509             CODE:
510 2           PDL->barf_if_error(pdl_run_rCpolynomial(coeffs,x,out));
511              
512             void
513             pdl_run_Ctricpy(A, uplo=0, C=PDL_XS_PERLINIT_initsv(C_SV))
514             SV *C_SV = items > 2 ? ST(2) : NULL;
515             PREINIT:
516 3 50         PDL_XS_PREAMBLE(1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
517             INPUT:
518             pdl *A
519             int uplo
520             pdl *C
521             PPCODE:
522 3           PDL->barf_if_error(pdl_run_Ctricpy(A,C,uplo));
523 3 50         PDL_XS_RETURN(ST(0) = C_SV)
    50          
    50          
    50          
    0          
524              
525             void
526             pdl_run_Cmstack(x, y, out=PDL_XS_PERLINIT_initsv(out_SV))
527             SV *out_SV = items > 2 ? ST(2) : NULL;
528             PREINIT:
529 1 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
530             INPUT:
531             pdl *x
532             pdl *y
533             pdl *out
534             PPCODE:
535 1           PDL->barf_if_error(pdl_run_Cmstack(x,y,out));
536 1 50         PDL_XS_RETURN(ST(0) = out_SV)
    50          
    50          
    50          
    0          
537              
538             void
539             pdl_run_Caugment(x, y, out=PDL_XS_PERLINIT_initsv(out_SV))
540             SV *out_SV = items > 2 ? ST(2) : NULL;
541             PREINIT:
542 1 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
543             INPUT:
544             pdl *x
545             pdl *y
546             pdl *out
547             PPCODE:
548 1           PDL->barf_if_error(pdl_run_Caugment(x,y,out));
549 1 50         PDL_XS_RETURN(ST(0) = out_SV)
    50          
    50          
    50          
    0          
550              
551              
552             #line 483 "lib/PDL/PP.pm"
553             BOOT:
554             /* Get pointer to structure of core shared C routines */
555             /* make sure PDL::Core is loaded */
556             #line 557 "Complex.xs"
557 1           perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */
558             #ifndef aTHX_
559             #define aTHX_
560             #endif
561 1 50         if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV));
    50          
    0          
562 1           SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */
563 1 50         if (!CoreSV)
564 0           Perl_croak(aTHX_ "We require the PDL::Core module, which was not found");
565 1 50         if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */
566 0           Perl_croak(aTHX_ "Got NULL pointer for PDL");
567 1 50         if (PDL->Version != PDL_CORE_VERSION)
568 0           Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::Complex needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION);