lib/PDL/Slices.xs

filter: Statementstmt 96.4% 82 / 85 Branchbran 42.2% 203 / 480 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 50.4% 285 / 565 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« lib/PDL/IO/Pnm-pp-pnminraw.c ↑ Summary lib/PDL/Ops.xs »
1  
2 #line 453 "lib/PDL/PP.pm"
3 /*
4 * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/Slices.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_Slices
21 extern Core* PDL; /* Structure hold core C functions */
22 #line 23 "lib/PDL/Slices.xs"
23 pdl_error pdl_run_index(pdl *a,pdl *ind,pdl *c);
24 pdl_error pdl_run_index1d(pdl *a,pdl *ind,pdl *c);
25 pdl_error pdl_run_index2d(pdl *a,pdl *inda,pdl *indb,pdl *c);
26 pdl_error pdl_run_rangeb(pdl *PARENT,pdl *CHILD,pdl *ind_pdl,SV *size_sv,SV *boundary_sv);
27 pdl_error pdl_run_rld(pdl *a,pdl *b,pdl *c,IV sumover_max);
28 pdl_error pdl_run_rle(pdl *c,pdl *a,pdl *b);
29 pdl_error pdl_run_rlevec(pdl *c,pdl *a,pdl *b);
30 pdl_error pdl_run_rldvec(pdl *a,pdl *b,pdl *c,IV sumover_max);
31 pdl_error pdl_run_rleseq(pdl *c,pdl *a,pdl *b);
32 pdl_error pdl_run_rldseq(pdl *a,pdl *b,pdl *c,IV sumover_max);
33 pdl_error pdl_run__clump_int(pdl *PARENT,pdl *CHILD,PDL_Indx n);
34 pdl_error pdl_run_xchg(pdl *PARENT,pdl *CHILD,PDL_Indx n1,PDL_Indx n2);
35 pdl_error pdl_run_mv(pdl *PARENT,pdl *CHILD,PDL_Indx n1,PDL_Indx n2);
36 pdl_error pdl_run_lags(pdl *PARENT,pdl *CHILD,PDL_Indx nthdim,PDL_Indx step,PDL_Indx nlags);
37 pdl_error pdl_run_splitdim(pdl *PARENT,pdl *CHILD,PDL_Indx nthdim,PDL_Indx nsp);
38 pdl_error pdl_run_rotate(pdl *x,pdl *shift,pdl *y);
39 pdl_error pdl_run_broadcastI(pdl *PARENT,pdl *CHILD,PDL_Indx id,PDL_Indx *whichdims,PDL_Indx whichdims_count);
40 pdl_error pdl_run_unbroadcast(pdl *PARENT,pdl *CHILD,PDL_Indx atind);
41 pdl_error pdl_run_slice(pdl *PARENT,pdl *CHILD,pdl_slice_args *arglist);
42 pdl_error pdl_run_diagonal(pdl *PARENT,pdl *CHILD,PDL_Indx *whichdims,PDL_Indx whichdims_count);
43  
44 #line 449 "lib/PDL/PP.pm"
45 #include "pdlperl.h"
46 #line 47 "lib/PDL/Slices.xs"
47  
48 Core* PDL = NULL; /* Structure hold core C functions */
49  
50 MODULE = PDL::Slices PACKAGE = PDL PREFIX=pdl_run_
51  
52 PROTOTYPES: DISABLE
53  
54  
55 void
56 pdl_run_index(a, ind)
57 SV *c_SV = NULL;
58 PREINIT:
59 1973 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 1973 0 1973
PDL_XS_PREAMBLE(1); 0 1973 1973
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 1973 0 1973
PDL_XS_PREAMBLE(1); 1973 0 1973
PDL_XS_PREAMBLE(1); 1973 0 1973
PDL_XS_PREAMBLE(1); 0 1973 1973
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 1973 0 1973
PDL_XS_PREAMBLE(1); 0 1973 1973
60 INPUT:
61 pdl *a
62 pdl *ind
63 pdl *c=PDL_XS_PERLINIT_initsv(c_SV);
64 PPCODE:
65 1973 ▶ if (PDL_IS_INPLACE(a)) PDL->pdl_barf("index: a->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(a)) PDL->pdl_barf("index: a->inplace but not supported"); 0 1973 1973
66 1973 ▶ if (PDL_IS_INPLACE(ind)) PDL->pdl_barf("index: ind->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(ind)) PDL->pdl_barf("index: ind->inplace but not supported"); 0 1973 1973
67 1973 PDL->barf_if_error(pdl_run_index(a,ind,c));
68 1973 ▶ PDL_XS_RETURN(ST(0) = c_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = c_SV) 1973 0 1973
PDL_XS_RETURN(ST(0) = c_SV) 1973 0 1973
PDL_XS_RETURN(ST(0) = c_SV) 1973 0 1973
PDL_XS_RETURN(ST(0) = c_SV) 0 1973 1973
PDL_XS_RETURN(ST(0) = c_SV) 0 0 0
69  
70 void
71 pdl_run_index1d(a, ind)
72 SV *c_SV = NULL;
73 PREINIT:
74 5887 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 5887 0 5887
PDL_XS_PREAMBLE(1); 0 5887 5887
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 5887 0 5887
PDL_XS_PREAMBLE(1); 5887 0 5887
PDL_XS_PREAMBLE(1); 5887 0 5887
PDL_XS_PREAMBLE(1); 0 5887 5887
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 5887 0 5887
PDL_XS_PREAMBLE(1); 0 5887 5887
75 INPUT:
76 pdl *a
77 pdl *ind
78 pdl *c=PDL_XS_PERLINIT_initsv(c_SV);
79 PPCODE:
80 5887 ▶ if (PDL_IS_INPLACE(a)) PDL->pdl_barf("index1d: a->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(a)) PDL->pdl_barf("index1d: a->inplace but not supported"); 0 5887 5887
81 5887 ▶ if (PDL_IS_INPLACE(ind)) PDL->pdl_barf("index1d: ind->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(ind)) PDL->pdl_barf("index1d: ind->inplace but not supported"); 0 5887 5887
82 5887 PDL->barf_if_error(pdl_run_index1d(a,ind,c));
83 5887 ▶ PDL_XS_RETURN(ST(0) = c_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = c_SV) 5887 0 5887
PDL_XS_RETURN(ST(0) = c_SV) 5887 0 5887
PDL_XS_RETURN(ST(0) = c_SV) 5887 0 5887
PDL_XS_RETURN(ST(0) = c_SV) 0 5887 5887
PDL_XS_RETURN(ST(0) = c_SV) 0 0 0
84  
85 void
86 pdl_run_index2d(a, inda, indb)
87 SV *c_SV = NULL;
88 PREINIT:
89 150 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 150 0 150
PDL_XS_PREAMBLE(1); 0 150 150
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 150 0 150
PDL_XS_PREAMBLE(1); 150 0 150
PDL_XS_PREAMBLE(1); 150 0 150
PDL_XS_PREAMBLE(1); 0 150 150
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 150 0 150
PDL_XS_PREAMBLE(1); 0 150 150
90 INPUT:
91 pdl *a
92 pdl *inda
93 pdl *indb
94 pdl *c=PDL_XS_PERLINIT_initsv(c_SV);
95 PPCODE:
96 150 ▶ if (PDL_IS_INPLACE(a)) PDL->pdl_barf("index2d: a->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(a)) PDL->pdl_barf("index2d: a->inplace but not supported"); 0 150 150
97 150 ▶ if (PDL_IS_INPLACE(inda)) PDL->pdl_barf("index2d: inda->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(inda)) PDL->pdl_barf("index2d: inda->inplace but not supported"); 0 150 150
98 150 ▶ if (PDL_IS_INPLACE(indb)) PDL->pdl_barf("index2d: indb->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(indb)) PDL->pdl_barf("index2d: indb->inplace but not supported"); 0 150 150
99 150 PDL->barf_if_error(pdl_run_index2d(a,inda,indb,c));
100 150 ▶ PDL_XS_RETURN(ST(0) = c_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = c_SV) 150 0 150
PDL_XS_RETURN(ST(0) = c_SV) 150 0 150
PDL_XS_RETURN(ST(0) = c_SV) 150 0 150
PDL_XS_RETURN(ST(0) = c_SV) 0 150 150
PDL_XS_RETURN(ST(0) = c_SV) 0 0 0
101  
102 void
103 pdl_run_rangeb(PARENT, ind_pdl, size_sv, boundary_sv)
104 SV *CHILD_SV = NULL;
105 PREINIT:
106 139 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 139 0 139
PDL_XS_PREAMBLE(1); 0 139 139
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 139 0 139
PDL_XS_PREAMBLE(1); 139 0 139
PDL_XS_PREAMBLE(1); 139 0 139
PDL_XS_PREAMBLE(1); 0 139 139
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 139 0 139
PDL_XS_PREAMBLE(1); 0 139 139
107 INPUT:
108 pdl *PARENT
109 pdl *ind_pdl
110 SV *size_sv
111 SV *boundary_sv
112 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
113 PPCODE:
114 139 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("rangeb: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("rangeb: PARENT->inplace but not supported"); 0 139 139
115 139 PDL->barf_if_error(pdl_run_rangeb(PARENT,CHILD,ind_pdl,size_sv,boundary_sv));
116 139 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 139 0 139
PDL_XS_RETURN(ST(0) = CHILD_SV) 139 0 139
PDL_XS_RETURN(ST(0) = CHILD_SV) 139 0 139
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 139 139
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
117  
118 void
119 _rld_int(a,b,c,sumover_max)
120 pdl *a
121 pdl *b
122 pdl *c
123 IV sumover_max
124 CODE:
125 5 PDL->barf_if_error(pdl_run_rld(a,b,c,sumover_max));
126  
127 void
128 _rle_int(c,a,b)
129 pdl *c
130 pdl *a
131 pdl *b
132 CODE:
133 5 PDL->barf_if_error(pdl_run_rle(c,a,b));
134  
135 void
136 pdl_run_rlevec(c, a=PDL_XS_PERLINIT_initsv(a_SV), b=PDL_XS_PERLINIT_initsv(b_SV))
137 SV *a_SV = items > 1 ? ST(1) : NULL;
138 SV *b_SV = items > 2 ? ST(2) : NULL;
139 PREINIT:
140 3 ▶ PDL_XS_PREAMBLE((items == 3) ? 0 : 2);
Branch: 11 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 2 1 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 3 0 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 3 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 0 0
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 3 0 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 3 0 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 3 0 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 3 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 0 0
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 3 0 3
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 3 3
141 INPUT:
142 pdl *c
143 pdl *a
144 pdl *b
145 PPCODE:
146 3 ▶ if (PDL_IS_INPLACE(c)) PDL->pdl_barf("rlevec: c->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(c)) PDL->pdl_barf("rlevec: c->inplace but not supported"); 0 3 3
147 3 PDL->barf_if_error(pdl_run_rlevec(c,a,b));
148 3 ▶ PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 1 2 3
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 1 0 1
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 1 0 1
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 0 1 1
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 0 2 2
149  
150 void
151 _rldvec_int(a,b,c,sumover_max)
152 pdl *a
153 pdl *b
154 pdl *c
155 IV sumover_max
156 CODE:
157 9 PDL->barf_if_error(pdl_run_rldvec(a,b,c,sumover_max));
158  
159 void
160 pdl_run_rleseq(c, a=PDL_XS_PERLINIT_initsv(a_SV), b=PDL_XS_PERLINIT_initsv(b_SV))
161 SV *a_SV = items > 1 ? ST(1) : NULL;
162 SV *b_SV = items > 2 ? ST(2) : NULL;
163 PREINIT:
164 1 ▶ PDL_XS_PREAMBLE((items == 3) ? 0 : 2);
Branch: 11 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 1 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 1 0 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 1 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 0 0
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 1 0 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 1 0 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 1 0 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 1 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 0 0
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 1 0 1
PDL_XS_PREAMBLE((items == 3) ? 0 : 2); 0 1 1
165 INPUT:
166 pdl *c
167 pdl *a
168 pdl *b
169 PPCODE:
170 1 ▶ if (PDL_IS_INPLACE(c)) PDL->pdl_barf("rleseq: c->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(c)) PDL->pdl_barf("rleseq: c->inplace but not supported"); 0 1 1
171 1 PDL->barf_if_error(pdl_run_rleseq(c,a,b));
172 1 ▶ PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 1 0 1
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 1 0 1
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 1 0 1
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 0 1 1
PDL_XS_RETURN(ST(0) = a_SV;ST(1) = b_SV) 0 0 0
173  
174 void
175 _rldseq_int(a,b,c,sumover_max)
176 pdl *a
177 pdl *b
178 pdl *c
179 IV sumover_max
180 CODE:
181 2 PDL->barf_if_error(pdl_run_rldseq(a,b,c,sumover_max));
182  
183 void
184 pdl_run__clump_int(PARENT, n)
185 SV *CHILD_SV = NULL;
186 PREINIT:
187 8421 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 8421 0 8421
PDL_XS_PREAMBLE(1); 10 8411 8421
PDL_XS_PREAMBLE(1); 10 0 10
PDL_XS_PREAMBLE(1); 8421 0 8421
PDL_XS_PREAMBLE(1); 8421 0 8421
PDL_XS_PREAMBLE(1); 8421 0 8421
PDL_XS_PREAMBLE(1); 0 8421 8421
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 8421 0 8421
PDL_XS_PREAMBLE(1); 0 8421 8421
188 INPUT:
189 pdl *PARENT
190 PDL_Indx n
191 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
192 PPCODE:
193 8421 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("_clump_int: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("_clump_int: PARENT->inplace but not supported"); 0 8421 8421
194 8421 PDL->barf_if_error(pdl_run__clump_int(PARENT,CHILD,n));
195 8421 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 8421 0 8421
PDL_XS_RETURN(ST(0) = CHILD_SV) 8421 0 8421
PDL_XS_RETURN(ST(0) = CHILD_SV) 8421 0 8421
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 8421 8421
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
196  
197 void
198 pdl_run_xchg(PARENT, n1, n2)
199 SV *CHILD_SV = NULL;
200 PREINIT:
201 451 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 451 0 451
PDL_XS_PREAMBLE(1); 0 451 451
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 451 0 451
PDL_XS_PREAMBLE(1); 451 0 451
PDL_XS_PREAMBLE(1); 451 0 451
PDL_XS_PREAMBLE(1); 0 451 451
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 451 0 451
PDL_XS_PREAMBLE(1); 0 451 451
202 INPUT:
203 pdl *PARENT
204 PDL_Indx n1
205 PDL_Indx n2
206 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
207 PPCODE:
208 451 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("xchg: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("xchg: PARENT->inplace but not supported"); 0 451 451
209 451 PDL->barf_if_error(pdl_run_xchg(PARENT,CHILD,n1,n2));
210 451 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 451 0 451
PDL_XS_RETURN(ST(0) = CHILD_SV) 451 0 451
PDL_XS_RETURN(ST(0) = CHILD_SV) 451 0 451
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 451 451
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
211  
212 void
213 pdl_run_mv(PARENT, n1, n2)
214 SV *CHILD_SV = NULL;
215 PREINIT:
216 12620 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 12620 0 12620
PDL_XS_PREAMBLE(1); 0 12620 12620
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 12620 0 12620
PDL_XS_PREAMBLE(1); 12620 0 12620
PDL_XS_PREAMBLE(1); 12620 0 12620
PDL_XS_PREAMBLE(1); 0 12620 12620
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 12620 0 12620
PDL_XS_PREAMBLE(1); 0 12620 12620
217 INPUT:
218 pdl *PARENT
219 PDL_Indx n1
220 PDL_Indx n2
221 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
222 PPCODE:
223 12620 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("mv: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("mv: PARENT->inplace but not supported"); 0 12620 12620
224 12620 PDL->barf_if_error(pdl_run_mv(PARENT,CHILD,n1,n2));
225 12620 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 12620 0 12620
PDL_XS_RETURN(ST(0) = CHILD_SV) 12620 0 12620
PDL_XS_RETURN(ST(0) = CHILD_SV) 12620 0 12620
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 12620 12620
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
226  
227 void
228 pdl_run_lags(PARENT, nthdim, step, nlags)
229 SV *CHILD_SV = NULL;
230 PREINIT:
231 3 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 3 0 3
PDL_XS_PREAMBLE(1); 0 3 3
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 3 0 3
PDL_XS_PREAMBLE(1); 3 0 3
PDL_XS_PREAMBLE(1); 3 0 3
PDL_XS_PREAMBLE(1); 0 3 3
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 3 0 3
PDL_XS_PREAMBLE(1); 0 3 3
232 INPUT:
233 pdl *PARENT
234 PDL_Indx nthdim
235 PDL_Indx step
236 PDL_Indx nlags
237 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
238 PPCODE:
239 3 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("lags: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("lags: PARENT->inplace but not supported"); 0 3 3
240 3 PDL->barf_if_error(pdl_run_lags(PARENT,CHILD,nthdim,step,nlags));
241 3 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 3 0 3
PDL_XS_RETURN(ST(0) = CHILD_SV) 3 0 3
PDL_XS_RETURN(ST(0) = CHILD_SV) 3 0 3
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 3 3
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
242  
243 void
244 pdl_run_splitdim(PARENT, nthdim, nsp)
245 SV *CHILD_SV = NULL;
246 PREINIT:
247 76 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 76 0 76
PDL_XS_PREAMBLE(1); 0 76 76
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 76 0 76
PDL_XS_PREAMBLE(1); 76 0 76
PDL_XS_PREAMBLE(1); 76 0 76
PDL_XS_PREAMBLE(1); 0 76 76
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 76 0 76
PDL_XS_PREAMBLE(1); 0 76 76
248 INPUT:
249 pdl *PARENT
250 PDL_Indx nthdim
251 PDL_Indx nsp
252 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
253 PPCODE:
254 76 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("splitdim: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("splitdim: PARENT->inplace but not supported"); 0 76 76
255 76 PDL->barf_if_error(pdl_run_splitdim(PARENT,CHILD,nthdim,nsp));
256 76 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 76 0 76
PDL_XS_RETURN(ST(0) = CHILD_SV) 76 0 76
PDL_XS_RETURN(ST(0) = CHILD_SV) 76 0 76
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 76 76
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
257  
258 void
259 pdl_run_rotate(x, shift)
260 SV *y_SV = NULL;
261 PREINIT:
262 77 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 77 0 77
PDL_XS_PREAMBLE(1); 0 77 77
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 77 0 77
PDL_XS_PREAMBLE(1); 77 0 77
PDL_XS_PREAMBLE(1); 77 0 77
PDL_XS_PREAMBLE(1); 0 77 77
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 77 0 77
PDL_XS_PREAMBLE(1); 0 77 77
263 INPUT:
264 pdl *x
265 pdl *shift
266 pdl *y=PDL_XS_PERLINIT_initsv(y_SV);
267 PPCODE:
268 77 ▶ if (PDL_IS_INPLACE(x)) PDL->pdl_barf("rotate: x->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(x)) PDL->pdl_barf("rotate: x->inplace but not supported"); 0 77 77
269 77 ▶ if (PDL_IS_INPLACE(shift)) PDL->pdl_barf("rotate: shift->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(shift)) PDL->pdl_barf("rotate: shift->inplace but not supported"); 0 77 77
270 77 PDL->barf_if_error(pdl_run_rotate(x,shift,y));
271 77 ▶ PDL_XS_RETURN(ST(0) = y_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = y_SV) 77 0 77
PDL_XS_RETURN(ST(0) = y_SV) 77 0 77
PDL_XS_RETURN(ST(0) = y_SV) 77 0 77
PDL_XS_RETURN(ST(0) = y_SV) 0 77 77
PDL_XS_RETURN(ST(0) = y_SV) 0 0 0
272  
273 void
274 pdl_run_broadcastI(PARENT, id, whichdims)
275 SV *CHILD_SV = NULL;
276 PREINIT:
277 1115 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 1115 0 1115
PDL_XS_PREAMBLE(1); 0 1115 1115
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 1115 0 1115
PDL_XS_PREAMBLE(1); 1115 0 1115
PDL_XS_PREAMBLE(1); 1115 0 1115
PDL_XS_PREAMBLE(1); 0 1115 1115
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 1115 0 1115
PDL_XS_PREAMBLE(1); 0 1115 1115
278 INPUT:
279 PDL_Indx whichdims_count=0;
280 pdl *PARENT
281 PDL_Indx id
282 PDL_Indx *whichdims
283 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
284 PPCODE:
285 1115 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("broadcastI: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("broadcastI: PARENT->inplace but not supported"); 0 1115 1115
286 1115 PDL->barf_if_error(pdl_run_broadcastI(PARENT,CHILD,id,whichdims,whichdims_count));
287 1115 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 1115 0 1115
PDL_XS_RETURN(ST(0) = CHILD_SV) 1115 0 1115
PDL_XS_RETURN(ST(0) = CHILD_SV) 1115 0 1115
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 1115 1115
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
288  
289 void
290 pdl_run_unbroadcast(PARENT, atind)
291 SV *CHILD_SV = NULL;
292 PREINIT:
293 87 ▶ PDL_XS_PREAMBLE(1);
Branch: 10 branches
BranchTrueFalseTotal
PDL_XS_PREAMBLE(1); 87 0 87
PDL_XS_PREAMBLE(1); 0 87 87
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 87 0 87
PDL_XS_PREAMBLE(1); 87 0 87
PDL_XS_PREAMBLE(1); 87 0 87
PDL_XS_PREAMBLE(1); 0 87 87
PDL_XS_PREAMBLE(1); 0 0 0
PDL_XS_PREAMBLE(1); 87 0 87
PDL_XS_PREAMBLE(1); 0 87 87
294 INPUT:
295 pdl *PARENT
296 PDL_Indx atind
297 pdl *CHILD=PDL_XS_PERLINIT_initsv(CHILD_SV);
298 PPCODE:
299 87 ▶ if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("unbroadcast: PARENT->inplace but not supported");
Branch: 1 branch
BranchTrueFalseTotal
if (PDL_IS_INPLACE(PARENT)) PDL->pdl_barf("unbroadcast: PARENT->inplace but not supported"); 0 87 87
300 87 PDL->barf_if_error(pdl_run_unbroadcast(PARENT,CHILD,atind));
301 87 ▶ PDL_XS_RETURN(ST(0) = CHILD_SV)
Branch: 5 branches
BranchTrueFalseTotal
PDL_XS_RETURN(ST(0) = CHILD_SV) 87 0 87
PDL_XS_RETURN(ST(0) = CHILD_SV) 87 0 87
PDL_XS_RETURN(ST(0) = CHILD_SV) 87 0 87
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 87 87
PDL_XS_RETURN(ST(0) = CHILD_SV) 0 0 0
302  
303 void
304 _slice_int(PARENT,CHILD,arglist)
305 pdl *PARENT
306 pdl *CHILD
307 pdl_slice_args *arglist
308 CODE:
309 8884 PDL->barf_if_error(pdl_run_slice(PARENT,CHILD,arglist));
310  
311 void
312 _diagonal_int(PARENT,CHILD,whichdims)
313 PDL_Indx whichdims_count=0;
314 pdl *PARENT
315 pdl *CHILD
316 PDL_Indx *whichdims
317 CODE:
318 372 PDL->barf_if_error(pdl_run_diagonal(PARENT,CHILD,whichdims,whichdims_count));
319  
320  
321 #line 483 "lib/PDL/PP.pm"
322 BOOT:
323 /* Get pointer to structure of core shared C routines */
324 /* make sure PDL::Core is loaded */
325 #line 326 "lib/PDL/Slices.xs"
326 71 perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */
327 #ifndef aTHX_
328 #define aTHX_
329 #endif
330 71 ▶ if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV));
Branch: 3 branches
BranchTrueFalseTotal
if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); 71 0 71
if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); 0 71 71
if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); 0 0 0
331 71 SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */
332 71 ▶ if (!CoreSV)
Branch: 1 branch
BranchTrueFalseTotal
if (!CoreSV) 0 71 71
333 0 Perl_croak(aTHX_ "We require the PDL::Core module, which was not found");
334 71 ▶ if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */
Branch: 1 branch
BranchTrueFalseTotal
if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ 0 71 71
335 0 Perl_croak(aTHX_ "Got NULL pointer for PDL");
336 71 ▶ if (PDL->Version != PDL_CORE_VERSION)
Branch: 1 branch
BranchTrueFalseTotal
if (PDL->Version != PDL_CORE_VERSION) 0 71 71
337 0 Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::Slices needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION);
338 71 char *package = "PDL";
339 71 HV* stash = gv_stashpvn(package, strlen(package), TRUE);
340 71 char *meths[] = {"index","index1d","index2d","rangeb","_clump_int","xchg","mv","lags","splitdim","rotate","broadcastI","unbroadcast","slice","diagonal",NULL}, **methsptr = meths;
341 1065 ▶ for (; *methsptr; methsptr++) {
Branch: 1 branch
BranchTrueFalseTotal
for (; *methsptr; methsptr++) { 994 71 1065
342 994 SV **meth = hv_fetch(stash, *methsptr, strlen(*methsptr), 0);
343 994 ▶ if (!meth) croak("No found method '%s' in '%s'", *methsptr, package);
Branch: 1 branch
BranchTrueFalseTotal
if (!meth) croak("No found method '%s' in '%s'", *methsptr, package); 0 994 994
344 994 CV *cv = GvCV(*meth);
345 994 ▶ if (!cv) croak("No found CV for '%s' in '%s'", *methsptr, package);
Branch: 1 branch
BranchTrueFalseTotal
if (!cv) croak("No found CV for '%s' in '%s'", *methsptr, package); 0 994 994
346 994 CvLVALUE_on(cv);
347 }
« lib/PDL/IO/Pnm-pp-pnminraw.c ↑ Summary lib/PDL/Ops.xs »