File Coverage

lib/PDL/Primitive.xs
Criterion Covered Total %
statement 126 163 77.3
branch 430 1258 34.1
condition n/a
subroutine n/a
pod n/a
total 556 1421 39.1


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/Primitive.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_Primitive
21             extern Core* PDL; /* Structure hold core C functions */
22             #line 23 "lib/PDL/Primitive.xs"
23             pdl_error pdl_run_inner(pdl *a,pdl *b,pdl *c);
24             pdl_error pdl_run_outer(pdl *a,pdl *b,pdl *c);
25             pdl_error pdl_run_matmult(pdl *a,pdl *b,pdl *c);
26             pdl_error pdl_run_innerwt(pdl *a,pdl *b,pdl *c,pdl *d);
27             pdl_error pdl_run_inner2(pdl *a,pdl *b,pdl *c,pdl *d);
28             pdl_error pdl_run_inner2d(pdl *a,pdl *b,pdl *c);
29             pdl_error pdl_run_inner2t(pdl *a,pdl *b,pdl *c,pdl *d);
30             pdl_error pdl_run_crossp(pdl *a,pdl *b,pdl *c);
31             pdl_error pdl_run_norm(pdl *vec,pdl *norm);
32             pdl_error pdl_run_indadd(pdl *input,pdl *ind,pdl *sum);
33             pdl_error pdl_run_conv1d(pdl *a,pdl *kern,pdl *b,int reflect);
34             pdl_error pdl_run_in(pdl *a,pdl *b,pdl *c);
35             pdl_error pdl_run_hclip(pdl *a,pdl *b,pdl *c);
36             pdl_error pdl_run_lclip(pdl *a,pdl *b,pdl *c);
37             pdl_error pdl_run_clip(pdl *a,pdl *l,pdl *h,pdl *c);
38             pdl_error pdl_run_wtstat(pdl *a,pdl *wt,pdl *avg,pdl *b,int deg);
39             pdl_error pdl_run_statsover(pdl *a,pdl *w,pdl *avg,pdl *prms,pdl *min,pdl *max,pdl *adev,pdl *rms);
40             pdl_error pdl_run_histogram(pdl *in,pdl *hist,double step,double min,IV msize);
41             pdl_error pdl_run_whistogram(pdl *in,pdl *wt,pdl *hist,double step,double min,IV msize);
42             pdl_error pdl_run_histogram2d(pdl *ina,pdl *inb,pdl *hist,double stepa,double mina,IV masize,double stepb,double minb,IV mbsize);
43             pdl_error pdl_run_whistogram2d(pdl *ina,pdl *inb,pdl *wt,pdl *hist,double stepa,double mina,IV masize,double stepb,double minb,IV mbsize);
44             pdl_error pdl_run_fibonacci(pdl *i,pdl *x);
45             pdl_error pdl_run_append(pdl *a,pdl *b,pdl *c);
46             pdl_error pdl_run_axisvalues(pdl *i,pdl *a);
47             pdl_error pdl_run_cmpvec(pdl *a,pdl *b,pdl *c);
48             pdl_error pdl_run_eqvec(pdl *a,pdl *b,pdl *c);
49             pdl_error pdl_run_enumvec(pdl *v,pdl *k);
50             pdl_error pdl_run_enumvecg(pdl *v,pdl *k);
51             pdl_error pdl_run_vsearchvec(pdl *find,pdl *which,pdl *found);
52             pdl_error pdl_run_unionvec(pdl *a,pdl *b,pdl *c,pdl *nc);
53             pdl_error pdl_run_intersectvec(pdl *a,pdl *b,pdl *c,pdl *nc);
54             pdl_error pdl_run_setdiffvec(pdl *a,pdl *b,pdl *c,pdl *nc);
55             pdl_error pdl_run_union_sorted(pdl *a,pdl *b,pdl *c,pdl *nc);
56             pdl_error pdl_run_intersect_sorted(pdl *a,pdl *b,pdl *c,pdl *nc);
57             pdl_error pdl_run_setdiff_sorted(pdl *a,pdl *b,pdl *c,pdl *nc);
58             pdl_error pdl_run_vcos(pdl *a,pdl *b,pdl *vcos);
59             extern int pdl_srand_threads;
60             extern uint64_t *pdl_rand_state;
61             void pdl_srand(uint64_t **s, uint64_t seed, int n);
62             double pdl_drand(uint64_t *s);
63             #define PDL_MAYBE_SRAND \
64             if (pdl_srand_threads < 0) \
65             pdl_srand(&pdl_rand_state, PDL->pdl_seed(), PDL->online_cpus());
66             #define PDL_RAND_SET_OFFSET(v, thr, pdl) \
67             if (v < 0) { \
68             if (thr.mag_nthr >= 0) { \
69             int thr_no = PDL->magic_get_thread(pdl); \
70             if (thr_no < 0) return PDL->make_error_simple(PDL_EFATAL, "Invalid pdl_magic_get_thread!"); \
71             v = thr_no == 0 ? thr_no : thr_no % PDL->online_cpus(); \
72             } else { \
73             v = 0; \
74             } \
75             }
76             pdl_error pdl_run_srandom(pdl *a);
77             pdl_error pdl_run_random(pdl *a);
78             pdl_error pdl_run_randsym(pdl *a);
79             pdl_error pdl_run_vsearch_sample(pdl *vals,pdl *x,pdl *idx);
80             pdl_error pdl_run_vsearch_insert_leftmost(pdl *vals,pdl *x,pdl *idx);
81             pdl_error pdl_run_vsearch_insert_rightmost(pdl *vals,pdl *x,pdl *idx);
82             pdl_error pdl_run_vsearch_match(pdl *vals,pdl *x,pdl *idx);
83             pdl_error pdl_run_vsearch_bin_inclusive(pdl *vals,pdl *x,pdl *idx);
84             pdl_error pdl_run_vsearch_bin_exclusive(pdl *vals,pdl *x,pdl *idx);
85             pdl_error pdl_run_interpolate(pdl *xi,pdl *x,pdl *y,pdl *yi,pdl *err);
86             pdl_error pdl_run_which(pdl *mask,pdl *inds,pdl *lastout);
87             pdl_error pdl_run_which_both(pdl *mask,pdl *inds,pdl *notinds,pdl *lastout,pdl *lastoutn);
88             pdl_error pdl_run_whichover(pdl *a,pdl *o);
89             pdl_error pdl_run_approx_artol(pdl *got,pdl *expected,pdl *result,double atol,double rtol);
90             pdl_error pdl_run_pchip_chim(pdl *x,pdl *f,pdl *d,pdl *ierr);
91             pdl_error pdl_run_pchip_chic(pdl *ic,pdl *vc,pdl *mflag,pdl *x,pdl *f,pdl *d,pdl *ierr);
92             pdl_error pdl_run_pchip_chsp(pdl *ic,pdl *vc,pdl *x,pdl *f,pdl *d,pdl *ierr);
93             pdl_error pdl_run_pchip_chfd(pdl *x,pdl *f,pdl *d,pdl *xe,pdl *fe,pdl *de,pdl *ierr,pdl *skip);
94             pdl_error pdl_run_pchip_chfe(pdl *x,pdl *f,pdl *d,pdl *xe,pdl *fe,pdl *ierr,pdl *skip);
95             pdl_error pdl_run_pchip_chia(pdl *x,pdl *f,pdl *d,pdl *la,pdl *lb,pdl *ans,pdl *ierr,pdl *skip);
96             pdl_error pdl_run_pchip_chid(pdl *x,pdl *f,pdl *d,pdl *ia,pdl *ib,pdl *ans,pdl *ierr,pdl *skip);
97             pdl_error pdl_run_pchip_chbs(pdl *x,pdl *f,pdl *d,pdl *knotyp,pdl *t,pdl *bcoef,pdl *ierr);
98             pdl_error pdl_run_pchip_bvalu(pdl *t,pdl *a,pdl *ideriv,pdl *x,pdl *ans,pdl *inbv);
99              
100             #line 449 "lib/PDL/PP.pm"
101             #include "pdlperl.h"
102             #line 103 "lib/PDL/Primitive.xs"
103              
104             Core* PDL = NULL; /* Structure hold core C functions */
105              
106             MODULE = PDL::Primitive PACKAGE = PDL PREFIX=pdl_run_
107              
108             PROTOTYPES: DISABLE
109              
110              
111             void
112             pdl_run_inner(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
113             SV *c_SV = items > 2 ? ST(2) : NULL;
114             PREINIT:
115 4 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    100          
    50          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
116             INPUT:
117             pdl *a
118             pdl *b
119             pdl *c
120             PPCODE:
121 4           PDL->barf_if_error(pdl_run_inner(a,b,c));
122 4 100         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    50          
123              
124             void
125             pdl_run_outer(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
126             SV *c_SV = items > 2 ? ST(2) : NULL;
127             PREINIT:
128 0 0         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
129             INPUT:
130             pdl *a
131             pdl *b
132             pdl *c
133             PPCODE:
134 0           PDL->barf_if_error(pdl_run_outer(a,b,c));
135 0 0         PDL_XS_RETURN(ST(0) = c_SV)
    0          
    0          
    0          
    0          
136              
137             void
138             _matmult_int(a,b,c)
139             pdl *a
140             pdl *b
141             pdl *c
142             CODE:
143 133           PDL->barf_if_error(pdl_run_matmult(a,b,c));
144              
145             void
146             pdl_run_innerwt(a, b, c, d=PDL_XS_PERLINIT_initsv(d_SV))
147             SV *d_SV = items > 3 ? ST(3) : NULL;
148             PREINIT:
149 0 0         PDL_XS_PREAMBLE((items == 4) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
150             INPUT:
151             pdl *a
152             pdl *b
153             pdl *c
154             pdl *d
155             PPCODE:
156 0           PDL->barf_if_error(pdl_run_innerwt(a,b,c,d));
157 0 0         PDL_XS_RETURN(ST(0) = d_SV)
    0          
    0          
    0          
    0          
158              
159             void
160             pdl_run_inner2(a, b, c, d=PDL_XS_PERLINIT_initsv(d_SV))
161             SV *d_SV = items > 3 ? ST(3) : NULL;
162             PREINIT:
163 0 0         PDL_XS_PREAMBLE((items == 4) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
164             INPUT:
165             pdl *a
166             pdl *b
167             pdl *c
168             pdl *d
169             PPCODE:
170 0           PDL->barf_if_error(pdl_run_inner2(a,b,c,d));
171 0 0         PDL_XS_RETURN(ST(0) = d_SV)
    0          
    0          
    0          
    0          
172              
173             void
174             pdl_run_inner2d(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
175             SV *c_SV = items > 2 ? ST(2) : NULL;
176             PREINIT:
177 0 0         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
178             INPUT:
179             pdl *a
180             pdl *b
181             pdl *c
182             PPCODE:
183 0           PDL->barf_if_error(pdl_run_inner2d(a,b,c));
184 0 0         PDL_XS_RETURN(ST(0) = c_SV)
    0          
    0          
    0          
    0          
185              
186             void
187             pdl_run_inner2t(a, b, c, d=PDL_XS_PERLINIT_initsv(d_SV))
188             SV *d_SV = items > 3 ? ST(3) : NULL;
189             PREINIT:
190 0 0         PDL_XS_PREAMBLE((items == 4) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
191             INPUT:
192             pdl *a
193             pdl *b
194             pdl *c
195             pdl *d
196             PPCODE:
197 0           PDL->barf_if_error(pdl_run_inner2t(a,b,c,d));
198 0 0         PDL_XS_RETURN(ST(0) = d_SV)
    0          
    0          
    0          
    0          
199              
200             void
201             pdl_run_crossp(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
202             SV *c_SV = items > 2 ? ST(2) : NULL;
203             PREINIT:
204 1 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    50          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
205             INPUT:
206             pdl *a
207             pdl *b
208             pdl *c
209             PPCODE:
210 1           PDL->barf_if_error(pdl_run_crossp(a,b,c));
211 1 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
212              
213             void
214             pdl_run_norm(vec, norm=PDL_XS_PERLINIT_initsv(norm_SV))
215             SV *norm_SV = items > 1 ? ST(1) : NULL;
216             PREINIT:
217 3 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
218             INPUT:
219             pdl *vec
220             pdl *norm
221             PPCODE:
222 3           PDL->barf_if_error(pdl_run_norm(vec,norm));
223 3 50         PDL_XS_RETURN(ST(0) = norm_SV)
    50          
    50          
    50          
    0          
224              
225             void
226             pdl_run_indadd(input, ind, sum)
227             pdl *input
228             pdl *ind
229             pdl *sum
230             PPCODE:
231 7           PDL->barf_if_error(pdl_run_indadd(input,ind,sum));
232              
233             void
234             _conv1d_int(a,kern,b,reflect)
235             pdl *a
236             pdl *kern
237             pdl *b
238             int reflect
239             CODE:
240 0           PDL->barf_if_error(pdl_run_conv1d(a,kern,b,reflect));
241              
242             void
243             pdl_run_in(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
244             SV *c_SV = items > 2 ? ST(2) : NULL;
245             PREINIT:
246 0 0         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
247             INPUT:
248             pdl *a
249             pdl *b
250             pdl *c
251             PPCODE:
252 0           PDL->barf_if_error(pdl_run_in(a,b,c));
253 0 0         PDL_XS_RETURN(ST(0) = c_SV)
    0          
    0          
    0          
    0          
254              
255             void
256             _hclip_int(a,b,c)
257             pdl *a
258             pdl *b
259             pdl *c
260             CODE:
261 2           PDL->barf_if_error(pdl_run_hclip(a,b,c));
262              
263             void
264             _lclip_int(a,b,c)
265             pdl *a
266             pdl *b
267             pdl *c
268             CODE:
269 4           PDL->barf_if_error(pdl_run_lclip(a,b,c));
270              
271             void
272             _clip_int(a,l,h,c)
273             pdl *a
274             pdl *l
275             pdl *h
276             pdl *c
277             CODE:
278 11           PDL->barf_if_error(pdl_run_clip(a,l,h,c));
279              
280             void
281             pdl_run_wtstat(a, wt, avg, b=b, deg=deg)
282             SV *b_SV = (items == 5) ? ST(3) : NULL;
283             SV *deg_SV = (items == 5) ? ST(4) : ST(3);
284             PREINIT:
285 0 0         PDL_XS_PREAMBLE((items == 5) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
286 0 0         if (!((items == 4) || (items == 5)))
    0          
287 0           croak("Usage: PDL::wtstat(a,wt,avg,[b],deg) (you may leave [outputs] and values with =defaults out of list)");
288             INPUT:
289             pdl *a
290             pdl *wt
291             pdl *avg
292             pdl *b=NO_INIT
293             int deg; { deg = (int)SvIV(deg_SV); }
294             PPCODE:
295 0 0         if (b_SV) { b = PDL_CORE_(SvPDLV)(b_SV); } else b = PDL_XS_PERLINIT_initsv(b_SV);
    0          
296 0           PDL->barf_if_error(pdl_run_wtstat(a,wt,avg,b,deg));
297 0 0         PDL_XS_RETURN(ST(0) = b_SV)
    0          
    0          
    0          
    0          
298              
299             void
300             _statsover_int(a,w,avg,prms,min,max,adev,rms)
301             pdl *a
302             pdl *w
303             pdl *avg
304             pdl *prms
305             pdl *min
306             pdl *max
307             pdl *adev
308             pdl *rms
309             CODE:
310 29           PDL->barf_if_error(pdl_run_statsover(a,w,avg,prms,min,max,adev,rms));
311              
312             void
313             pdl_run_histogram(in, hist=hist, step=step, min=min, msize=msize)
314             SV *hist_SV = (items == 5) ? ST(1) : NULL;
315             SV *step_SV = (items == 5) ? ST(2) : ST(1);
316             SV *min_SV = (items == 5) ? ST(3) : ST(2);
317             SV *msize_SV = (items == 5) ? ST(4) : ST(3);
318             PREINIT:
319 4 50         PDL_XS_PREAMBLE((items == 5) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
320 4 50         if (!((items == 4) || (items == 5)))
    0          
321 0           croak("Usage: PDL::histogram(in,[hist],step,min,msize) (you may leave [outputs] and values with =defaults out of list)");
322             INPUT:
323             pdl *in
324             pdl *hist=NO_INIT
325             double step; { step = (double)SvNV(step_SV); }
326             double min; { min = (double)SvNV(min_SV); }
327             IV msize; { msize = (IV)SvIV(msize_SV); }
328             PPCODE:
329 4 50         if (hist_SV) { hist = PDL_CORE_(SvPDLV)(hist_SV); } else hist = PDL_XS_PERLINIT_initsv(hist_SV);
    50          
330 4           PDL->barf_if_error(pdl_run_histogram(in,hist,step,min,msize));
331 3 50         PDL_XS_RETURN(ST(0) = hist_SV)
    50          
    50          
    50          
    0          
332              
333             void
334             pdl_run_whistogram(in, wt, hist=hist, step=step, min=min, msize=msize)
335             SV *hist_SV = (items == 6) ? ST(2) : NULL;
336             SV *step_SV = (items == 6) ? ST(3) : ST(2);
337             SV *min_SV = (items == 6) ? ST(4) : ST(3);
338             SV *msize_SV = (items == 6) ? ST(5) : ST(4);
339             PREINIT:
340 1 50         PDL_XS_PREAMBLE((items == 6) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
341 1 50         if (!((items == 5) || (items == 6)))
    0          
342 0           croak("Usage: PDL::whistogram(in,wt,[hist],step,min,msize) (you may leave [outputs] and values with =defaults out of list)");
343             INPUT:
344             pdl *in
345             pdl *wt
346             pdl *hist=NO_INIT
347             double step; { step = (double)SvNV(step_SV); }
348             double min; { min = (double)SvNV(min_SV); }
349             IV msize; { msize = (IV)SvIV(msize_SV); }
350             PPCODE:
351 1 50         if (hist_SV) { hist = PDL_CORE_(SvPDLV)(hist_SV); } else hist = PDL_XS_PERLINIT_initsv(hist_SV);
    50          
352 1           PDL->barf_if_error(pdl_run_whistogram(in,wt,hist,step,min,msize));
353 1 50         PDL_XS_RETURN(ST(0) = hist_SV)
    50          
    50          
    50          
    0          
354              
355             void
356             pdl_run_histogram2d(ina, inb, hist=hist, stepa=stepa, mina=mina, masize=masize, stepb=stepb, minb=minb, mbsize=mbsize)
357             SV *hist_SV = (items == 9) ? ST(2) : NULL;
358             SV *stepa_SV = (items == 9) ? ST(3) : ST(2);
359             SV *mina_SV = (items == 9) ? ST(4) : ST(3);
360             SV *masize_SV = (items == 9) ? ST(5) : ST(4);
361             SV *stepb_SV = (items == 9) ? ST(6) : ST(5);
362             SV *minb_SV = (items == 9) ? ST(7) : ST(6);
363             SV *mbsize_SV = (items == 9) ? ST(8) : ST(7);
364             PREINIT:
365 1 50         PDL_XS_PREAMBLE((items == 9) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
366 1 50         if (!((items == 8) || (items == 9)))
    0          
367 0           croak("Usage: PDL::histogram2d(ina,inb,[hist],stepa,mina,masize,stepb,minb,mbsize) (you may leave [outputs] and values with =defaults out of list)");
368             INPUT:
369             pdl *ina
370             pdl *inb
371             pdl *hist=NO_INIT
372             double stepa; { stepa = (double)SvNV(stepa_SV); }
373             double mina; { mina = (double)SvNV(mina_SV); }
374             IV masize; { masize = (IV)SvIV(masize_SV); }
375             double stepb; { stepb = (double)SvNV(stepb_SV); }
376             double minb; { minb = (double)SvNV(minb_SV); }
377             IV mbsize; { mbsize = (IV)SvIV(mbsize_SV); }
378             PPCODE:
379 1 50         if (hist_SV) { hist = PDL_CORE_(SvPDLV)(hist_SV); } else hist = PDL_XS_PERLINIT_initsv(hist_SV);
    50          
380 1           PDL->barf_if_error(pdl_run_histogram2d(ina,inb,hist,stepa,mina,masize,stepb,minb,mbsize));
381 1 50         PDL_XS_RETURN(ST(0) = hist_SV)
    50          
    50          
    50          
    0          
382              
383             void
384             pdl_run_whistogram2d(ina, inb, wt, hist=hist, stepa=stepa, mina=mina, masize=masize, stepb=stepb, minb=minb, mbsize=mbsize)
385             SV *hist_SV = (items == 10) ? ST(3) : NULL;
386             SV *stepa_SV = (items == 10) ? ST(4) : ST(3);
387             SV *mina_SV = (items == 10) ? ST(5) : ST(4);
388             SV *masize_SV = (items == 10) ? ST(6) : ST(5);
389             SV *stepb_SV = (items == 10) ? ST(7) : ST(6);
390             SV *minb_SV = (items == 10) ? ST(8) : ST(7);
391             SV *mbsize_SV = (items == 10) ? ST(9) : ST(8);
392             PREINIT:
393 0 0         PDL_XS_PREAMBLE((items == 10) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
394 0 0         if (!((items == 10) || (items == 9)))
    0          
395 0           croak("Usage: PDL::whistogram2d(ina,inb,wt,[hist],stepa,mina,masize,stepb,minb,mbsize) (you may leave [outputs] and values with =defaults out of list)");
396             INPUT:
397             pdl *ina
398             pdl *inb
399             pdl *wt
400             pdl *hist=NO_INIT
401             double stepa; { stepa = (double)SvNV(stepa_SV); }
402             double mina; { mina = (double)SvNV(mina_SV); }
403             IV masize; { masize = (IV)SvIV(masize_SV); }
404             double stepb; { stepb = (double)SvNV(stepb_SV); }
405             double minb; { minb = (double)SvNV(minb_SV); }
406             IV mbsize; { mbsize = (IV)SvIV(mbsize_SV); }
407             PPCODE:
408 0 0         if (hist_SV) { hist = PDL_CORE_(SvPDLV)(hist_SV); } else hist = PDL_XS_PERLINIT_initsv(hist_SV);
    0          
409 0           PDL->barf_if_error(pdl_run_whistogram2d(ina,inb,wt,hist,stepa,mina,masize,stepb,minb,mbsize));
410 0 0         PDL_XS_RETURN(ST(0) = hist_SV)
    0          
    0          
    0          
    0          
411              
412             void
413             _fibonacci_int(i,x)
414             pdl *i
415             pdl *x
416             CODE:
417 1           PDL->barf_if_error(pdl_run_fibonacci(i,x));
418              
419             void
420             _append_int(a,b,c)
421             pdl *a
422             pdl *b
423             pdl *c
424             CODE:
425 88           PDL->barf_if_error(pdl_run_append(a,b,c));
426              
427             void
428             pdl_run_axisvalues(i, a=a)
429             SV *a_SV = items > 1 ? ST(1) : NULL;
430             PREINIT:
431 700 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    100          
    50          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
432             INPUT:
433             pdl *i
434             pdl *a=NO_INIT
435             PPCODE:
436 700 50         PDL_XS_INPLACE(i, a)
    50          
    0          
    0          
437 700           PDL->barf_if_error(pdl_run_axisvalues(i,a));
438 700 50         PDL_XS_RETURN(ST(0) = a_SV)
    50          
    50          
    50          
    0          
439              
440             void
441             pdl_run_cmpvec(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
442             SV *c_SV = items > 2 ? ST(2) : NULL;
443             PREINIT:
444 8 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
445             INPUT:
446             pdl *a
447             pdl *b
448             pdl *c
449             PPCODE:
450 8           PDL->barf_if_error(pdl_run_cmpvec(a,b,c));
451 8 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
452              
453             void
454             pdl_run_eqvec(a, b, c=PDL_XS_PERLINIT_initsv(c_SV))
455             SV *c_SV = items > 2 ? ST(2) : NULL;
456             PREINIT:
457 7 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
458             INPUT:
459             pdl *a
460             pdl *b
461             pdl *c
462             PPCODE:
463 7           PDL->barf_if_error(pdl_run_eqvec(a,b,c));
464 6 100         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    50          
465              
466             void
467             pdl_run_enumvec(v, k=PDL_XS_PERLINIT_initsv(k_SV))
468             SV *k_SV = items > 1 ? ST(1) : NULL;
469             PREINIT:
470 5 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
471             INPUT:
472             pdl *v
473             pdl *k
474             PPCODE:
475 5           PDL->barf_if_error(pdl_run_enumvec(v,k));
476 5 50         PDL_XS_RETURN(ST(0) = k_SV)
    50          
    50          
    50          
    0          
477              
478             void
479             pdl_run_enumvecg(v, k=PDL_XS_PERLINIT_initsv(k_SV))
480             SV *k_SV = items > 1 ? ST(1) : NULL;
481             PREINIT:
482 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
483             INPUT:
484             pdl *v
485             pdl *k
486             PPCODE:
487 1           PDL->barf_if_error(pdl_run_enumvecg(v,k));
488 1 50         PDL_XS_RETURN(ST(0) = k_SV)
    50          
    50          
    50          
    0          
489              
490             void
491             pdl_run_vsearchvec(find, which, found=PDL_XS_PERLINIT_initsv(found_SV))
492             SV *found_SV = items > 2 ? ST(2) : NULL;
493             PREINIT:
494 7 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
495             INPUT:
496             pdl *find
497             pdl *which
498             pdl *found
499             PPCODE:
500 7           PDL->barf_if_error(pdl_run_vsearchvec(find,which,found));
501 7 50         PDL_XS_RETURN(ST(0) = found_SV)
    50          
    50          
    50          
    0          
502              
503             void
504             _unionvec_int(a,b,c,nc)
505             pdl *a
506             pdl *b
507             pdl *c
508             pdl *nc
509             CODE:
510 12           PDL->barf_if_error(pdl_run_unionvec(a,b,c,nc));
511              
512             void
513             _intersectvec_int(a,b,c,nc)
514             pdl *a
515             pdl *b
516             pdl *c
517             pdl *nc
518             CODE:
519 30           PDL->barf_if_error(pdl_run_intersectvec(a,b,c,nc));
520              
521             void
522             _setdiffvec_int(a,b,c,nc)
523             pdl *a
524             pdl *b
525             pdl *c
526             pdl *nc
527             CODE:
528 14           PDL->barf_if_error(pdl_run_setdiffvec(a,b,c,nc));
529              
530             void
531             _union_sorted_int(a,b,c,nc)
532             pdl *a
533             pdl *b
534             pdl *c
535             pdl *nc
536             CODE:
537 11           PDL->barf_if_error(pdl_run_union_sorted(a,b,c,nc));
538              
539             void
540             _intersect_sorted_int(a,b,c,nc)
541             pdl *a
542             pdl *b
543             pdl *c
544             pdl *nc
545             CODE:
546 11           PDL->barf_if_error(pdl_run_intersect_sorted(a,b,c,nc));
547              
548             void
549             _setdiff_sorted_int(a,b,c,nc)
550             pdl *a
551             pdl *b
552             pdl *c
553             pdl *nc
554             CODE:
555 11           PDL->barf_if_error(pdl_run_setdiff_sorted(a,b,c,nc));
556              
557             void
558             pdl_run_vcos(a, b, vcos=PDL_XS_PERLINIT_initsv(vcos_SV))
559             SV *vcos_SV = items > 2 ? ST(2) : NULL;
560             PREINIT:
561 6 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
562             INPUT:
563             pdl *a
564             pdl *b
565             pdl *vcos
566             PPCODE:
567 6           PDL->barf_if_error(pdl_run_vcos(a,b,vcos));
568 6 50         PDL_XS_RETURN(ST(0) = vcos_SV)
    50          
    50          
    50          
    0          
569              
570             void
571             _srandom_int(a)
572             pdl *a
573             CODE:
574 4           PDL->barf_if_error(pdl_run_srandom(a));
575              
576             void
577             _random_int(a)
578             pdl *a
579             CODE:
580 24           PDL->barf_if_error(pdl_run_random(a));
581              
582             void
583             _randsym_int(a)
584             pdl *a
585             CODE:
586 3           PDL->barf_if_error(pdl_run_randsym(a));
587              
588             void
589             pdl_run_vsearch_sample(vals, x, idx=PDL_XS_PERLINIT_initsv(idx_SV))
590             SV *idx_SV = items > 2 ? ST(2) : NULL;
591             PREINIT:
592 28 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
593             INPUT:
594             pdl *vals
595             pdl *x
596             pdl *idx
597             PPCODE:
598 28           PDL->barf_if_error(pdl_run_vsearch_sample(vals,x,idx));
599 28 100         PDL_XS_RETURN(ST(0) = idx_SV)
    50          
    50          
    50          
    50          
600              
601             void
602             pdl_run_vsearch_insert_leftmost(vals, x, idx=PDL_XS_PERLINIT_initsv(idx_SV))
603             SV *idx_SV = items > 2 ? ST(2) : NULL;
604             PREINIT:
605 24 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
606             INPUT:
607             pdl *vals
608             pdl *x
609             pdl *idx
610             PPCODE:
611 24           PDL->barf_if_error(pdl_run_vsearch_insert_leftmost(vals,x,idx));
612 24 50         PDL_XS_RETURN(ST(0) = idx_SV)
    50          
    50          
    50          
    0          
613              
614             void
615             pdl_run_vsearch_insert_rightmost(vals, x, idx=PDL_XS_PERLINIT_initsv(idx_SV))
616             SV *idx_SV = items > 2 ? ST(2) : NULL;
617             PREINIT:
618 25 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
619             INPUT:
620             pdl *vals
621             pdl *x
622             pdl *idx
623             PPCODE:
624 25           PDL->barf_if_error(pdl_run_vsearch_insert_rightmost(vals,x,idx));
625 25 50         PDL_XS_RETURN(ST(0) = idx_SV)
    50          
    50          
    50          
    0          
626              
627             void
628             pdl_run_vsearch_match(vals, x, idx=PDL_XS_PERLINIT_initsv(idx_SV))
629             SV *idx_SV = items > 2 ? ST(2) : NULL;
630             PREINIT:
631 27 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
632             INPUT:
633             pdl *vals
634             pdl *x
635             pdl *idx
636             PPCODE:
637 27           PDL->barf_if_error(pdl_run_vsearch_match(vals,x,idx));
638 27 50         PDL_XS_RETURN(ST(0) = idx_SV)
    50          
    50          
    50          
    0          
639              
640             void
641             pdl_run_vsearch_bin_inclusive(vals, x, idx=PDL_XS_PERLINIT_initsv(idx_SV))
642             SV *idx_SV = items > 2 ? ST(2) : NULL;
643             PREINIT:
644 30 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
645             INPUT:
646             pdl *vals
647             pdl *x
648             pdl *idx
649             PPCODE:
650 30           PDL->barf_if_error(pdl_run_vsearch_bin_inclusive(vals,x,idx));
651 30 50         PDL_XS_RETURN(ST(0) = idx_SV)
    50          
    50          
    50          
    0          
652              
653             void
654             pdl_run_vsearch_bin_exclusive(vals, x, idx=PDL_XS_PERLINIT_initsv(idx_SV))
655             SV *idx_SV = items > 2 ? ST(2) : NULL;
656             PREINIT:
657 28 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
658             INPUT:
659             pdl *vals
660             pdl *x
661             pdl *idx
662             PPCODE:
663 28           PDL->barf_if_error(pdl_run_vsearch_bin_exclusive(vals,x,idx));
664 28 50         PDL_XS_RETURN(ST(0) = idx_SV)
    50          
    50          
    50          
    0          
665              
666             void
667             pdl_run_interpolate(xi, x, y, yi=PDL_XS_PERLINIT_initsv(yi_SV), err=PDL_XS_PERLINIT_initsv(err_SV))
668             SV *yi_SV = items > 3 ? ST(3) : NULL;
669             SV *err_SV = items > 4 ? ST(4) : NULL;
670             PREINIT:
671 8 100         PDL_XS_PREAMBLE((items == 5) ? 0 : 2);
    100          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
672             INPUT:
673             pdl *xi
674             pdl *x
675             pdl *y
676             pdl *yi
677             pdl *err
678             PPCODE:
679 8           PDL->barf_if_error(pdl_run_interpolate(xi,x,y,yi,err));
680 4 100         PDL_XS_RETURN(ST(0) = yi_SV;ST(1) = err_SV)
    50          
    50          
    50          
    50          
681              
682             void
683             _which_int(mask,inds,lastout)
684             pdl *mask
685             pdl *inds
686             pdl *lastout
687             CODE:
688 523           PDL->barf_if_error(pdl_run_which(mask,inds,lastout));
689              
690             void
691             _which_both_int(mask,inds,notinds,lastout,lastoutn)
692             pdl *mask
693             pdl *inds
694             pdl *notinds
695             pdl *lastout
696             pdl *lastoutn
697             CODE:
698 4           PDL->barf_if_error(pdl_run_which_both(mask,inds,notinds,lastout,lastoutn));
699              
700             void
701             pdl_run_whichover(a, o=o)
702             SV *o_SV = items > 1 ? ST(1) : NULL;
703             PREINIT:
704 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
705             INPUT:
706             pdl *a
707             pdl *o=NO_INIT
708             PPCODE:
709 2 100         PDL_XS_INPLACE(a, o)
    50          
    50          
    50          
710 2           PDL->barf_if_error(pdl_run_whichover(a,o));
711 2 50         PDL_XS_RETURN(ST(0) = o_SV)
    50          
    50          
    50          
    0          
712              
713             void
714             pdl_run_approx_artol(got, expected, atol=1e-06, rtol=0, result=PDL_XS_PERLINIT_initsv(result_SV))
715             SV *result_SV = items > 4 ? ST(4) : NULL;
716             PREINIT:
717 1698 50         PDL_XS_PREAMBLE(1);
    100          
    50          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
718             INPUT:
719             pdl *got
720             pdl *expected
721             double atol
722             double rtol
723             pdl *result
724             PPCODE:
725 1698           PDL->barf_if_error(pdl_run_approx_artol(got,expected,result,atol,rtol));
726 1698 50         PDL_XS_RETURN(ST(0) = result_SV)
    50          
    50          
    50          
    0          
727              
728             void
729             pdl_run_pchip_chim(x, f, d=PDL_XS_PERLINIT_initsv(d_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV))
730             SV *d_SV = items > 2 ? ST(2) : NULL;
731             SV *ierr_SV = items > 3 ? ST(3) : NULL;
732             PREINIT:
733 8 50         PDL_XS_PREAMBLE((items == 4) ? 0 : 2);
    50          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
734             INPUT:
735             pdl *x
736             pdl *f
737             pdl *d
738             pdl *ierr
739             PPCODE:
740 8           PDL->barf_if_error(pdl_run_pchip_chim(x,f,d,ierr));
741 8 50         PDL_XS_RETURN(ST(0) = d_SV;ST(1) = ierr_SV)
    50          
    50          
    50          
    0          
742              
743             void
744             pdl_run_pchip_chic(ic, vc, mflag, x, f, d=PDL_XS_PERLINIT_initsv(d_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV))
745             SV *d_SV = items > 5 ? ST(5) : NULL;
746             SV *ierr_SV = items > 6 ? ST(6) : NULL;
747             PREINIT:
748 3 100         PDL_XS_PREAMBLE((items == 7) ? 0 : 2);
    50          
    100          
    50          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
749             INPUT:
750             pdl *ic
751             pdl *vc
752             pdl *mflag
753             pdl *x
754             pdl *f
755             pdl *d
756             pdl *ierr
757             PPCODE:
758 3           PDL->barf_if_error(pdl_run_pchip_chic(ic,vc,mflag,x,f,d,ierr));
759 3 100         PDL_XS_RETURN(ST(0) = d_SV;ST(1) = ierr_SV)
    50          
    50          
    50          
    50          
760              
761             void
762             pdl_run_pchip_chsp(ic, vc, x, f, d=PDL_XS_PERLINIT_initsv(d_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV))
763             SV *d_SV = items > 4 ? ST(4) : NULL;
764             SV *ierr_SV = items > 5 ? ST(5) : NULL;
765             PREINIT:
766 3 100         PDL_XS_PREAMBLE((items == 6) ? 0 : 2);
    50          
    100          
    50          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
767             INPUT:
768             pdl *ic
769             pdl *vc
770             pdl *x
771             pdl *f
772             pdl *d
773             pdl *ierr
774             PPCODE:
775 3           PDL->barf_if_error(pdl_run_pchip_chsp(ic,vc,x,f,d,ierr));
776 3 100         PDL_XS_RETURN(ST(0) = d_SV;ST(1) = ierr_SV)
    50          
    50          
    50          
    50          
777              
778             void
779             pdl_run_pchip_chfd(x, f, d, xe, fe=PDL_XS_PERLINIT_initsv(fe_SV), de=PDL_XS_PERLINIT_initsv(de_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV), skip=PDL_XS_PERLINIT_initsv(skip_SV))
780             SV *fe_SV = items > 4 ? ST(4) : NULL;
781             SV *de_SV = items > 5 ? ST(5) : NULL;
782             SV *ierr_SV = items > 6 ? ST(6) : NULL;
783             SV *skip_SV = items > 7 ? ST(7) : NULL;
784             PREINIT:
785 3 50         PDL_XS_PREAMBLE((items == 8) ? 0 : 4);
    50          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
786             INPUT:
787             pdl *x
788             pdl *f
789             pdl *d
790             pdl *xe
791             pdl *fe
792             pdl *de
793             pdl *ierr
794             pdl *skip
795             PPCODE:
796 3           PDL->barf_if_error(pdl_run_pchip_chfd(x,f,d,xe,fe,de,ierr,skip));
797 3 50         PDL_XS_RETURN(ST(0) = fe_SV;ST(1) = de_SV;ST(2) = ierr_SV;ST(3) = skip_SV)
    50          
    50          
    50          
    0          
798              
799             void
800             pdl_run_pchip_chfe(x, f, d, xe, fe=PDL_XS_PERLINIT_initsv(fe_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV), skip=PDL_XS_PERLINIT_initsv(skip_SV))
801             SV *fe_SV = items > 4 ? ST(4) : NULL;
802             SV *ierr_SV = items > 5 ? ST(5) : NULL;
803             SV *skip_SV = items > 6 ? ST(6) : NULL;
804             PREINIT:
805 7 50         PDL_XS_PREAMBLE((items == 7) ? 0 : 3);
    50          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
806             INPUT:
807             pdl *x
808             pdl *f
809             pdl *d
810             pdl *xe
811             pdl *fe
812             pdl *ierr
813             pdl *skip
814             PPCODE:
815 7           PDL->barf_if_error(pdl_run_pchip_chfe(x,f,d,xe,fe,ierr,skip));
816 7 50         PDL_XS_RETURN(ST(0) = fe_SV;ST(1) = ierr_SV;ST(2) = skip_SV)
    50          
    50          
    50          
    0          
817              
818             void
819             pdl_run_pchip_chia(x, f, d, la, lb, ans=PDL_XS_PERLINIT_initsv(ans_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV), skip=PDL_XS_PERLINIT_initsv(skip_SV))
820             SV *ans_SV = items > 5 ? ST(5) : NULL;
821             SV *ierr_SV = items > 6 ? ST(6) : NULL;
822             SV *skip_SV = items > 7 ? ST(7) : NULL;
823             PREINIT:
824 2 50         PDL_XS_PREAMBLE((items == 8) ? 0 : 3);
    50          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
825             INPUT:
826             pdl *x
827             pdl *f
828             pdl *d
829             pdl *la
830             pdl *lb
831             pdl *ans
832             pdl *ierr
833             pdl *skip
834             PPCODE:
835 2           PDL->barf_if_error(pdl_run_pchip_chia(x,f,d,la,lb,ans,ierr,skip));
836 2 50         PDL_XS_RETURN(ST(0) = ans_SV;ST(1) = ierr_SV;ST(2) = skip_SV)
    50          
    50          
    50          
    0          
837              
838             void
839             pdl_run_pchip_chid(x, f, d, ia, ib, ans=PDL_XS_PERLINIT_initsv(ans_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV), skip=PDL_XS_PERLINIT_initsv(skip_SV))
840             SV *ans_SV = items > 5 ? ST(5) : NULL;
841             SV *ierr_SV = items > 6 ? ST(6) : NULL;
842             SV *skip_SV = items > 7 ? ST(7) : NULL;
843             PREINIT:
844 2 50         PDL_XS_PREAMBLE((items == 8) ? 0 : 3);
    50          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
845             INPUT:
846             pdl *x
847             pdl *f
848             pdl *d
849             pdl *ia
850             pdl *ib
851             pdl *ans
852             pdl *ierr
853             pdl *skip
854             PPCODE:
855 2           PDL->barf_if_error(pdl_run_pchip_chid(x,f,d,ia,ib,ans,ierr,skip));
856 2 50         PDL_XS_RETURN(ST(0) = ans_SV;ST(1) = ierr_SV;ST(2) = skip_SV)
    50          
    50          
    50          
    0          
857              
858             void
859             pdl_run_pchip_chbs(x, f, d, knotyp, t=PDL_XS_PERLINIT_initsv(t_SV), bcoef=PDL_XS_PERLINIT_initsv(bcoef_SV), ierr=PDL_XS_PERLINIT_initsv(ierr_SV))
860             SV *t_SV = items > 4 ? ST(4) : NULL;
861             SV *bcoef_SV = items > 5 ? ST(5) : NULL;
862             SV *ierr_SV = items > 6 ? ST(6) : NULL;
863             PREINIT:
864 1 50         PDL_XS_PREAMBLE((items == 7) ? 0 : 3);
    50          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
865             INPUT:
866             pdl *x
867             pdl *f
868             pdl *d
869             pdl *knotyp
870             pdl *t
871             pdl *bcoef
872             pdl *ierr
873             PPCODE:
874 1           PDL->barf_if_error(pdl_run_pchip_chbs(x,f,d,knotyp,t,bcoef,ierr));
875 1 50         PDL_XS_RETURN(ST(0) = t_SV;ST(1) = bcoef_SV;ST(2) = ierr_SV)
    50          
    50          
    50          
    0          
876              
877             void
878             pdl_run_pchip_bvalu(t, a, ideriv, x, ans=PDL_XS_PERLINIT_initsv(ans_SV), inbv=PDL_XS_PERLINIT_initsv(inbv_SV))
879             SV *ans_SV = items > 4 ? ST(4) : NULL;
880             SV *inbv_SV = items > 5 ? ST(5) : NULL;
881             PREINIT:
882 1 50         PDL_XS_PREAMBLE((items == 6) ? 0 : 2);
    50          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
883             INPUT:
884             pdl *t
885             pdl *a
886             pdl *ideriv
887             pdl *x
888             pdl *ans
889             pdl *inbv
890             PPCODE:
891 1           PDL->barf_if_error(pdl_run_pchip_bvalu(t,a,ideriv,x,ans,inbv));
892 1 50         PDL_XS_RETURN(ST(0) = ans_SV;ST(1) = inbv_SV)
    50          
    50          
    50          
    0          
893              
894              
895             #line 483 "lib/PDL/PP.pm"
896             BOOT:
897             /* Get pointer to structure of core shared C routines */
898             /* make sure PDL::Core is loaded */
899             #line 900 "lib/PDL/Primitive.xs"
900 71           perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */
901             #ifndef aTHX_
902             #define aTHX_
903             #endif
904 71 50         if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV));
    50          
    0          
905 71           SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */
906 71 50         if (!CoreSV)
907 0           Perl_croak(aTHX_ "We require the PDL::Core module, which was not found");
908 71 50         if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */
909 0           Perl_croak(aTHX_ "Got NULL pointer for PDL");
910 71 50         if (PDL->Version != PDL_CORE_VERSION)
911 0           Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::Primitive needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION);