File Coverage

lib/PDL/Ufunc.xs
Criterion Covered Total %
statement 104 128 81.2
branch 411 1178 34.8
condition n/a
subroutine n/a
pod n/a
total 515 1306 39.4


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