lib/PDL/Image2D-pp-med2df.c

filter: Statementstmt 9.5% 81 / 847 Branchbran 4.8% 55 / 1140 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 6.8% 136 / 1987 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« lib/PDL/Image2D-pp-conv2d.c ↑ Summary lib/PDL/Ufunc-pp-intover.c »
1  
2 #line 453 "lib/PDL/PP.pm"
3 /*
4 * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/Image2D.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_Image2D
21 extern Core* PDL; /* Structure hold core C functions */
22 #line 23 "lib/PDL/Image2D-pp-med2df.c"
23  
24 /* Fast Modulus with proper negative behaviour */
25  
26 #define REALMOD(a,b) {while ((a)>=(b)) (a) -= (b); while ((a)<0) (a) += (b);}
27  
28 #define X(symbol, ctype, ppsym, ...) \
29 ctype quick_select_ ## ppsym(ctype arr[], int n);
30 PDL_TYPELIST_REAL(X)
31 #undef X
32  
33 #line 1877 "lib/PDL/PP.pm"
34 typedef struct pdl_params_med2df {
35 #line 36 "lib/PDL/Image2D-pp-med2df.c"
36 IV p_size;
37 IV q_size;
38 int opt;
39 } pdl_params_med2df;
40  
41  
42 #line 1888 "lib/PDL/PP.pm"
43 pdl_error pdl_med2df_redodims(pdl_trans *__privtrans) {
44 pdl_error PDL_err = {0, NULL, 0};
45 #line 46 "lib/PDL/Image2D-pp-med2df.c"
46 1 pdl_params_med2df *__params = __privtrans->params; (void)__params;
47 1 __privtrans->ind_sizes[4] = __params->p_size;
48 1 __privtrans->ind_sizes[5] = __params->q_size;
49 1 __privtrans->ind_sizes[0] = __privtrans->ind_sizes[4] + __privtrans->ind_sizes[2];
50 1 __privtrans->ind_sizes[1] = __privtrans->ind_sizes[5] + __privtrans->ind_sizes[3];
51 1 ▶ PDL_RETERROR(PDL_err, PDL->redodims_default(__privtrans));
Branch: 1 branch
BranchTrueFalseTotal
PDL_RETERROR(PDL_err, PDL->redodims_default(__privtrans)); 0 1 1
52 1 return PDL_err;
53 }
54  
55  
56 #line 1888 "lib/PDL/PP.pm"
57 pdl_error pdl_med2df_readdata(pdl_trans *__privtrans) {
58 pdl_error PDL_err = {0, NULL, 0};
59 #line 60 "lib/PDL/Image2D-pp-med2df.c"
60 1 pdl_params_med2df *__params = __privtrans->params; (void)__params;
61 1 register PDL_Indx __m_size = __privtrans->ind_sizes[2];
62 1 register PDL_Indx __n_size = __privtrans->ind_sizes[3];
63 1 register PDL_Indx __p_size = __privtrans->ind_sizes[4];
64 1 register PDL_Indx __q_size = __privtrans->ind_sizes[5];
65 1 ▶ if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "broadcast.incs NULL");
Branch: 1 branch
BranchTrueFalseTotal
if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "broadcast.incs NULL"); 0 1 1
66 /* broadcastloop declarations */
67 int __brcloopval;
68 register PDL_Indx __tind0,__tind1; /* counters along dim */
69 1 register PDL_Indx __tnpdls = __privtrans->broadcast.npdls;
70 /* dims here are how many steps along those dims */
71 1 register PDL_Indx __tinc0_a = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0);
72 1 register PDL_Indx __tinc0_b = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0);
73 1 register PDL_Indx __tinc0_mapi = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,0);
74 1 register PDL_Indx __tinc0_mapj = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,0);
75 1 register PDL_Indx __tinc1_a = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1);
76 1 register PDL_Indx __tinc1_b = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1);
77 1 register PDL_Indx __tinc1_mapi = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,1);
78 1 register PDL_Indx __tinc1_mapj = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,1);
79 #define PDL_BROADCASTLOOP_START_med2df_readdata PDL_BROADCASTLOOP_START( \
80 readdata, \
81 __privtrans->broadcast, \
82 __privtrans->vtable, \
83 a_datap += __offsp[0]; \
84 b_datap += __offsp[1]; \
85 mapi_datap += __offsp[2]; \
86 mapj_datap += __offsp[3]; \
87 , \
88 ( ,a_datap += __tinc1_a - __tinc0_a * __tdims0 \
89 ,b_datap += __tinc1_b - __tinc0_b * __tdims0 \
90 ,mapi_datap += __tinc1_mapi - __tinc0_mapi * __tdims0 \
91 ,mapj_datap += __tinc1_mapj - __tinc0_mapj * __tdims0 \
92 ), \
93 ( ,a_datap += __tinc0_a \
94 ,b_datap += __tinc0_b \
95 ,mapi_datap += __tinc0_mapi \
96 ,mapj_datap += __tinc0_mapj \
97 ) \
98 )
99 #define PDL_BROADCASTLOOP_END_med2df_readdata PDL_BROADCASTLOOP_END( \
100 __privtrans->broadcast, \
101 a_datap -= __tinc1_a * __tdims1 + __offsp[0]; \
102 b_datap -= __tinc1_b * __tdims1 + __offsp[1]; \
103 mapi_datap -= __tinc1_mapi * __tdims1 + __offsp[2]; \
104 mapj_datap -= __tinc1_mapj * __tdims1 + __offsp[3]; \
105 )
106 1 register PDL_Indx __inc_a_m = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,0,0)]; (void)__inc_a_m;register PDL_Indx __inc_a_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,0,1)]; (void)__inc_a_n;
107 1 register PDL_Indx __inc_b_m = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,1,0)]; (void)__inc_b_m;register PDL_Indx __inc_b_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,1,1)]; (void)__inc_b_n;
108 1 register PDL_Indx __inc_mapi_isize = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,2,0)]; (void)__inc_mapi_isize;
109 1 register PDL_Indx __inc_mapj_jsize = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,3,0)]; (void)__inc_mapj_jsize;
110 #ifndef PDL_DECLARE_PARAMS_med2df_1
111 #define PDL_DECLARE_PARAMS_med2df_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_mapi,PDL_PPSYM_PARAM_mapi,PDL_TYPE_PARAM_mapj,PDL_PPSYM_PARAM_mapj) \
112 PDL_DECLARE_PARAMETER(PDL_TYPE_OP, a, (__privtrans->pdls[0]), 1, PDL_PPSYM_OP) \
113 PDL_DECLARE_PARAMETER(PDL_TYPE_OP, b, (__privtrans->pdls[1]), 1, PDL_PPSYM_OP) \
114 PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_mapi, mapi, (__privtrans->pdls[2]), 1, PDL_PPSYM_PARAM_mapi) \
115 PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_mapj, mapj, (__privtrans->pdls[3]), 1, PDL_PPSYM_PARAM_mapj)
116 #endif
117 #define PDL_IF_BAD(t,f) f
118 1 switch (__privtrans->__datatype) { /* Start generic switch */
119 0 case PDL_SB: {
120 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_SByte,A,PDL_Indx,N,PDL_Indx,N) 0 0 0
121 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
122 0 int m_size = __privtrans->ind_sizes[2];
123 0 int n_size = __privtrans->ind_sizes[3];
124 0 int p_size = __privtrans->ind_sizes[4];
125 0 int q_size = __privtrans->ind_sizes[5];
126
127 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
128 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
129  
130 0 poff = p_size/2; mapi += p_size-1;
131 0 qoff = q_size/2; mapj += q_size-1;
132 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
133 0 i2 = i + poff;
134 0 switch (opt) {
135 0 case 1: /* REFLECT */
136 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
137 0 i2 = -i2-1;
138 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
139 0 i2 = 2*m_size-(i2+1);
140 0 break;
141 0 case 2: /* TRUNCATE */
142 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
143 0 i2 = -1;
144 0 break;
145 0 case 3: /* REPLICATE */
146 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
147 0 i2 = 0;
148 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
149 0 i2 = m_size-1;
150 0 break;
151 0 default:
152 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
153 }
154 0 mapi[i] = i2;
155 }
156 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
157 0 j2 = j + qoff;
158 0 switch (opt) {
159 0 case 1: /* REFLECT */
160 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
161 0 j2 = -j2-1;
162 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
163 0 j2 = 2*n_size-(j2+1);
164 0 break;
165 0 case 2: /* TRUNCATE */
166 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
167 0 j2 = -1;
168 0 break;
169 0 case 3: /* REPLICATE */
170 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
171 0 j2 = 0;
172 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
173 0 j2 = n_size-1;
174 0 break;
175 0 default:
176 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
177 }
178 0 mapj[j] = j2;
179 }
180  
181 0 PDL_SByte tmp[p_size*q_size];
182 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
183 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
184 0 int count = 0;
185 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
186 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
187 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
188 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
189 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
190 }} /* Close p */
191 }} /* Close q */
192 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_A (tmp, count );
193 }} /* Close n */}} /* Close m */
194 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
195 }
196 0 } break;
197 0 case PDL_B: {
198 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Byte,B,PDL_Indx,N,PDL_Indx,N) 0 0 0
199 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
200 0 int m_size = __privtrans->ind_sizes[2];
201 0 int n_size = __privtrans->ind_sizes[3];
202 0 int p_size = __privtrans->ind_sizes[4];
203 0 int q_size = __privtrans->ind_sizes[5];
204
205 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
206 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
207  
208 0 poff = p_size/2; mapi += p_size-1;
209 0 qoff = q_size/2; mapj += q_size-1;
210 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
211 0 i2 = i + poff;
212 0 switch (opt) {
213 0 case 1: /* REFLECT */
214 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
215 0 i2 = -i2-1;
216 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
217 0 i2 = 2*m_size-(i2+1);
218 0 break;
219 0 case 2: /* TRUNCATE */
220 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
221 0 i2 = -1;
222 0 break;
223 0 case 3: /* REPLICATE */
224 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
225 0 i2 = 0;
226 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
227 0 i2 = m_size-1;
228 0 break;
229 0 default:
230 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
231 }
232 0 mapi[i] = i2;
233 }
234 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
235 0 j2 = j + qoff;
236 0 switch (opt) {
237 0 case 1: /* REFLECT */
238 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
239 0 j2 = -j2-1;
240 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
241 0 j2 = 2*n_size-(j2+1);
242 0 break;
243 0 case 2: /* TRUNCATE */
244 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
245 0 j2 = -1;
246 0 break;
247 0 case 3: /* REPLICATE */
248 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
249 0 j2 = 0;
250 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
251 0 j2 = n_size-1;
252 0 break;
253 0 default:
254 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
255 }
256 0 mapj[j] = j2;
257 }
258  
259 0 PDL_Byte tmp[p_size*q_size];
260 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
261 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
262 0 int count = 0;
263 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
264 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
265 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
266 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
267 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
268 }} /* Close p */
269 }} /* Close q */
270 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_B (tmp, count );
271 }} /* Close n */}} /* Close m */
272 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
273 }
274 0 } break;
275 0 case PDL_S: {
276 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Short,S,PDL_Indx,N,PDL_Indx,N) 0 0 0
277 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
278 0 int m_size = __privtrans->ind_sizes[2];
279 0 int n_size = __privtrans->ind_sizes[3];
280 0 int p_size = __privtrans->ind_sizes[4];
281 0 int q_size = __privtrans->ind_sizes[5];
282
283 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
284 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
285  
286 0 poff = p_size/2; mapi += p_size-1;
287 0 qoff = q_size/2; mapj += q_size-1;
288 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
289 0 i2 = i + poff;
290 0 switch (opt) {
291 0 case 1: /* REFLECT */
292 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
293 0 i2 = -i2-1;
294 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
295 0 i2 = 2*m_size-(i2+1);
296 0 break;
297 0 case 2: /* TRUNCATE */
298 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
299 0 i2 = -1;
300 0 break;
301 0 case 3: /* REPLICATE */
302 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
303 0 i2 = 0;
304 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
305 0 i2 = m_size-1;
306 0 break;
307 0 default:
308 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
309 }
310 0 mapi[i] = i2;
311 }
312 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
313 0 j2 = j + qoff;
314 0 switch (opt) {
315 0 case 1: /* REFLECT */
316 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
317 0 j2 = -j2-1;
318 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
319 0 j2 = 2*n_size-(j2+1);
320 0 break;
321 0 case 2: /* TRUNCATE */
322 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
323 0 j2 = -1;
324 0 break;
325 0 case 3: /* REPLICATE */
326 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
327 0 j2 = 0;
328 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
329 0 j2 = n_size-1;
330 0 break;
331 0 default:
332 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
333 }
334 0 mapj[j] = j2;
335 }
336  
337 0 PDL_Short tmp[p_size*q_size];
338 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
339 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
340 0 int count = 0;
341 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
342 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
343 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
344 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
345 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
346 }} /* Close p */
347 }} /* Close q */
348 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_S (tmp, count );
349 }} /* Close n */}} /* Close m */
350 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
351 }
352 0 } break;
353 0 case PDL_US: {
354 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Ushort,U,PDL_Indx,N,PDL_Indx,N) 0 0 0
355 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
356 0 int m_size = __privtrans->ind_sizes[2];
357 0 int n_size = __privtrans->ind_sizes[3];
358 0 int p_size = __privtrans->ind_sizes[4];
359 0 int q_size = __privtrans->ind_sizes[5];
360
361 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
362 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
363  
364 0 poff = p_size/2; mapi += p_size-1;
365 0 qoff = q_size/2; mapj += q_size-1;
366 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
367 0 i2 = i + poff;
368 0 switch (opt) {
369 0 case 1: /* REFLECT */
370 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
371 0 i2 = -i2-1;
372 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
373 0 i2 = 2*m_size-(i2+1);
374 0 break;
375 0 case 2: /* TRUNCATE */
376 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
377 0 i2 = -1;
378 0 break;
379 0 case 3: /* REPLICATE */
380 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
381 0 i2 = 0;
382 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
383 0 i2 = m_size-1;
384 0 break;
385 0 default:
386 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
387 }
388 0 mapi[i] = i2;
389 }
390 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
391 0 j2 = j + qoff;
392 0 switch (opt) {
393 0 case 1: /* REFLECT */
394 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
395 0 j2 = -j2-1;
396 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
397 0 j2 = 2*n_size-(j2+1);
398 0 break;
399 0 case 2: /* TRUNCATE */
400 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
401 0 j2 = -1;
402 0 break;
403 0 case 3: /* REPLICATE */
404 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
405 0 j2 = 0;
406 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
407 0 j2 = n_size-1;
408 0 break;
409 0 default:
410 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
411 }
412 0 mapj[j] = j2;
413 }
414  
415 0 PDL_Ushort tmp[p_size*q_size];
416 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
417 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
418 0 int count = 0;
419 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
420 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
421 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
422 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
423 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
424 }} /* Close p */
425 }} /* Close q */
426 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_U (tmp, count );
427 }} /* Close n */}} /* Close m */
428 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
429 }
430 0 } break;
431 0 case PDL_L: {
432 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Long,L,PDL_Indx,N,PDL_Indx,N) 0 0 0
433 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
434 0 int m_size = __privtrans->ind_sizes[2];
435 0 int n_size = __privtrans->ind_sizes[3];
436 0 int p_size = __privtrans->ind_sizes[4];
437 0 int q_size = __privtrans->ind_sizes[5];
438
439 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
440 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
441  
442 0 poff = p_size/2; mapi += p_size-1;
443 0 qoff = q_size/2; mapj += q_size-1;
444 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
445 0 i2 = i + poff;
446 0 switch (opt) {
447 0 case 1: /* REFLECT */
448 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
449 0 i2 = -i2-1;
450 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
451 0 i2 = 2*m_size-(i2+1);
452 0 break;
453 0 case 2: /* TRUNCATE */
454 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
455 0 i2 = -1;
456 0 break;
457 0 case 3: /* REPLICATE */
458 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
459 0 i2 = 0;
460 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
461 0 i2 = m_size-1;
462 0 break;
463 0 default:
464 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
465 }
466 0 mapi[i] = i2;
467 }
468 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
469 0 j2 = j + qoff;
470 0 switch (opt) {
471 0 case 1: /* REFLECT */
472 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
473 0 j2 = -j2-1;
474 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
475 0 j2 = 2*n_size-(j2+1);
476 0 break;
477 0 case 2: /* TRUNCATE */
478 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
479 0 j2 = -1;
480 0 break;
481 0 case 3: /* REPLICATE */
482 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
483 0 j2 = 0;
484 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
485 0 j2 = n_size-1;
486 0 break;
487 0 default:
488 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
489 }
490 0 mapj[j] = j2;
491 }
492  
493 0 PDL_Long tmp[p_size*q_size];
494 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
495 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
496 0 int count = 0;
497 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
498 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
499 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
500 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
501 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
502 }} /* Close p */
503 }} /* Close q */
504 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_L (tmp, count );
505 }} /* Close n */}} /* Close m */
506 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
507 }
508 0 } break;
509 0 case PDL_UL: {
510 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULong,K,PDL_Indx,N,PDL_Indx,N) 0 0 0
511 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
512 0 int m_size = __privtrans->ind_sizes[2];
513 0 int n_size = __privtrans->ind_sizes[3];
514 0 int p_size = __privtrans->ind_sizes[4];
515 0 int q_size = __privtrans->ind_sizes[5];
516
517 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
518 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
519  
520 0 poff = p_size/2; mapi += p_size-1;
521 0 qoff = q_size/2; mapj += q_size-1;
522 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
523 0 i2 = i + poff;
524 0 switch (opt) {
525 0 case 1: /* REFLECT */
526 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
527 0 i2 = -i2-1;
528 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
529 0 i2 = 2*m_size-(i2+1);
530 0 break;
531 0 case 2: /* TRUNCATE */
532 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
533 0 i2 = -1;
534 0 break;
535 0 case 3: /* REPLICATE */
536 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
537 0 i2 = 0;
538 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
539 0 i2 = m_size-1;
540 0 break;
541 0 default:
542 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
543 }
544 0 mapi[i] = i2;
545 }
546 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
547 0 j2 = j + qoff;
548 0 switch (opt) {
549 0 case 1: /* REFLECT */
550 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
551 0 j2 = -j2-1;
552 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
553 0 j2 = 2*n_size-(j2+1);
554 0 break;
555 0 case 2: /* TRUNCATE */
556 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
557 0 j2 = -1;
558 0 break;
559 0 case 3: /* REPLICATE */
560 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
561 0 j2 = 0;
562 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
563 0 j2 = n_size-1;
564 0 break;
565 0 default:
566 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
567 }
568 0 mapj[j] = j2;
569 }
570  
571 0 PDL_ULong tmp[p_size*q_size];
572 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
573 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
574 0 int count = 0;
575 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
576 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
577 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
578 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
579 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
580 }} /* Close p */
581 }} /* Close q */
582 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_K (tmp, count );
583 }} /* Close n */}} /* Close m */
584 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
585 }
586 0 } break;
587 0 case PDL_IND: {
588 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Indx,N,PDL_Indx,N,PDL_Indx,N) 0 0 0
589 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
590 0 int m_size = __privtrans->ind_sizes[2];
591 0 int n_size = __privtrans->ind_sizes[3];
592 0 int p_size = __privtrans->ind_sizes[4];
593 0 int q_size = __privtrans->ind_sizes[5];
594
595 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
596 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
597  
598 0 poff = p_size/2; mapi += p_size-1;
599 0 qoff = q_size/2; mapj += q_size-1;
600 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
601 0 i2 = i + poff;
602 0 switch (opt) {
603 0 case 1: /* REFLECT */
604 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
605 0 i2 = -i2-1;
606 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
607 0 i2 = 2*m_size-(i2+1);
608 0 break;
609 0 case 2: /* TRUNCATE */
610 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
611 0 i2 = -1;
612 0 break;
613 0 case 3: /* REPLICATE */
614 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
615 0 i2 = 0;
616 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
617 0 i2 = m_size-1;
618 0 break;
619 0 default:
620 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
621 }
622 0 mapi[i] = i2;
623 }
624 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
625 0 j2 = j + qoff;
626 0 switch (opt) {
627 0 case 1: /* REFLECT */
628 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
629 0 j2 = -j2-1;
630 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
631 0 j2 = 2*n_size-(j2+1);
632 0 break;
633 0 case 2: /* TRUNCATE */
634 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
635 0 j2 = -1;
636 0 break;
637 0 case 3: /* REPLICATE */
638 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
639 0 j2 = 0;
640 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
641 0 j2 = n_size-1;
642 0 break;
643 0 default:
644 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
645 }
646 0 mapj[j] = j2;
647 }
648  
649 0 PDL_Indx tmp[p_size*q_size];
650 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
651 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
652 0 int count = 0;
653 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
654 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
655 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
656 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
657 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
658 }} /* Close p */
659 }} /* Close q */
660 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_N (tmp, count );
661 }} /* Close n */}} /* Close m */
662 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
663 }
664 0 } break;
665 0 case PDL_ULL: {
666 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_ULongLong,P,PDL_Indx,N,PDL_Indx,N) 0 0 0
667 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
668 0 int m_size = __privtrans->ind_sizes[2];
669 0 int n_size = __privtrans->ind_sizes[3];
670 0 int p_size = __privtrans->ind_sizes[4];
671 0 int q_size = __privtrans->ind_sizes[5];
672
673 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
674 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
675  
676 0 poff = p_size/2; mapi += p_size-1;
677 0 qoff = q_size/2; mapj += q_size-1;
678 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
679 0 i2 = i + poff;
680 0 switch (opt) {
681 0 case 1: /* REFLECT */
682 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
683 0 i2 = -i2-1;
684 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
685 0 i2 = 2*m_size-(i2+1);
686 0 break;
687 0 case 2: /* TRUNCATE */
688 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
689 0 i2 = -1;
690 0 break;
691 0 case 3: /* REPLICATE */
692 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
693 0 i2 = 0;
694 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
695 0 i2 = m_size-1;
696 0 break;
697 0 default:
698 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
699 }
700 0 mapi[i] = i2;
701 }
702 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
703 0 j2 = j + qoff;
704 0 switch (opt) {
705 0 case 1: /* REFLECT */
706 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
707 0 j2 = -j2-1;
708 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
709 0 j2 = 2*n_size-(j2+1);
710 0 break;
711 0 case 2: /* TRUNCATE */
712 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
713 0 j2 = -1;
714 0 break;
715 0 case 3: /* REPLICATE */
716 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
717 0 j2 = 0;
718 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
719 0 j2 = n_size-1;
720 0 break;
721 0 default:
722 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
723 }
724 0 mapj[j] = j2;
725 }
726  
727 0 PDL_ULongLong tmp[p_size*q_size];
728 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
729 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
730 0 int count = 0;
731 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
732 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
733 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
734 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
735 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
736 }} /* Close p */
737 }} /* Close q */
738 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_P (tmp, count );
739 }} /* Close n */}} /* Close m */
740 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
741 }
742 0 } break;
743 0 case PDL_LL: {
744 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LongLong,Q,PDL_Indx,N,PDL_Indx,N) 0 0 0
745 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
746 0 int m_size = __privtrans->ind_sizes[2];
747 0 int n_size = __privtrans->ind_sizes[3];
748 0 int p_size = __privtrans->ind_sizes[4];
749 0 int q_size = __privtrans->ind_sizes[5];
750
751 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
752 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
753  
754 0 poff = p_size/2; mapi += p_size-1;
755 0 qoff = q_size/2; mapj += q_size-1;
756 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
757 0 i2 = i + poff;
758 0 switch (opt) {
759 0 case 1: /* REFLECT */
760 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
761 0 i2 = -i2-1;
762 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
763 0 i2 = 2*m_size-(i2+1);
764 0 break;
765 0 case 2: /* TRUNCATE */
766 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
767 0 i2 = -1;
768 0 break;
769 0 case 3: /* REPLICATE */
770 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
771 0 i2 = 0;
772 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
773 0 i2 = m_size-1;
774 0 break;
775 0 default:
776 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
777 }
778 0 mapi[i] = i2;
779 }
780 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
781 0 j2 = j + qoff;
782 0 switch (opt) {
783 0 case 1: /* REFLECT */
784 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
785 0 j2 = -j2-1;
786 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
787 0 j2 = 2*n_size-(j2+1);
788 0 break;
789 0 case 2: /* TRUNCATE */
790 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
791 0 j2 = -1;
792 0 break;
793 0 case 3: /* REPLICATE */
794 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
795 0 j2 = 0;
796 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
797 0 j2 = n_size-1;
798 0 break;
799 0 default:
800 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
801 }
802 0 mapj[j] = j2;
803 }
804  
805 0 PDL_LongLong tmp[p_size*q_size];
806 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
807 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
808 0 int count = 0;
809 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
810 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
811 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
812 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
813 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
814 }} /* Close p */
815 }} /* Close q */
816 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_Q (tmp, count );
817 }} /* Close n */}} /* Close m */
818 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
819 }
820 0 } break;
821 0 case PDL_F: {
822 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_Float,F,PDL_Indx,N,PDL_Indx,N) 0 0 0
823 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
824 0 int m_size = __privtrans->ind_sizes[2];
825 0 int n_size = __privtrans->ind_sizes[3];
826 0 int p_size = __privtrans->ind_sizes[4];
827 0 int q_size = __privtrans->ind_sizes[5];
828
829 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
830 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
831  
832 0 poff = p_size/2; mapi += p_size-1;
833 0 qoff = q_size/2; mapj += q_size-1;
834 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
835 0 i2 = i + poff;
836 0 switch (opt) {
837 0 case 1: /* REFLECT */
838 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
839 0 i2 = -i2-1;
840 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
841 0 i2 = 2*m_size-(i2+1);
842 0 break;
843 0 case 2: /* TRUNCATE */
844 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
845 0 i2 = -1;
846 0 break;
847 0 case 3: /* REPLICATE */
848 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
849 0 i2 = 0;
850 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
851 0 i2 = m_size-1;
852 0 break;
853 0 default:
854 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
855 }
856 0 mapi[i] = i2;
857 }
858 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
859 0 j2 = j + qoff;
860 0 switch (opt) {
861 0 case 1: /* REFLECT */
862 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
863 0 j2 = -j2-1;
864 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
865 0 j2 = 2*n_size-(j2+1);
866 0 break;
867 0 case 2: /* TRUNCATE */
868 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
869 0 j2 = -1;
870 0 break;
871 0 case 3: /* REPLICATE */
872 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
873 0 j2 = 0;
874 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
875 0 j2 = n_size-1;
876 0 break;
877 0 default:
878 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
879 }
880 0 mapj[j] = j2;
881 }
882  
883 0 PDL_Float tmp[p_size*q_size];
884 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
885 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
886 0 int count = 0;
887 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
888 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
889 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
890 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
891 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
892 }} /* Close p */
893 }} /* Close q */
894 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_F (tmp, count );
895 }} /* Close n */}} /* Close m */
896 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
897 }
898 0 } break;
899 1 case PDL_D: {
900 1 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 1 0 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 1 0 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 1 0 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 1 0 1
PDL_DECLARE_PARAMS_med2df_1(PDL_Double,D,PDL_Indx,N,PDL_Indx,N) 0 1 1
901 1 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
902 1 int m_size = __privtrans->ind_sizes[2];
903 1 int n_size = __privtrans->ind_sizes[3];
904 1 int p_size = __privtrans->ind_sizes[4];
905 1 int q_size = __privtrans->ind_sizes[5];
906
907 1 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
908 1 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 1 0 1
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 1 1
909  
910 1 poff = p_size/2; mapi += p_size-1;
911 1 qoff = q_size/2; mapj += q_size-1;
912 13 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 12 1 13
913 12 i2 = i + poff;
914 12 switch (opt) {
915 0 case 1: /* REFLECT */
916 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
917 0 i2 = -i2-1;
918 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
919 0 i2 = 2*m_size-(i2+1);
920 0 break;
921 12 case 2: /* TRUNCATE */
922 12 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 11 1 12
if (i2<0 || i2 >= m_size) 1 10 11
923 2 i2 = -1;
924 12 break;
925 0 case 3: /* REPLICATE */
926 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
927 0 i2 = 0;
928 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
929 0 i2 = m_size-1;
930 0 break;
931 0 default:
932 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
933 }
934 12 mapi[i] = i2;
935 }
936 13 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 12 1 13
937 12 j2 = j + qoff;
938 12 switch (opt) {
939 0 case 1: /* REFLECT */
940 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
941 0 j2 = -j2-1;
942 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
943 0 j2 = 2*n_size-(j2+1);
944 0 break;
945 12 case 2: /* TRUNCATE */
946 12 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 11 1 12
if (j2<0 || j2 >= n_size) 1 10 11
947 2 j2 = -1;
948 12 break;
949 0 case 3: /* REPLICATE */
950 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
951 0 j2 = 0;
952 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
953 0 j2 = n_size-1;
954 0 break;
955 0 default:
956 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
957 }
958 12 mapj[j] = j2;
959 }
960  
961 1 PDL_Double tmp[p_size*q_size];
962 4 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 1 1
PDL_BROADCASTLOOP_START_med2df_readdata 0 1 1
PDL_BROADCASTLOOP_START_med2df_readdata 0 1 1
PDL_BROADCASTLOOP_START_med2df_readdata 0 1 1
PDL_BROADCASTLOOP_START_med2df_readdata 0 1 1
PDL_BROADCASTLOOP_START_med2df_readdata 1 1 2
PDL_BROADCASTLOOP_START_med2df_readdata 1 1 2
963 111 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 100 10 110
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 10 1 11
964 100 int count = 0;
965 400 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 300 100 400
966 300 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 20 280 300
967 1120 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 840 280 1120
968 840 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 56 784 840
969 784 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
970 }} /* Close p */
971 }} /* Close q */
972 100 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_D (tmp, count );
973 }} /* Close n */}} /* Close m */
974 1 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 1 1
PDL_BROADCASTLOOP_END_med2df_readdata 0 1 1
975 }
976 1 } break;
977 0 case PDL_LD: {
978 0 ▶ PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N)
Branch: 12 branches
BranchTrueFalseTotal
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
PDL_DECLARE_PARAMS_med2df_1(PDL_LDouble,E,PDL_Indx,N,PDL_Indx,N) 0 0 0
979 0 {int i,j, i2,j2, poff, qoff;int opt = __params->opt;
980 0 int m_size = __privtrans->ind_sizes[2];
981 0 int n_size = __privtrans->ind_sizes[3];
982 0 int p_size = __privtrans->ind_sizes[4];
983 0 int q_size = __privtrans->ind_sizes[5];
984
985 0 PDL_Indx *mapi = mapi_datap, *mapj = mapj_datap;
986 0 ▶ if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory");
Branch: 2 branches
BranchTrueFalseTotal
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
if ((mapi==NULL) || (mapj==NULL)) return PDL->make_error(PDL_EUSERERROR, "Error in med2df:" "Out of Memory"); 0 0 0
987  
988 0 poff = p_size/2; mapi += p_size-1;
989 0 qoff = q_size/2; mapj += q_size-1;
990 0 ▶ for ( i = 1-p_size; i< m_size; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( i = 1-p_size; i< m_size; i++) { 0 0 0
991 0 i2 = i + poff;
992 0 switch (opt) {
993 0 case 1: /* REFLECT */
994 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
995 0 i2 = -i2-1;
996 0 ▶ else if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (i2 >= m_size) 0 0 0
997 0 i2 = 2*m_size-(i2+1);
998 0 break;
999 0 case 2: /* TRUNCATE */
1000 0 ▶ if (i2<0 || i2 >= m_size)
Branch: 2 branches
BranchTrueFalseTotal
if (i2<0 || i2 >= m_size) 0 0 0
if (i2<0 || i2 >= m_size) 0 0 0
1001 0 i2 = -1;
1002 0 break;
1003 0 case 3: /* REPLICATE */
1004 0 ▶ if (i2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (i2<0) 0 0 0
1005 0 i2 = 0;
1006 0 ▶ if (i2 >= m_size)
Branch: 1 branch
BranchTrueFalseTotal
if (i2 >= m_size) 0 0 0
1007 0 i2 = m_size-1;
1008 0 break;
1009 0 default:
1010 0 ▶ REALMOD(i2,m_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(i2,m_size); 0 0 0
REALMOD(i2,m_size); 0 0 0
1011 }
1012 0 mapi[i] = i2;
1013 }
1014 0 ▶ for ( j = 1-q_size; j< n_size; j++) {
Branch: 1 branch
BranchTrueFalseTotal
for ( j = 1-q_size; j< n_size; j++) { 0 0 0
1015 0 j2 = j + qoff;
1016 0 switch (opt) {
1017 0 case 1: /* REFLECT */
1018 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
1019 0 j2 = -j2-1;
1020 0 ▶ else if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
else if (j2 >= n_size) 0 0 0
1021 0 j2 = 2*n_size-(j2+1);
1022 0 break;
1023 0 case 2: /* TRUNCATE */
1024 0 ▶ if (j2<0 || j2 >= n_size)
Branch: 2 branches
BranchTrueFalseTotal
if (j2<0 || j2 >= n_size) 0 0 0
if (j2<0 || j2 >= n_size) 0 0 0
1025 0 j2 = -1;
1026 0 break;
1027 0 case 3: /* REPLICATE */
1028 0 ▶ if (j2<0)
Branch: 1 branch
BranchTrueFalseTotal
if (j2<0) 0 0 0
1029 0 j2 = 0;
1030 0 ▶ if (j2 >= n_size)
Branch: 1 branch
BranchTrueFalseTotal
if (j2 >= n_size) 0 0 0
1031 0 j2 = n_size-1;
1032 0 break;
1033 0 default:
1034 0 ▶ REALMOD(j2,n_size);
Branch: 2 branches
BranchTrueFalseTotal
REALMOD(j2,n_size); 0 0 0
REALMOD(j2,n_size); 0 0 0
1035 }
1036 0 mapj[j] = j2;
1037 }
1038  
1039 0 PDL_LDouble tmp[p_size*q_size];
1040 0 ▶ PDL_BROADCASTLOOP_START_med2df_readdata
Branch: 7 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_START_med2df_readdata 0 0 0
1041 0 ▶ {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) {
Branch: 2 branches
BranchTrueFalseTotal
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
{/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {{/* Open m */ PDL_EXPAND2(register PDL_Indx m=0, __m_stop=(__m_size)); for(; m<__m_stop; m+=1) { 0 0 0
1042 0 int count = 0;
1043 0 ▶ {/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open q */ PDL_EXPAND2(register PDL_Indx q=0, __q_stop=(__q_size)); for(; q<__q_stop; q+=1) { 0 0 0
1044 0 ▶ if ((j2 = mapj[n-q]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((j2 = mapj[n-q]) < 0) continue; 0 0 0
1045 0 ▶ {/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) {
Branch: 1 branch
BranchTrueFalseTotal
{/* Open p */ PDL_EXPAND2(register PDL_Indx p=0, __p_stop=(__p_size)); for(; p<__p_stop; p+=1) { 0 0 0
1046 0 ▶ if ((i2 = mapi[m-p]) < 0) continue;
Branch: 1 branch
BranchTrueFalseTotal
if ((i2 = mapi[m-p]) < 0) continue; 0 0 0
1047 0 tmp[count++] = (a_datap)[0+(__inc_a_m*(i2))+(__inc_a_n*(j2))];
1048 }} /* Close p */
1049 }} /* Close q */
1050 0 (b_datap)[0+(__inc_b_m*(m))+(__inc_b_n*(n))] = quick_select_E (tmp, count );
1051 }} /* Close n */}} /* Close m */
1052 0 ▶ PDL_BROADCASTLOOP_END_med2df_readdata
Branch: 2 branches
BranchTrueFalseTotal
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
PDL_BROADCASTLOOP_END_med2df_readdata 0 0 0
1053 }
1054 0 } break;
1055 0 default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in med2df: unhandled datatype(%d), only handles (ABSULKNPQFDE)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype);
1056 }
1057 #undef PDL_IF_BAD
1058 1 return PDL_err;
1059 }
1060  
1061 static pdl_datatypes pdl_med2df_vtable_gentypes[] = { PDL_SB, PDL_B, PDL_S, PDL_US, PDL_L, PDL_UL, PDL_IND, PDL_ULL, PDL_LL, PDL_F, PDL_D, PDL_LD, -1 };
1062 static PDL_Indx pdl_med2df_vtable_realdims[] = { 2, 2, 1, 1 };
1063 static char *pdl_med2df_vtable_parnames[] = { "a","b","mapi","mapj" };
1064 static short pdl_med2df_vtable_parflags[] = {
1065 0,
1066 PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISWRITE,
1067 PDL_PARAM_ISCREAT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTEMP|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE,
1068 PDL_PARAM_ISCREAT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTEMP|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE
1069 };
1070 static pdl_datatypes pdl_med2df_vtable_partypes[] = { -1, -1, PDL_IND, PDL_IND };
1071 static PDL_Indx pdl_med2df_vtable_realdims_starts[] = { 0, 2, 4, 5 };
1072 static PDL_Indx pdl_med2df_vtable_realdims_ind_ids[] = { 2, 3, 2, 3, 0, 1 };
1073 static char *pdl_med2df_vtable_indnames[] = { "isize","jsize","m","n","p","q" };
1074 pdl_transvtable pdl_med2df_vtable = {
1075 PDL_TRANS_DO_BROADCAST, 0, pdl_med2df_vtable_gentypes, 1, 4, NULL /*CORE21*/,
1076 pdl_med2df_vtable_realdims, pdl_med2df_vtable_parnames,
1077 pdl_med2df_vtable_parflags, pdl_med2df_vtable_partypes,
1078 pdl_med2df_vtable_realdims_starts, pdl_med2df_vtable_realdims_ind_ids, 6,
1079 6, pdl_med2df_vtable_indnames,
1080 pdl_med2df_redodims, pdl_med2df_readdata, NULL,
1081 NULL,
1082 sizeof(pdl_params_med2df),"PDL::Image2D::med2df"
1083 };
1084  
1085  
1086 1 pdl_error pdl_run_med2df(pdl *a,pdl *b,IV p_size,IV q_size,int opt) {
1087 1 pdl_error PDL_err = {0, NULL, 0};
1088 1 ▶ if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0};
Branch: 1 branch
BranchTrueFalseTotal
if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0}; 0 1 1
1089 1 pdl_trans *__privtrans = PDL->create_trans(&pdl_med2df_vtable);
1090 1 ▶ if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans");
Branch: 1 branch
BranchTrueFalseTotal
if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans"); 0 1 1
1091 1 pdl_params_med2df *__params = __privtrans->params;
1092 1 __privtrans->pdls[0] = a;
1093 1 __privtrans->pdls[1] = b;
1094 1 ▶ PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans));
Branch: 1 branch
BranchTrueFalseTotal
PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans)); 0 1 1
1095 1 (__params->p_size) = (p_size); /* CType.get_copy */
1096 1 (__params->q_size) = (q_size); /* CType.get_copy */
1097 1 (__params->opt) = (opt); /* CType.get_copy */
1098 1 ▶ PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans));
Branch: 1 branch
BranchTrueFalseTotal
PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans)); 0 1 1
1099 1 return PDL_err;
1100 }
« lib/PDL/Image2D-pp-conv2d.c ↑ Summary lib/PDL/Ufunc-pp-intover.c »