File Coverage

lib/PDL/Ufunc-pp-bandover.c
Criterion Covered Total %
statement 32 114 28.0
branch 45 624 7.2
condition n/a
subroutine n/a
pod n/a
total 77 738 10.4


line stmt bran cond sub pod time code
1              
2             #line 453 "lib/PDL/PP.pm"
3             /*
4             * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/Ufunc.pd! Do not modify!
5             */
6              
7             #define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \
8             if (destroy) { \
9             comp_free_code \
10             } \
11             if ((trans)->dims_redone) { \
12             ntpriv_free_code \
13             }
14              
15             #include "EXTERN.h"
16             #include "perl.h"
17             #include "XSUB.h"
18             #include "pdl.h"
19             #include "pdlcore.h"
20             #define PDL PDL_Ufunc
21             extern Core* PDL; /* Structure hold core C functions */
22              
23             #line 1857 "lib/PDL/PP.pm"
24             pdl_error pdl_bandover_readdata(pdl_trans *__privtrans) {
25             pdl_error PDL_err = {0, NULL, 0};
26             #line 27 "lib/PDL/Ufunc-pp-bandover.c"
27 2           register PDL_Indx __n_size = __privtrans->ind_sizes[0];
28 2 50         if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in bandover:" "broadcast.incs NULL");
29             /* broadcastloop declarations */
30             int __brcloopval;
31             register PDL_Indx __tind0,__tind1; /* counters along dim */
32 2           register PDL_Indx __tnpdls = __privtrans->broadcast.npdls;
33             /* dims here are how many steps along those dims */
34 2           register PDL_Indx __tinc0_a = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0);
35 2           register PDL_Indx __tinc0_b = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0);
36 2           register PDL_Indx __tinc1_a = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1);
37 2           register PDL_Indx __tinc1_b = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1);
38             #define PDL_BROADCASTLOOP_START_bandover_readdata PDL_BROADCASTLOOP_START( \
39             readdata, \
40             __privtrans->broadcast, \
41             __privtrans->vtable, \
42             a_datap += __offsp[0]; \
43             b_datap += __offsp[1]; \
44             , \
45             ( ,a_datap += __tinc1_a - __tinc0_a * __tdims0 \
46             ,b_datap += __tinc1_b - __tinc0_b * __tdims0 \
47             ), \
48             ( ,a_datap += __tinc0_a \
49             ,b_datap += __tinc0_b \
50             ) \
51             )
52             #define PDL_BROADCASTLOOP_END_bandover_readdata PDL_BROADCASTLOOP_END( \
53             __privtrans->broadcast, \
54             a_datap -= __tinc1_a * __tdims1 + __offsp[0]; \
55             b_datap -= __tinc1_b * __tdims1 + __offsp[1]; \
56             )
57 2           register PDL_Indx __inc_a_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,0,0)]; (void)__inc_a_n;
58             #ifndef PDL_DECLARE_PARAMS_bandover_1
59             #define PDL_DECLARE_PARAMS_bandover_1(PDL_TYPE_OP,PDL_PPSYM_OP) \
60             PDL_DECLARE_PARAMETER_BADVAL(PDL_TYPE_OP, a, (__privtrans->pdls[0]), 1, PDL_PPSYM_OP) \
61             PDL_DECLARE_PARAMETER_BADVAL(PDL_TYPE_OP, b, (__privtrans->pdls[1]), 1, PDL_PPSYM_OP)
62             #endif
63 2 100         if ( __privtrans->bvalflag ) { /* ** do 'bad' Code ** */
64             #define PDL_BAD_CODE
65             #define PDL_IF_BAD(t,f) t
66 1           switch (__privtrans->__datatype) { /* Start generic switch */
67 0           case PDL_SB: {
68 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_SByte,A)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
69 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
70             #line 171 "lib/PDL/Ufunc.pd"
71             PDL_SByte tmp = ~0;
72             PDL_IF_BAD(int flag = 0;,)
73             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
74             #line 174 "lib/PDL/Ufunc.pd"
75             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,A,a_badval_isnan) ) continue; flag = 1;,)
76             tmp &= (a_datap)[0+(__inc_a_n*(n))];
77             if ( !tmp ) break;
78             }} /* Close n */
79             #line 178 "lib/PDL/Ufunc.pd"
80             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
81             (b_datap)[0] = tmp;
82             #line 83 "lib/PDL/Ufunc-pp-bandover.c"
83 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
84 0           } break;
85 0           case PDL_B: {
86 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Byte,B)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
87 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
88             #line 171 "lib/PDL/Ufunc.pd"
89             PDL_Byte tmp = ~0;
90             PDL_IF_BAD(int flag = 0;,)
91             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
92             #line 174 "lib/PDL/Ufunc.pd"
93             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,B,a_badval_isnan) ) continue; flag = 1;,)
94             tmp &= (a_datap)[0+(__inc_a_n*(n))];
95             if ( !tmp ) break;
96             }} /* Close n */
97             #line 178 "lib/PDL/Ufunc.pd"
98             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
99             (b_datap)[0] = tmp;
100             #line 101 "lib/PDL/Ufunc-pp-bandover.c"
101 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
102 0           } break;
103 0           case PDL_S: {
104 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Short,S)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
105 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
106             #line 171 "lib/PDL/Ufunc.pd"
107             PDL_Short tmp = ~0;
108             PDL_IF_BAD(int flag = 0;,)
109             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
110             #line 174 "lib/PDL/Ufunc.pd"
111             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,S,a_badval_isnan) ) continue; flag = 1;,)
112             tmp &= (a_datap)[0+(__inc_a_n*(n))];
113             if ( !tmp ) break;
114             }} /* Close n */
115             #line 178 "lib/PDL/Ufunc.pd"
116             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
117             (b_datap)[0] = tmp;
118             #line 119 "lib/PDL/Ufunc-pp-bandover.c"
119 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
120 0           } break;
121 0           case PDL_US: {
122 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Ushort,U)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
123 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
124             #line 171 "lib/PDL/Ufunc.pd"
125             PDL_Ushort tmp = ~0;
126             PDL_IF_BAD(int flag = 0;,)
127             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
128             #line 174 "lib/PDL/Ufunc.pd"
129             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,U,a_badval_isnan) ) continue; flag = 1;,)
130             tmp &= (a_datap)[0+(__inc_a_n*(n))];
131             if ( !tmp ) break;
132             }} /* Close n */
133             #line 178 "lib/PDL/Ufunc.pd"
134             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
135             (b_datap)[0] = tmp;
136             #line 137 "lib/PDL/Ufunc-pp-bandover.c"
137 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
138 0           } break;
139 0           case PDL_L: {
140 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Long,L)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
141 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
142             #line 171 "lib/PDL/Ufunc.pd"
143             PDL_Long tmp = ~0;
144             PDL_IF_BAD(int flag = 0;,)
145             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
146             #line 174 "lib/PDL/Ufunc.pd"
147             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,L,a_badval_isnan) ) continue; flag = 1;,)
148             tmp &= (a_datap)[0+(__inc_a_n*(n))];
149             if ( !tmp ) break;
150             }} /* Close n */
151             #line 178 "lib/PDL/Ufunc.pd"
152             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
153             (b_datap)[0] = tmp;
154             #line 155 "lib/PDL/Ufunc-pp-bandover.c"
155 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
156 0           } break;
157 0           case PDL_UL: {
158 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_ULong,K)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
159 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
160             #line 171 "lib/PDL/Ufunc.pd"
161             PDL_ULong tmp = ~0;
162             PDL_IF_BAD(int flag = 0;,)
163             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
164             #line 174 "lib/PDL/Ufunc.pd"
165             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,K,a_badval_isnan) ) continue; flag = 1;,)
166             tmp &= (a_datap)[0+(__inc_a_n*(n))];
167             if ( !tmp ) break;
168             }} /* Close n */
169             #line 178 "lib/PDL/Ufunc.pd"
170             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
171             (b_datap)[0] = tmp;
172             #line 173 "lib/PDL/Ufunc-pp-bandover.c"
173 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
174 0           } break;
175 0           case PDL_IND: {
176 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Indx,N)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
177 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
178             #line 171 "lib/PDL/Ufunc.pd"
179             PDL_Indx tmp = ~0;
180             PDL_IF_BAD(int flag = 0;,)
181             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
182             #line 174 "lib/PDL/Ufunc.pd"
183             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,N,a_badval_isnan) ) continue; flag = 1;,)
184             tmp &= (a_datap)[0+(__inc_a_n*(n))];
185             if ( !tmp ) break;
186             }} /* Close n */
187             #line 178 "lib/PDL/Ufunc.pd"
188             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
189             (b_datap)[0] = tmp;
190             #line 191 "lib/PDL/Ufunc-pp-bandover.c"
191 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
192 0           } break;
193 0           case PDL_ULL: {
194 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_ULongLong,P)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
195 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
196             #line 171 "lib/PDL/Ufunc.pd"
197             PDL_ULongLong tmp = ~0;
198             PDL_IF_BAD(int flag = 0;,)
199             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
200             #line 174 "lib/PDL/Ufunc.pd"
201             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,P,a_badval_isnan) ) continue; flag = 1;,)
202             tmp &= (a_datap)[0+(__inc_a_n*(n))];
203             if ( !tmp ) break;
204             }} /* Close n */
205             #line 178 "lib/PDL/Ufunc.pd"
206             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
207             (b_datap)[0] = tmp;
208             #line 209 "lib/PDL/Ufunc-pp-bandover.c"
209 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
210 0           } break;
211 1           case PDL_LL: {
212 1 50         PDL_DECLARE_PARAMS_bandover_1(PDL_LongLong,Q)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
213 4 50         PDL_BROADCASTLOOP_START_bandover_readdata {
    50          
    50          
    50          
    50          
    100          
    100          
214             #line 171 "lib/PDL/Ufunc.pd"
215             PDL_LongLong tmp = ~0;
216             PDL_IF_BAD(int flag = 0;,)
217             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
218             #line 174 "lib/PDL/Ufunc.pd"
219             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,Q,a_badval_isnan) ) continue; flag = 1;,)
220             tmp &= (a_datap)[0+(__inc_a_n*(n))];
221             if ( !tmp ) break;
222             }} /* Close n */
223             #line 178 "lib/PDL/Ufunc.pd"
224             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
225             (b_datap)[0] = tmp;
226             #line 227 "lib/PDL/Ufunc-pp-bandover.c"
227 1 50         }PDL_BROADCASTLOOP_END_bandover_readdata
    50          
228 1           } break;
229 0           default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in bandover: unhandled datatype(%d), only handles (ABSULKNPQ)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype);
230             }
231             #undef PDL_BAD_CODE
232             #undef PDL_IF_BAD
233             } else { /* ** else do 'good' Code ** */
234             #define PDL_IF_BAD(t,f) f
235 1           switch (__privtrans->__datatype) { /* Start generic switch */
236 0           case PDL_SB: {
237 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_SByte,A)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
238 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
239             #line 171 "lib/PDL/Ufunc.pd"
240             PDL_SByte tmp = ~0;
241             PDL_IF_BAD(int flag = 0;,)
242             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
243             #line 174 "lib/PDL/Ufunc.pd"
244             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,A,a_badval_isnan) ) continue; flag = 1;,)
245             tmp &= (a_datap)[0+(__inc_a_n*(n))];
246             if ( !tmp ) break;
247             }} /* Close n */
248             #line 178 "lib/PDL/Ufunc.pd"
249             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
250             (b_datap)[0] = tmp;
251             #line 252 "lib/PDL/Ufunc-pp-bandover.c"
252 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
253 0           } break;
254 0           case PDL_B: {
255 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Byte,B)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
256 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
257             #line 171 "lib/PDL/Ufunc.pd"
258             PDL_Byte tmp = ~0;
259             PDL_IF_BAD(int flag = 0;,)
260             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
261             #line 174 "lib/PDL/Ufunc.pd"
262             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,B,a_badval_isnan) ) continue; flag = 1;,)
263             tmp &= (a_datap)[0+(__inc_a_n*(n))];
264             if ( !tmp ) break;
265             }} /* Close n */
266             #line 178 "lib/PDL/Ufunc.pd"
267             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
268             (b_datap)[0] = tmp;
269             #line 270 "lib/PDL/Ufunc-pp-bandover.c"
270 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
271 0           } break;
272 0           case PDL_S: {
273 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Short,S)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
274 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
275             #line 171 "lib/PDL/Ufunc.pd"
276             PDL_Short tmp = ~0;
277             PDL_IF_BAD(int flag = 0;,)
278             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
279             #line 174 "lib/PDL/Ufunc.pd"
280             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,S,a_badval_isnan) ) continue; flag = 1;,)
281             tmp &= (a_datap)[0+(__inc_a_n*(n))];
282             if ( !tmp ) break;
283             }} /* Close n */
284             #line 178 "lib/PDL/Ufunc.pd"
285             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
286             (b_datap)[0] = tmp;
287             #line 288 "lib/PDL/Ufunc-pp-bandover.c"
288 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
289 0           } break;
290 0           case PDL_US: {
291 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Ushort,U)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
292 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
293             #line 171 "lib/PDL/Ufunc.pd"
294             PDL_Ushort tmp = ~0;
295             PDL_IF_BAD(int flag = 0;,)
296             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
297             #line 174 "lib/PDL/Ufunc.pd"
298             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,U,a_badval_isnan) ) continue; flag = 1;,)
299             tmp &= (a_datap)[0+(__inc_a_n*(n))];
300             if ( !tmp ) break;
301             }} /* Close n */
302             #line 178 "lib/PDL/Ufunc.pd"
303             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
304             (b_datap)[0] = tmp;
305             #line 306 "lib/PDL/Ufunc-pp-bandover.c"
306 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
307 0           } break;
308 0           case PDL_L: {
309 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Long,L)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
310 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
311             #line 171 "lib/PDL/Ufunc.pd"
312             PDL_Long tmp = ~0;
313             PDL_IF_BAD(int flag = 0;,)
314             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
315             #line 174 "lib/PDL/Ufunc.pd"
316             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,L,a_badval_isnan) ) continue; flag = 1;,)
317             tmp &= (a_datap)[0+(__inc_a_n*(n))];
318             if ( !tmp ) break;
319             }} /* Close n */
320             #line 178 "lib/PDL/Ufunc.pd"
321             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
322             (b_datap)[0] = tmp;
323             #line 324 "lib/PDL/Ufunc-pp-bandover.c"
324 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
325 0           } break;
326 0           case PDL_UL: {
327 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_ULong,K)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
328 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
329             #line 171 "lib/PDL/Ufunc.pd"
330             PDL_ULong tmp = ~0;
331             PDL_IF_BAD(int flag = 0;,)
332             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
333             #line 174 "lib/PDL/Ufunc.pd"
334             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,K,a_badval_isnan) ) continue; flag = 1;,)
335             tmp &= (a_datap)[0+(__inc_a_n*(n))];
336             if ( !tmp ) break;
337             }} /* Close n */
338             #line 178 "lib/PDL/Ufunc.pd"
339             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
340             (b_datap)[0] = tmp;
341             #line 342 "lib/PDL/Ufunc-pp-bandover.c"
342 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
343 0           } break;
344 0           case PDL_IND: {
345 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_Indx,N)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
346 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
347             #line 171 "lib/PDL/Ufunc.pd"
348             PDL_Indx tmp = ~0;
349             PDL_IF_BAD(int flag = 0;,)
350             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
351             #line 174 "lib/PDL/Ufunc.pd"
352             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,N,a_badval_isnan) ) continue; flag = 1;,)
353             tmp &= (a_datap)[0+(__inc_a_n*(n))];
354             if ( !tmp ) break;
355             }} /* Close n */
356             #line 178 "lib/PDL/Ufunc.pd"
357             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
358             (b_datap)[0] = tmp;
359             #line 360 "lib/PDL/Ufunc-pp-bandover.c"
360 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
361 0           } break;
362 0           case PDL_ULL: {
363 0 0         PDL_DECLARE_PARAMS_bandover_1(PDL_ULongLong,P)
    0          
    0          
    0          
    0          
    0          
    0          
    0          
364 0 0         PDL_BROADCASTLOOP_START_bandover_readdata {
    0          
    0          
    0          
    0          
    0          
    0          
365             #line 171 "lib/PDL/Ufunc.pd"
366             PDL_ULongLong tmp = ~0;
367             PDL_IF_BAD(int flag = 0;,)
368             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
369             #line 174 "lib/PDL/Ufunc.pd"
370             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,P,a_badval_isnan) ) continue; flag = 1;,)
371             tmp &= (a_datap)[0+(__inc_a_n*(n))];
372             if ( !tmp ) break;
373             }} /* Close n */
374             #line 178 "lib/PDL/Ufunc.pd"
375             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
376             (b_datap)[0] = tmp;
377             #line 378 "lib/PDL/Ufunc-pp-bandover.c"
378 0 0         }PDL_BROADCASTLOOP_END_bandover_readdata
    0          
379 0           } break;
380 1           case PDL_LL: {
381 1 50         PDL_DECLARE_PARAMS_bandover_1(PDL_LongLong,Q)
    50          
    50          
    50          
    50          
    50          
    50          
    50          
382 4 50         PDL_BROADCASTLOOP_START_bandover_readdata {
    50          
    50          
    50          
    50          
    100          
    100          
383             #line 171 "lib/PDL/Ufunc.pd"
384             PDL_LongLong tmp = ~0;
385             PDL_IF_BAD(int flag = 0;,)
386             {/* Open n */ PDL_EXPAND2(register PDL_Indx n=0, __n_stop=(__n_size)); for(; n<__n_stop; n+=1) {
387             #line 174 "lib/PDL/Ufunc.pd"
388             PDL_IF_BAD(if ( PDL_ISBAD2((a_datap)[0+(__inc_a_n*(n))],a_badval,Q,a_badval_isnan) ) continue; flag = 1;,)
389             tmp &= (a_datap)[0+(__inc_a_n*(n))];
390             if ( !tmp ) break;
391             }} /* Close n */
392             #line 178 "lib/PDL/Ufunc.pd"
393             PDL_IF_BAD(if (!flag) { (b_datap)[0]=b_badval; __privtrans->pdls[1]->state |= PDL_BADVAL; } else,)
394             (b_datap)[0] = tmp;
395             #line 396 "lib/PDL/Ufunc-pp-bandover.c"
396 1 50         }PDL_BROADCASTLOOP_END_bandover_readdata
    50          
397 1           } break;
398 0           default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in bandover: unhandled datatype(%d), only handles (ABSULKNPQ)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype);
399             }
400             #undef PDL_IF_BAD
401             }
402 2           return PDL_err;
403             }
404              
405             static pdl_datatypes pdl_bandover_vtable_gentypes[] = { PDL_SB, PDL_B, PDL_S, PDL_US, PDL_L, PDL_UL, PDL_IND, PDL_ULL, PDL_LL, -1 };
406             static PDL_Indx pdl_bandover_vtable_realdims[] = { 1, 0 };
407             static char *pdl_bandover_vtable_parnames[] = { "a","b" };
408             static short pdl_bandover_vtable_parflags[] = {
409             0,
410             PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISWRITE
411             };
412             static pdl_datatypes pdl_bandover_vtable_partypes[] = { -1, -1 };
413             static PDL_Indx pdl_bandover_vtable_realdims_starts[] = { 0, 1 };
414             static PDL_Indx pdl_bandover_vtable_realdims_ind_ids[] = { 0 };
415             static char *pdl_bandover_vtable_indnames[] = { "n" };
416             pdl_transvtable pdl_bandover_vtable = {
417             PDL_TRANS_DO_BROADCAST|PDL_TRANS_BADPROCESS, 0, pdl_bandover_vtable_gentypes, 1, 2, NULL /*CORE21*/,
418             pdl_bandover_vtable_realdims, pdl_bandover_vtable_parnames,
419             pdl_bandover_vtable_parflags, pdl_bandover_vtable_partypes,
420             pdl_bandover_vtable_realdims_starts, pdl_bandover_vtable_realdims_ind_ids, 1,
421             1, pdl_bandover_vtable_indnames,
422             NULL, pdl_bandover_readdata, NULL,
423             NULL,
424             0,"PDL::Ufunc::bandover"
425             };
426              
427              
428 2           pdl_error pdl_run_bandover(pdl *a,pdl *b) {
429 2           pdl_error PDL_err = {0, NULL, 0};
430 2 50         if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0};
431 2           pdl_trans *__privtrans = PDL->create_trans(&pdl_bandover_vtable);
432 2 50         if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans");
433 2           __privtrans->pdls[0] = a;
434 2           __privtrans->pdls[1] = b;
435 2 50         PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans));
436 2 50         PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans));
437 2           return PDL_err;
438             }