Vector.xs

filter: Statementstmt 92.9% 823 / 885 Branchbran 67.8% 2050 / 3020 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 73.5% 2873 / 3905 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Bit/Vector/String.pm ↑ Summary BitVector.c »
1  
2  
3 /*****************************************************************************/
4 /* */
5 /* Copyright (c) 1995 - 2013 by Steffen Beyer. */
6 /* All rights reserved. */
7 /* */
8 /* This package is free software; you can redistribute it */
9 /* and/or modify it under the same terms as Perl itself. */
10 /* */
11 /*****************************************************************************/
12  
13  
14 #include "EXTERN.h"
15 #include "perl.h"
16 #include "XSUB.h"
17  
18  
19 #include "patchlevel.h"
20 #if ((PATCHLEVEL < 4) || ((PATCHLEVEL == 4) && (SUBVERSION < 5)))
21 /* PL_na was introduced in perl5.004_05 */
22 #ifndef PL_na
23 #define PL_na na
24 #endif
25 #endif
26 #if (PATCHLEVEL < 4)
27 /* GIMME_V was introduced in perl5.004 */
28 #ifndef GIMME_V
29 #define GIMME_V GIMME
30 #endif
31 #endif
32  
33  
34 #include "BitVector.h"
35  
36  
37 typedef SV *BitVector_Object;
38 typedef SV *BitVector_Handle;
39 typedef N_word *BitVector_Address;
40 typedef SV *BitVector_Scalar;
41  
42  
43 static char *BitVector_Class = "Bit::Vector"; /* NOT "const" for older Perl versions */
44  
45 const char *BitVector_OBJECT_ERROR = "item is not a \"Bit::Vector\" object";
46 const char *BitVector_SCALAR_ERROR = "item is not a scalar";
47 const char *BitVector_STRING_ERROR = "item is not a string";
48 const char *BitVector_MIN_ERROR = "minimum index out of range";
49 const char *BitVector_MAX_ERROR = "maximum index out of range";
50 const char *BitVector_START_ERROR = "start index out of range";
51 const char *BitVector_OFFSET_ERROR = "offset out of range";
52 const char *BitVector_CHUNK_ERROR = "chunk size out of range";
53 const char *BitVector_SET_ERROR = "set size mismatch";
54 const char *BitVector_MATRIX_ERROR = "matrix size mismatch";
55 const char *BitVector_SHAPE_ERROR = "not a square matrix";
56 const char *BitVector_MEMORY_ERROR = BV_ERRCODE_NULL;
57 const char *BitVector_INDEX_ERROR = BV_ERRCODE_INDX;
58 const char *BitVector_ORDER_ERROR = BV_ERRCODE_ORDR;
59 const char *BitVector_SIZE_ERROR = BV_ERRCODE_SIZE;
60  
61  
62 #define BIT_VECTOR_STASH gv_stashpv(BitVector_Class,1)
63  
64  
65 #define BIT_VECTOR_OBJECT(ref,hdl,adr) \
66 ( ref && \
67 SvROK(ref) && \
68 (hdl = (BitVector_Handle)SvRV(ref)) && \
69 SvOBJECT(hdl) && \
70 SvREADONLY(hdl) && \
71 (SvTYPE(hdl) == SVt_PVMG) && \
72 (SvSTASH(hdl) == BIT_VECTOR_STASH) && \
73 (adr = (BitVector_Address)SvIV(hdl)) )
74  
75 #define BIT_VECTOR_FAKE_OBJECT(ref,hdl) \
76 ( ref && \
77 SvROK(ref) && \
78 (hdl = (BitVector_Handle)SvRV(ref)) && \
79 SvOBJECT(hdl) && \
80 !SvREADONLY(hdl) && \
81 (SvTYPE(hdl) == SVt_PVMG) && \
82 (SvSTASH(hdl) == BIT_VECTOR_STASH) )
83  
84 #define BIT_VECTOR_SCALAR(ref,typ,var) \
85 ( ref && !(SvROK(ref)) && ((var = (typ)SvIV(ref)) | 1) )
86  
87 #define BIT_VECTOR_STRING(ref,var) \
88 ( ref && !(SvROK(ref)) && (var = (charptr)SvPV(ref,PL_na)) )
89  
90 #define BIT_VECTOR_BUFFER(ref,var,len) \
91 ( ref && !(SvROK(ref)) && SvPOK(ref) && \
92 (var = (charptr)SvPV(ref,PL_na)) && \
93 ((len = (N_int)SvCUR(ref)) | 1) )
94  
95  
96 #define BIT_VECTOR_ERROR(message) \
97 croak("Bit::Vector::%s(): %s", GvNAME(CvGV(cv)), message)
98  
99  
100 #define BIT_VECTOR_OBJECT_ERROR \
101 BIT_VECTOR_ERROR( BitVector_OBJECT_ERROR )
102  
103 #define BIT_VECTOR_SCALAR_ERROR \
104 BIT_VECTOR_ERROR( BitVector_SCALAR_ERROR )
105  
106 #define BIT_VECTOR_STRING_ERROR \
107 BIT_VECTOR_ERROR( BitVector_STRING_ERROR )
108  
109 #define BIT_VECTOR_MIN_ERROR \
110 BIT_VECTOR_ERROR( BitVector_MIN_ERROR )
111  
112 #define BIT_VECTOR_MAX_ERROR \
113 BIT_VECTOR_ERROR( BitVector_MAX_ERROR )
114  
115 #define BIT_VECTOR_START_ERROR \
116 BIT_VECTOR_ERROR( BitVector_START_ERROR )
117  
118 #define BIT_VECTOR_OFFSET_ERROR \
119 BIT_VECTOR_ERROR( BitVector_OFFSET_ERROR )
120  
121 #define BIT_VECTOR_CHUNK_ERROR \
122 BIT_VECTOR_ERROR( BitVector_CHUNK_ERROR )
123  
124 #define BIT_VECTOR_SET_ERROR \
125 BIT_VECTOR_ERROR( BitVector_SET_ERROR )
126  
127 #define BIT_VECTOR_MATRIX_ERROR \
128 BIT_VECTOR_ERROR( BitVector_MATRIX_ERROR )
129  
130 #define BIT_VECTOR_SHAPE_ERROR \
131 BIT_VECTOR_ERROR( BitVector_SHAPE_ERROR )
132  
133 #define BIT_VECTOR_MEMORY_ERROR \
134 BIT_VECTOR_ERROR( BitVector_MEMORY_ERROR )
135  
136 #define BIT_VECTOR_INDEX_ERROR \
137 BIT_VECTOR_ERROR( BitVector_INDEX_ERROR )
138  
139 #define BIT_VECTOR_ORDER_ERROR \
140 BIT_VECTOR_ERROR( BitVector_ORDER_ERROR )
141  
142 #define BIT_VECTOR_SIZE_ERROR \
143 BIT_VECTOR_ERROR( BitVector_SIZE_ERROR )
144  
145  
146 #define BIT_VECTOR_EXCEPTION(code) \
147 BIT_VECTOR_ERROR( BitVector_Error(code) )
148  
149  
150 MODULE = Bit::Vector PACKAGE = Bit::Vector PREFIX = BitVector_
151  
152  
153 PROTOTYPES: DISABLE
154  
155  
156 BOOT:
157 {
158 BV_ErrCode rc;
159  
160 23 ▶ if ((rc = BitVector_Boot()))
Branch: 1 branch
BranchTrueFalseTotal
if ((rc = BitVector_Boot())) 0 23 23
161 {
162 0 BIT_VECTOR_EXCEPTION(rc);
163 exit((int)rc);
164 }
165 }
166  
167  
168 void
169 BitVector_Version(...)
170 PPCODE:
171 {
172 charptr string;
173  
174 6 ▶ if ((items >= 0) and (items <= 1))
Branch: 2 branches
BranchTrueFalseTotal
if ((items >= 0) and (items <= 1)) 6 0 6
if ((items >= 0) and (items <= 1)) 4 2 6
175 {
176 4 string = BitVector_Version();
177 4 ▶ if (string != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (string != NULL) 4 0 4
178 {
179 4 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 4 4
180 4 PUSHs(sv_2mortal(newSVpv((char *)string,0)));
181 }
182 0 else BIT_VECTOR_MEMORY_ERROR;
183 }
184 2 else croak("Usage: Bit::Vector->Version()");
185 }
186  
187  
188 N_int
189 BitVector_Word_Bits(...)
190 CODE:
191 {
192 24 ▶ if ((items >= 0) and (items <= 1))
Branch: 2 branches
BranchTrueFalseTotal
if ((items >= 0) and (items <= 1)) 24 0 24
if ((items >= 0) and (items <= 1)) 22 2 24
193 {
194 22 RETVAL = BitVector_Word_Bits();
195 }
196 2 else croak("Usage: Bit::Vector->Word_Bits()");
197 }
198 OUTPUT:
199 RETVAL
200  
201  
202 N_int
203 BitVector_Long_Bits(...)
204 CODE:
205 {
206 106 ▶ if ((items >= 0) and (items <= 1))
Branch: 2 branches
BranchTrueFalseTotal
if ((items >= 0) and (items <= 1)) 106 0 106
if ((items >= 0) and (items <= 1)) 104 2 106
207 {
208 104 RETVAL = BitVector_Long_Bits();
209 }
210 2 else croak("Usage: Bit::Vector->Long_Bits()");
211 }
212 OUTPUT:
213 RETVAL
214  
215  
216 void
217 BitVector_Create(...)
218 ALIAS:
219 new = 1
220 PPCODE:
221 {
222 BitVector_Scalar arg1;
223 BitVector_Scalar arg2;
224 BitVector_Address address;
225 BitVector_Handle handle;
226 BitVector_Object reference;
227 bv_listptr list;
228 bv_listptr slot;
229 N_int bits;
230 N_int count;
231  
232 5439 ▶ if ((items >= 2) and (items <= 3))
Branch: 2 branches
BranchTrueFalseTotal
if ((items >= 2) and (items <= 3)) 5435 4 5439
if ((items >= 2) and (items <= 3)) 5431 4 5435
233 {
234 5431 arg1 = ST(1);
235 5431 ▶ if ( BIT_VECTOR_SCALAR(arg1,N_int,bits) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(arg1,N_int,bits) ) 5431 0 5431
if ( BIT_VECTOR_SCALAR(arg1,N_int,bits) ) 5430 1 5431
236 {
237 5430 ▶ if (items > 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items > 2) 1 5429 5430
238 {
239 1 arg2 = ST(2);
240 1 ▶ if ( BIT_VECTOR_SCALAR(arg2,N_int,count) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(arg2,N_int,count) ) 1 0 1
if ( BIT_VECTOR_SCALAR(arg2,N_int,count) ) 1 0 1
241 {
242 1 ▶ if (count > 0)
Branch: 1 branch
BranchTrueFalseTotal
if (count > 0) 1 0 1
243 {
244 1 ▶ if ((list = BitVector_Create_List(bits,true,count)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((list = BitVector_Create_List(bits,true,count)) != NULL) 1 0 1
245 {
246 1 ▶ EXTEND(sp,(int)count);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(sp,(int)count); 1 0 1
EXTEND(sp,(int)count); 0 1 1
247 1 slot = list;
248 6 ▶ while (count-- > 0)
Branch: 1 branch
BranchTrueFalseTotal
while (count-- > 0) 5 1 6
249 {
250 5 address = *slot++;
251 5 handle = newSViv((IV)address);
252 5 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
253 5 SvREFCNT_dec(handle);
254 5 SvREADONLY_on(handle);
255 5 PUSHs(reference);
256 }
257 1 BitVector_Destroy_List(list,0);
258 }
259 0 else BIT_VECTOR_MEMORY_ERROR;
260 }
261 }
262 0 else BIT_VECTOR_SCALAR_ERROR;
263 }
264 else
265 {
266 5429 ▶ if ((address = BitVector_Create(bits,true)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Create(bits,true)) != NULL) 5429 0 5429
267 {
268 5429 handle = newSViv((IV)address);
269 5429 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
270 5429 SvREFCNT_dec(handle);
271 5429 SvREADONLY_on(handle);
272 5429 PUSHs(reference);
273 }
274 0 else BIT_VECTOR_MEMORY_ERROR;
275 }
276 }
277 1 else BIT_VECTOR_SCALAR_ERROR;
278 }
279 8 else croak("Usage: %s(class,bits[,count])", GvNAME(CvGV(cv)));
280 }
281  
282  
283 void
284 BitVector_new_Hex(class,bits,string)
285 BitVector_Object class
286 BitVector_Scalar bits
287 BitVector_Scalar string
288 PPCODE:
289 {
290 BitVector_Address address;
291 BitVector_Handle handle;
292 BitVector_Object reference;
293 charptr pointer;
294 BV_ErrCode code;
295 N_int size;
296  
297 57 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,size) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 57 0 57
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 56 1 57
298 {
299 111 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 56 0 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 1 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 0 55
300 {
301 110 ▶ if ((address = BitVector_Create(size,false)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Create(size,false)) != NULL) 55 0 55
302 {
303 55 ▶ if ((code = BitVector_from_Hex(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Hex(address,pointer))) 0 55 55
304 {
305 0 BitVector_Destroy(address);
306 0 BIT_VECTOR_EXCEPTION(code);
307 }
308 else
309 {
310 55 handle = newSViv((IV)address);
311 55 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
312 55 SvREFCNT_dec(handle);
313 55 SvREADONLY_on(handle);
314 55 PUSHs(reference);
315 }
316 }
317 0 else BIT_VECTOR_MEMORY_ERROR;
318 }
319 1 else BIT_VECTOR_STRING_ERROR;
320 }
321 1 else BIT_VECTOR_SCALAR_ERROR;
322 }
323  
324  
325 void
326 BitVector_new_Bin(class,bits,string)
327 BitVector_Object class
328 BitVector_Scalar bits
329 BitVector_Scalar string
330 PPCODE:
331 {
332 BitVector_Address address;
333 BitVector_Handle handle;
334 BitVector_Object reference;
335 charptr pointer;
336 BV_ErrCode code;
337 N_int size;
338  
339 57 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,size) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 57 0 57
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 56 1 57
340 {
341 111 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 56 0 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 1 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 0 55
342 {
343 110 ▶ if ((address = BitVector_Create(size,false)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Create(size,false)) != NULL) 55 0 55
344 {
345 55 ▶ if ((code = BitVector_from_Bin(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Bin(address,pointer))) 0 55 55
346 {
347 0 BitVector_Destroy(address);
348 0 BIT_VECTOR_EXCEPTION(code);
349 }
350 else
351 {
352 55 handle = newSViv((IV)address);
353 55 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
354 55 SvREFCNT_dec(handle);
355 55 SvREADONLY_on(handle);
356 55 PUSHs(reference);
357 }
358 }
359 0 else BIT_VECTOR_MEMORY_ERROR;
360 }
361 1 else BIT_VECTOR_STRING_ERROR;
362 }
363 1 else BIT_VECTOR_SCALAR_ERROR;
364 }
365  
366  
367 void
368 BitVector_new_Dec(class,bits,string)
369 BitVector_Object class
370 BitVector_Scalar bits
371 BitVector_Scalar string
372 PPCODE:
373 {
374 BitVector_Address address;
375 BitVector_Handle handle;
376 BitVector_Object reference;
377 charptr pointer;
378 BV_ErrCode code;
379 N_int size;
380  
381 57 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,size) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 57 0 57
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 56 1 57
382 {
383 111 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 56 0 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 1 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 0 55
384 {
385 110 ▶ if ((address = BitVector_Create(size,false)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Create(size,false)) != NULL) 55 0 55
386 {
387 55 ▶ if ((code = BitVector_from_Dec(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Dec(address,pointer))) 0 55 55
388 {
389 0 BitVector_Destroy(address);
390 0 BIT_VECTOR_EXCEPTION(code);
391 }
392 else
393 {
394 55 handle = newSViv((IV)address);
395 55 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
396 55 SvREFCNT_dec(handle);
397 55 SvREADONLY_on(handle);
398 55 PUSHs(reference);
399 }
400 }
401 0 else BIT_VECTOR_MEMORY_ERROR;
402 }
403 1 else BIT_VECTOR_STRING_ERROR;
404 }
405 1 else BIT_VECTOR_SCALAR_ERROR;
406 }
407  
408  
409 void
410 BitVector_new_Enum(class,bits,string)
411 BitVector_Object class
412 BitVector_Scalar bits
413 BitVector_Scalar string
414 PPCODE:
415 {
416 BitVector_Address address;
417 BitVector_Handle handle;
418 BitVector_Object reference;
419 charptr pointer;
420 BV_ErrCode code;
421 N_int size;
422  
423 57 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,size) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 57 0 57
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 56 1 57
424 {
425 111 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 56 0 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 1 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 0 55
426 {
427 110 ▶ if ((address = BitVector_Create(size,false)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Create(size,false)) != NULL) 55 0 55
428 {
429 55 ▶ if ((code = BitVector_from_Enum(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Enum(address,pointer))) 0 55 55
430 {
431 0 BitVector_Destroy(address);
432 0 BIT_VECTOR_EXCEPTION(code);
433 }
434 else
435 {
436 55 handle = newSViv((IV)address);
437 55 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
438 55 SvREFCNT_dec(handle);
439 55 SvREADONLY_on(handle);
440 55 PUSHs(reference);
441 }
442 }
443 0 else BIT_VECTOR_MEMORY_ERROR;
444 }
445 1 else BIT_VECTOR_STRING_ERROR;
446 }
447 1 else BIT_VECTOR_SCALAR_ERROR;
448 }
449  
450  
451 void
452 BitVector_Shadow(reference)
453 BitVector_Object reference
454 PPCODE:
455 {
456 BitVector_Handle handle;
457 BitVector_Address address;
458  
459 2735 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2735 0 2735
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2734 1 2735
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2734 0 2734
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2734 0 2734
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2733 1 2734
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2733 0 2733
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2733 0 2733
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2732 1 2733
460 {
461 5464 ▶ if ((address = BitVector_Shadow(address)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Shadow(address)) != NULL) 2732 0 2732
462 {
463 2732 handle = newSViv((IV)address);
464 2732 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
465 2732 SvREFCNT_dec(handle);
466 2732 SvREADONLY_on(handle);
467 2732 PUSHs(reference);
468 }
469 0 else BIT_VECTOR_MEMORY_ERROR;
470 }
471 3 else BIT_VECTOR_OBJECT_ERROR;
472 }
473  
474  
475 void
476 BitVector_Clone(reference)
477 BitVector_Object reference
478 PPCODE:
479 {
480 BitVector_Handle handle;
481 BitVector_Address address;
482  
483 5308 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5308 0 5308
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5307 1 5308
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5307 0 5307
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5307 0 5307
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5306 1 5307
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5306 0 5306
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5306 0 5306
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5305 1 5306
484 {
485 10610 ▶ if ((address = BitVector_Clone(address)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Clone(address)) != NULL) 5305 0 5305
486 {
487 5305 handle = newSViv((IV)address);
488 5305 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
489 5305 SvREFCNT_dec(handle);
490 5305 SvREADONLY_on(handle);
491 5305 PUSHs(reference);
492 }
493 0 else BIT_VECTOR_MEMORY_ERROR;
494 }
495 3 else BIT_VECTOR_OBJECT_ERROR;
496 }
497  
498  
499 void
500 BitVector_Concat(Xref,Yref)
501 BitVector_Object Xref
502 BitVector_Object Yref
503 PPCODE:
504 {
505 BitVector_Handle Xhdl;
506 BitVector_Address Xadr;
507 BitVector_Handle Yhdl;
508 BitVector_Address Yadr;
509 BitVector_Object reference;
510 BitVector_Handle handle;
511 BitVector_Address address;
512  
513 8 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 0 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 1 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 0 7
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 0 7
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 6 1 7
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 6 0 6
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 6 0 6
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5 1 6
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5 0 5
514 5 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 4 1 5
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 4 0 4
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 4 0 4
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 3 1 4
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 3 0 3
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 3 0 3
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 2 1 3
515 {
516 4 ▶ if ((address = BitVector_Concat(Xadr,Yadr)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Concat(Xadr,Yadr)) != NULL) 2 0 2
517 {
518 2 handle = newSViv((IV)address);
519 2 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
520 2 SvREFCNT_dec(handle);
521 2 SvREADONLY_on(handle);
522 2 PUSHs(reference);
523 }
524 0 else BIT_VECTOR_MEMORY_ERROR;
525 }
526 6 else BIT_VECTOR_OBJECT_ERROR;
527 }
528  
529  
530 void
531 BitVector_Concat_List(...)
532 PPCODE:
533 {
534 BitVector_Object Xref;
535 BitVector_Handle Xhdl;
536 BitVector_Address Xadr;
537 BitVector_Object reference;
538 BitVector_Handle handle;
539 BitVector_Address address;
540 N_int offset;
541 N_int bits;
542 I32 index;
543  
544 12 bits = 0;
545 12 index = items;
546 42 ▶ while (index-- > 0)
Branch: 1 branch
BranchTrueFalseTotal
while (index-- > 0) 40 2 42
547 {
548 40 Xref = ST(index);
549 40 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 40 0 40
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 40 0 40
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 40 0 40
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 40 0 40
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 35 5 40
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 35 0 35
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 35 0 35
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 30 5 35
550 {
551 30 bits += BV_BITS_(Xadr);
552 }
553 10 ▶ else if ((index != 0) or SvROK(Xref))
Branch: 2 branches
BranchTrueFalseTotal
else if ((index != 0) or SvROK(Xref)) 2 8 10
else if ((index != 0) or SvROK(Xref)) 2 0 2
554 10 BIT_VECTOR_OBJECT_ERROR;
555 }
556 2 ▶ if ((address = BitVector_Create(bits,false)) != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if ((address = BitVector_Create(bits,false)) != NULL) 2 0 2
557 {
558 2 offset = 0;
559 2 index = items;
560 12 ▶ while (index-- > 0)
Branch: 1 branch
BranchTrueFalseTotal
while (index-- > 0) 10 2 12
561 {
562 10 Xref = ST(index);
563 10 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) ) 10 0 10
564 {
565 10 ▶ if ((bits = BV_BITS_(Xadr)) > 0)
Branch: 1 branch
BranchTrueFalseTotal
if ((bits = BV_BITS_(Xadr)) > 0) 10 0 10
566 {
567 10 BitVector_Interval_Copy(address,Xadr,offset,0,bits);
568 10 offset += bits;
569 }
570 }
571 0 ▶ else if ((index != 0) or SvROK(Xref)) BIT_VECTOR_OBJECT_ERROR;
Branch: 2 branches
BranchTrueFalseTotal
else if ((index != 0) or SvROK(Xref)) BIT_VECTOR_OBJECT_ERROR; 0 0 0
else if ((index != 0) or SvROK(Xref)) BIT_VECTOR_OBJECT_ERROR; 0 0 0
572 }
573 2 handle = newSViv((IV)address);
574 2 reference = sv_bless(sv_2mortal(newRV(handle)), BIT_VECTOR_STASH);
575 2 SvREFCNT_dec(handle);
576 2 SvREADONLY_on(handle);
577 2 PUSHs(reference);
578 }
579 0 else BIT_VECTOR_MEMORY_ERROR;
580 }
581  
582  
583 N_int
584 BitVector_Size(reference)
585 BitVector_Object reference
586 CODE:
587 {
588 BitVector_Handle handle;
589 BitVector_Address address;
590  
591 9700 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9700 0 9700
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9699 1 9700
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9699 0 9699
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9699 0 9699
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9698 1 9699
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9698 0 9698
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9698 0 9698
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9697 1 9698
592 {
593 9697 ▶ RETVAL = BV_BITS_(address);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = BV_BITS_(address); 9522 175 9697
594 }
595 3 else BIT_VECTOR_OBJECT_ERROR;
596 }
597 OUTPUT:
598 RETVAL
599  
600  
601 void
602 BitVector_Resize(reference,bits)
603 BitVector_Object reference
604 BitVector_Scalar bits
605 CODE:
606 {
607 BitVector_Handle handle;
608 BitVector_Address address;
609 N_int size;
610  
611 99 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 99 0 99
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 98 1 99
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 98 0 98
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 98 0 98
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 97 1 98
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 97 0 97
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 97 0 97
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 96 1 97
612 {
613 96 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,size) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 96 0 96
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 95 1 96
614 {
615 95 address = BitVector_Resize(address,size);
616 95 SvREADONLY_off(handle);
617 95 sv_setiv(handle,(IV)address);
618 95 SvREADONLY_on(handle);
619 95 ▶ if (address == NULL) BIT_VECTOR_MEMORY_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if (address == NULL) BIT_VECTOR_MEMORY_ERROR; 0 95 95
620 }
621 1 else BIT_VECTOR_SCALAR_ERROR;
622 }
623 3 else BIT_VECTOR_OBJECT_ERROR;
624 }
625  
626  
627 void
628 BitVector_Unfake(reference,bits)
629 BitVector_Object reference
630 BitVector_Scalar bits
631 CODE:
632 {
633 BitVector_Handle handle;
634 BitVector_Address address;
635 N_int size;
636  
637 3657 ▶ if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) )
Branch: 7 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) ) 3657 0 3657
if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) ) 3657 0 3657
if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) ) 3657 0 3657
if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) ) 3657 0 3657
if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) ) 3657 0 3657
if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) ) 3657 0 3657
if ( BIT_VECTOR_FAKE_OBJECT(reference,handle) ) 3657 0 3657
638 {
639 3657 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,size) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 3657 0 3657
if ( BIT_VECTOR_SCALAR(bits,N_int,size) ) 3657 0 3657
640 {
641 3657 address = BitVector_Create(size,true);
642 3657 sv_setiv(handle,(IV)address);
643 3657 SvREADONLY_on(handle);
644 3657 ▶ if (address == NULL) BIT_VECTOR_MEMORY_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if (address == NULL) BIT_VECTOR_MEMORY_ERROR; 0 3657 3657
645 }
646 0 else BIT_VECTOR_SCALAR_ERROR;
647 }
648 0 else BIT_VECTOR_OBJECT_ERROR;
649 }
650  
651  
652 void
653 BitVector_DESTROY(reference)
654 BitVector_Object reference
655 CODE:
656 {
657 BitVector_Handle handle;
658 BitVector_Address address;
659  
660 17455 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17455 0 17455
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17454 1 17455
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17454 0 17454
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17453 1 17454
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17449 4 17453
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17449 0 17449
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17449 0 17449
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17352 97 17449
661 {
662 17352 BitVector_Destroy(address);
663 17352 SvREADONLY_off(handle);
664 17352 sv_setiv(handle,(IV)NULL);
665 17352 SvREADONLY_on(handle);
666 }
667 /* else BIT_VECTOR_OBJECT_ERROR; */
668 }
669  
670  
671 void
672 BitVector_Copy(Xref,Yref)
673 BitVector_Object Xref
674 BitVector_Object Yref
675 CODE:
676 {
677 BitVector_Handle Xhdl;
678 BitVector_Address Xadr;
679 BitVector_Handle Yhdl;
680 BitVector_Address Yadr;
681  
682 69 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 69 0 69
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 68 1 69
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 68 0 68
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 68 0 68
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 67 1 68
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 67 0 67
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 67 0 67
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 66 1 67
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 66 0 66
683 66 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 65 1 66
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 65 0 65
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 65 0 65
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 64 1 65
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 64 0 64
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 64 0 64
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 63 1 64
684 {
685 63 BitVector_Copy(Xadr,Yadr);
686 }
687 6 else BIT_VECTOR_OBJECT_ERROR;
688 }
689  
690  
691 void
692 BitVector_Empty(reference)
693 BitVector_Object reference
694 CODE:
695 {
696 BitVector_Handle handle;
697 BitVector_Address address;
698  
699 542 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 542 0 542
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 541 1 542
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 541 0 541
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 541 0 541
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 540 1 541
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 540 0 540
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 540 0 540
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 539 1 540
700 {
701 539 BitVector_Empty(address);
702 }
703 3 else BIT_VECTOR_OBJECT_ERROR;
704 }
705  
706  
707 void
708 BitVector_Fill(reference)
709 BitVector_Object reference
710 CODE:
711 {
712 BitVector_Handle handle;
713 BitVector_Address address;
714  
715 10726 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10726 0 10726
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10725 1 10726
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10725 0 10725
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10725 0 10725
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10724 1 10725
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10724 0 10724
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10724 0 10724
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 10723 1 10724
716 {
717 10723 BitVector_Fill(address);
718 }
719 3 else BIT_VECTOR_OBJECT_ERROR;
720 }
721  
722  
723 void
724 BitVector_Flip(reference)
725 BitVector_Object reference
726 CODE:
727 {
728 BitVector_Handle handle;
729 BitVector_Address address;
730  
731 2974 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2974 0 2974
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2973 1 2974
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2973 0 2973
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2973 0 2973
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2972 1 2973
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2972 0 2972
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2972 0 2972
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2971 1 2972
732 {
733 2971 BitVector_Flip(address);
734 }
735 3 else BIT_VECTOR_OBJECT_ERROR;
736 }
737  
738  
739 void
740 BitVector_Primes(reference)
741 BitVector_Object reference
742 CODE:
743 {
744 BitVector_Handle handle;
745 BitVector_Address address;
746  
747 1241 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1241 0 1241
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1240 1 1241
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1240 0 1240
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1240 0 1240
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1239 1 1240
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1239 0 1239
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1239 0 1239
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1238 1 1239
748 {
749 1238 BitVector_Primes(address);
750 }
751 3 else BIT_VECTOR_OBJECT_ERROR;
752 }
753  
754  
755 void
756 BitVector_Reverse(Xref,Yref)
757 BitVector_Object Xref
758 BitVector_Object Yref
759 CODE:
760 {
761 BitVector_Handle Xhdl;
762 BitVector_Address Xadr;
763 BitVector_Handle Yhdl;
764 BitVector_Address Yadr;
765  
766 10 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 1 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 0 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 0 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 1 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 0 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 0 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 1 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 0 7
767 7 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 1 7
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 0 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 0 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 1 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 0 5
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 0 5
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 4 1 5
768 {
769 4 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 2 2 4
770 {
771 2 BitVector_Reverse(Xadr,Yadr);
772 }
773 2 else BIT_VECTOR_SIZE_ERROR;
774 }
775 6 else BIT_VECTOR_OBJECT_ERROR;
776 }
777  
778  
779 void
780 BitVector_Interval_Empty(reference,min,max)
781 BitVector_Object reference
782 BitVector_Scalar min
783 BitVector_Scalar max
784 ALIAS:
785 Empty_Interval = 2
786 CODE:
787 {
788 BitVector_Handle handle;
789 BitVector_Address address;
790 N_int lower;
791 N_int upper;
792  
793 293 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 293 0 293
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 292 1 293
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 292 0 292
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 292 0 292
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 291 1 292
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 291 0 291
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 291 0 291
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 290 1 291
794 {
795 290 ▶ if ( BIT_VECTOR_SCALAR(min,N_int,lower) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 290 0 290
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 289 1 290
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 289 0 289
796 289 ▶ BIT_VECTOR_SCALAR(max,N_int,upper) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(max,N_int,upper) ) 288 1 289
797 {
798 288 ▶ if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR; 3 285 288
799 285 ▶ else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR; 3 282 285
800 282 ▶ else if (lower > upper) BIT_VECTOR_ORDER_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (lower > upper) BIT_VECTOR_ORDER_ERROR; 1 281 282
801 281 else BitVector_Interval_Empty(address,lower,upper);
802 }
803 2 else BIT_VECTOR_SCALAR_ERROR;
804 }
805 3 else BIT_VECTOR_OBJECT_ERROR;
806 }
807  
808  
809 void
810 BitVector_Interval_Fill(reference,min,max)
811 BitVector_Object reference
812 BitVector_Scalar min
813 BitVector_Scalar max
814 ALIAS:
815 Fill_Interval = 2
816 CODE:
817 {
818 BitVector_Handle handle;
819 BitVector_Address address;
820 N_int lower;
821 N_int upper;
822  
823 293 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 293 0 293
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 292 1 293
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 292 0 292
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 292 0 292
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 291 1 292
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 291 0 291
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 291 0 291
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 290 1 291
824 {
825 290 ▶ if ( BIT_VECTOR_SCALAR(min,N_int,lower) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 290 0 290
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 289 1 290
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 289 0 289
826 289 ▶ BIT_VECTOR_SCALAR(max,N_int,upper) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(max,N_int,upper) ) 288 1 289
827 {
828 288 ▶ if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR; 3 285 288
829 285 ▶ else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR; 3 282 285
830 282 ▶ else if (lower > upper) BIT_VECTOR_ORDER_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (lower > upper) BIT_VECTOR_ORDER_ERROR; 1 281 282
831 281 else BitVector_Interval_Fill(address,lower,upper);
832 }
833 2 else BIT_VECTOR_SCALAR_ERROR;
834 }
835 3 else BIT_VECTOR_OBJECT_ERROR;
836 }
837  
838  
839 void
840 BitVector_Interval_Flip(reference,min,max)
841 BitVector_Object reference
842 BitVector_Scalar min
843 BitVector_Scalar max
844 ALIAS:
845 Flip_Interval = 2
846 CODE:
847 {
848 BitVector_Handle handle;
849 BitVector_Address address;
850 N_int lower;
851 N_int upper;
852  
853 573 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 573 0 573
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 572 1 573
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 572 0 572
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 572 0 572
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 571 1 572
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 571 0 571
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 571 0 571
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 570 1 571
854 {
855 570 ▶ if ( BIT_VECTOR_SCALAR(min,N_int,lower) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 570 0 570
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 569 1 570
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 569 0 569
856 569 ▶ BIT_VECTOR_SCALAR(max,N_int,upper) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(max,N_int,upper) ) 568 1 569
857 {
858 568 ▶ if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR; 3 565 568
859 565 ▶ else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR; 3 562 565
860 562 ▶ else if (lower > upper) BIT_VECTOR_ORDER_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (lower > upper) BIT_VECTOR_ORDER_ERROR; 1 561 562
861 561 else BitVector_Interval_Flip(address,lower,upper);
862 }
863 2 else BIT_VECTOR_SCALAR_ERROR;
864 }
865 3 else BIT_VECTOR_OBJECT_ERROR;
866 }
867  
868  
869 void
870 BitVector_Interval_Reverse(reference,min,max)
871 BitVector_Object reference
872 BitVector_Scalar min
873 BitVector_Scalar max
874 CODE:
875 {
876 BitVector_Handle handle;
877 BitVector_Address address;
878 N_int lower;
879 N_int upper;
880  
881 61 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 61 0 61
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 60 1 61
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 60 0 60
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 60 0 60
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 59 1 60
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 59 0 59
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 59 0 59
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 58 1 59
882 {
883 58 ▶ if ( BIT_VECTOR_SCALAR(min,N_int,lower) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 58 0 58
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 57 1 58
if ( BIT_VECTOR_SCALAR(min,N_int,lower) && 57 0 57
884 57 ▶ BIT_VECTOR_SCALAR(max,N_int,upper) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(max,N_int,upper) ) 56 1 57
885 {
886 56 ▶ if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if (lower >= BV_BITS_(address)) BIT_VECTOR_MIN_ERROR; 3 53 56
887 53 ▶ else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (upper >= BV_BITS_(address)) BIT_VECTOR_MAX_ERROR; 3 50 53
888 50 ▶ else if (lower > upper) BIT_VECTOR_ORDER_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
else if (lower > upper) BIT_VECTOR_ORDER_ERROR; 1 49 50
889 49 else BitVector_Interval_Reverse(address,lower,upper);
890 }
891 2 else BIT_VECTOR_SCALAR_ERROR;
892 }
893 3 else BIT_VECTOR_OBJECT_ERROR;
894 }
895  
896  
897 void
898 BitVector_Interval_Scan_inc(reference,start)
899 BitVector_Object reference
900 BitVector_Scalar start
901 PPCODE:
902 {
903 BitVector_Handle handle;
904 BitVector_Address address;
905 N_int first;
906 N_int min;
907 N_int max;
908  
909 6549 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6549 0 6549
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6548 1 6549
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6548 0 6548
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6548 0 6548
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6547 1 6548
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6547 0 6547
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6547 0 6547
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6546 1 6547
910 {
911 6546 ▶ if ( BIT_VECTOR_SCALAR(start,N_int,first) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(start,N_int,first) ) 6546 0 6546
if ( BIT_VECTOR_SCALAR(start,N_int,first) ) 6545 1 6546
912 {
913 6545 ▶ if (first < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (first < BV_BITS_(address)) 6541 4 6545
914 {
915 6541 ▶ if ( BitVector_interval_scan_inc(address,first,&min,&max) )
Branch: 1 branch
BranchTrueFalseTotal
if ( BitVector_interval_scan_inc(address,first,&min,&max) ) 6460 81 6541
916 {
917 6460 ▶ EXTEND(sp,2);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,2); 0 6460 6460
918 6460 PUSHs(sv_2mortal(newSViv((IV)min)));
919 6460 PUSHs(sv_2mortal(newSViv((IV)max)));
920 }
921 /* else return empty list */
922 }
923 4 else BIT_VECTOR_START_ERROR;
924 }
925 1 else BIT_VECTOR_SCALAR_ERROR;
926 }
927 3 else BIT_VECTOR_OBJECT_ERROR;
928 }
929  
930  
931 void
932 BitVector_Interval_Scan_dec(reference,start)
933 BitVector_Object reference
934 BitVector_Scalar start
935 PPCODE:
936 {
937 BitVector_Handle handle;
938 BitVector_Address address;
939 N_int first;
940 N_int min;
941 N_int max;
942  
943 5455 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5455 0 5455
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5454 1 5455
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5454 0 5454
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5454 0 5454
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5453 1 5454
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5453 0 5453
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5453 0 5453
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5452 1 5453
944 {
945 5452 ▶ if ( BIT_VECTOR_SCALAR(start,N_int,first) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(start,N_int,first) ) 5452 0 5452
if ( BIT_VECTOR_SCALAR(start,N_int,first) ) 5451 1 5452
946 {
947 5451 ▶ if (first < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (first < BV_BITS_(address)) 5447 4 5451
948 {
949 5447 ▶ if ( BitVector_interval_scan_dec(address,first,&min,&max) )
Branch: 1 branch
BranchTrueFalseTotal
if ( BitVector_interval_scan_dec(address,first,&min,&max) ) 5367 80 5447
950 {
951 5367 ▶ EXTEND(sp,2);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,2); 0 5367 5367
952 5367 PUSHs(sv_2mortal(newSViv((IV)min)));
953 5367 PUSHs(sv_2mortal(newSViv((IV)max)));
954 }
955 /* else return empty list */
956 }
957 4 else BIT_VECTOR_START_ERROR;
958 }
959 1 else BIT_VECTOR_SCALAR_ERROR;
960 }
961 3 else BIT_VECTOR_OBJECT_ERROR;
962 }
963  
964  
965 void
966 BitVector_Interval_Copy(Xref,Yref,Xoffset,Yoffset,length)
967 BitVector_Object Xref
968 BitVector_Object Yref
969 BitVector_Scalar Xoffset
970 BitVector_Scalar Yoffset
971 BitVector_Scalar length
972 CODE:
973 {
974 BitVector_Handle Xhdl;
975 BitVector_Address Xadr;
976 BitVector_Handle Yhdl;
977 BitVector_Address Yadr;
978 N_int Xoff;
979 N_int Yoff;
980 N_int len;
981  
982 15 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 15 0 15
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 1 15
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 0 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 0 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 1 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 0 13
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 0 13
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 12 1 13
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 12 0 12
983 12 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 11 1 12
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 11 0 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 11 0 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 10 1 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 10 0 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 10 0 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 9 1 10
984 {
985 9 ▶ if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) && 9 0 9
if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) && 8 1 9
if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) && 8 0 8
986 8 ▶ BIT_VECTOR_SCALAR(Yoffset,N_int,Yoff) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Yoffset,N_int,Yoff) && 7 1 8
BIT_VECTOR_SCALAR(Yoffset,N_int,Yoff) && 7 0 7
987 7 ▶ BIT_VECTOR_SCALAR(length, N_int,len) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(length, N_int,len) ) 6 1 7
988 {
989 6 ▶ if ((Xoff < BV_BITS_(Xadr)) and (Yoff < BV_BITS_(Yadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((Xoff < BV_BITS_(Xadr)) and (Yoff < BV_BITS_(Yadr))) 4 2 6
if ((Xoff < BV_BITS_(Xadr)) and (Yoff < BV_BITS_(Yadr))) 2 2 4
990 {
991 2 ▶ if (len > 0) BitVector_Interval_Copy(Xadr,Yadr,Xoff,Yoff,len);
Branch: 1 branch
BranchTrueFalseTotal
if (len > 0) BitVector_Interval_Copy(Xadr,Yadr,Xoff,Yoff,len); 2 0 2
992 }
993 4 else BIT_VECTOR_OFFSET_ERROR;
994 }
995 3 else BIT_VECTOR_SCALAR_ERROR;
996 }
997 6 else BIT_VECTOR_OBJECT_ERROR;
998 }
999  
1000  
1001 void
1002 BitVector_Interval_Substitute(Xref,Yref,Xoffset,Xlength,Yoffset,Ylength)
1003 BitVector_Object Xref
1004 BitVector_Object Yref
1005 BitVector_Scalar Xoffset
1006 BitVector_Scalar Xlength
1007 BitVector_Scalar Yoffset
1008 BitVector_Scalar Ylength
1009 CODE:
1010 {
1011 BitVector_Handle Xhdl;
1012 BitVector_Address Xadr;
1013 BitVector_Handle Yhdl;
1014 BitVector_Address Yadr;
1015 N_int Xoff;
1016 N_int Xlen;
1017 N_int Yoff;
1018 N_int Ylen;
1019  
1020 16 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 16 0 16
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 15 1 16
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 15 0 15
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 15 0 15
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 1 15
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 0 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 0 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 1 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 0 13
1021 13 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 12 1 13
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 12 0 12
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 12 0 12
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 11 1 12
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 11 0 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 11 0 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 10 1 11
1022 {
1023 10 ▶ if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) && 10 0 10
if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) && 9 1 10
if ( BIT_VECTOR_SCALAR(Xoffset,N_int,Xoff) && 9 0 9
1024 9 ▶ BIT_VECTOR_SCALAR(Xlength,N_int,Xlen) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Xlength,N_int,Xlen) && 8 1 9
BIT_VECTOR_SCALAR(Xlength,N_int,Xlen) && 8 0 8
1025 8 ▶ BIT_VECTOR_SCALAR(Yoffset,N_int,Yoff) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Yoffset,N_int,Yoff) && 7 1 8
BIT_VECTOR_SCALAR(Yoffset,N_int,Yoff) && 7 0 7
1026 7 ▶ BIT_VECTOR_SCALAR(Ylength,N_int,Ylen) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Ylength,N_int,Ylen) ) 6 1 7
1027 {
1028 6 ▶ if ((Xoff <= BV_BITS_(Xadr)) and (Yoff <= BV_BITS_(Yadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((Xoff <= BV_BITS_(Xadr)) and (Yoff <= BV_BITS_(Yadr))) 4 2 6
if ((Xoff <= BV_BITS_(Xadr)) and (Yoff <= BV_BITS_(Yadr))) 2 2 4
1029 {
1030 2 Xadr = BitVector_Interval_Substitute(Xadr,Yadr,Xoff,Xlen,Yoff,Ylen);
1031 2 SvREADONLY_off(Xhdl);
1032 2 sv_setiv(Xhdl,(IV)Xadr);
1033 2 SvREADONLY_on(Xhdl);
1034 2 ▶ if (Xadr == NULL) BIT_VECTOR_MEMORY_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
if (Xadr == NULL) BIT_VECTOR_MEMORY_ERROR; 0 2 2
1035 }
1036 4 else BIT_VECTOR_OFFSET_ERROR;
1037 }
1038 4 else BIT_VECTOR_SCALAR_ERROR;
1039 }
1040 6 else BIT_VECTOR_OBJECT_ERROR;
1041 }
1042  
1043  
1044 boolean
1045 BitVector_is_empty(reference)
1046 BitVector_Object reference
1047 CODE:
1048 {
1049 BitVector_Handle handle;
1050 BitVector_Address address;
1051  
1052 61 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 61 0 61
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 60 1 61
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 60 0 60
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 60 0 60
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 59 1 60
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 59 0 59
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 59 0 59
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 58 1 59
1053 {
1054 58 RETVAL = BitVector_is_empty(address);
1055 }
1056 3 else BIT_VECTOR_OBJECT_ERROR;
1057 }
1058 OUTPUT:
1059 RETVAL
1060  
1061  
1062 boolean
1063 BitVector_is_full(reference)
1064 BitVector_Object reference
1065 CODE:
1066 {
1067 BitVector_Handle handle;
1068 BitVector_Address address;
1069  
1070 25 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25 0 25
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 24 1 25
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 24 0 24
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 24 0 24
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 23 1 24
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 23 0 23
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 23 0 23
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22 1 23
1071 {
1072 22 RETVAL = BitVector_is_full(address);
1073 }
1074 3 else BIT_VECTOR_OBJECT_ERROR;
1075 }
1076 OUTPUT:
1077 RETVAL
1078  
1079  
1080 boolean
1081 BitVector_equal(Xref,Yref)
1082 BitVector_Object Xref
1083 BitVector_Object Yref
1084 CODE:
1085 {
1086 BitVector_Handle Xhdl;
1087 BitVector_Address Xadr;
1088 BitVector_Handle Yhdl;
1089 BitVector_Address Yadr;
1090  
1091 24000 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 24000 0 24000
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23999 1 24000
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23999 0 23999
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23999 0 23999
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23998 1 23999
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23998 0 23998
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23998 0 23998
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23997 1 23998
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23997 0 23997
1092 23997 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23996 1 23997
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23996 0 23996
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23996 0 23996
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23995 1 23996
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23995 0 23995
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23995 0 23995
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23994 1 23995
1093 {
1094 23994 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 23992 2 23994
1095 {
1096 23992 RETVAL = BitVector_equal(Xadr,Yadr);
1097 }
1098 2 else BIT_VECTOR_SIZE_ERROR;
1099 }
1100 6 else BIT_VECTOR_OBJECT_ERROR;
1101 }
1102 OUTPUT:
1103 RETVAL
1104  
1105  
1106 Z_int
1107 BitVector_Lexicompare(Xref,Yref)
1108 BitVector_Object Xref
1109 BitVector_Object Yref
1110 CODE:
1111 {
1112 BitVector_Handle Xhdl;
1113 BitVector_Address Xadr;
1114 BitVector_Handle Yhdl;
1115 BitVector_Address Yadr;
1116  
1117 56 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 56 0 56
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 55 1 56
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 55 0 55
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 55 0 55
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 54 1 55
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 54 0 54
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 54 0 54
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 53 1 54
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 53 0 53
1118 53 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 52 1 53
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 52 0 52
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 52 0 52
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 51 1 52
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 51 0 51
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 51 0 51
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 50 1 51
1119 {
1120 50 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 48 2 50
1121 {
1122 48 RETVAL = BitVector_Lexicompare(Xadr,Yadr);
1123 }
1124 2 else BIT_VECTOR_SIZE_ERROR;
1125 }
1126 6 else BIT_VECTOR_OBJECT_ERROR;
1127 }
1128 OUTPUT:
1129 RETVAL
1130  
1131  
1132 Z_int
1133 BitVector_Compare(Xref,Yref)
1134 BitVector_Object Xref
1135 BitVector_Object Yref
1136 CODE:
1137 {
1138 BitVector_Handle Xhdl;
1139 BitVector_Address Xadr;
1140 BitVector_Handle Yhdl;
1141 BitVector_Address Yadr;
1142  
1143 35 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 35 0 35
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 34 1 35
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 34 0 34
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 34 0 34
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 33 1 34
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 33 0 33
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 33 0 33
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 32 1 33
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 32 0 32
1144 32 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 31 1 32
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 31 0 31
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 31 0 31
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 30 1 31
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 30 0 30
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 30 0 30
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 29 1 30
1145 {
1146 29 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 27 2 29
1147 {
1148 27 RETVAL = BitVector_Compare(Xadr,Yadr);
1149 }
1150 2 else BIT_VECTOR_SIZE_ERROR;
1151 }
1152 6 else BIT_VECTOR_OBJECT_ERROR;
1153 }
1154 OUTPUT:
1155 RETVAL
1156  
1157  
1158 void
1159 BitVector_to_Hex(reference)
1160 BitVector_Object reference
1161 ALIAS:
1162 to_String = 2
1163 PPCODE:
1164 {
1165 BitVector_Handle handle;
1166 BitVector_Address address;
1167 charptr string;
1168  
1169 255 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 255 0 255
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 254 1 255
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 254 0 254
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 254 0 254
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 253 1 254
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 253 0 253
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 253 0 253
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 252 1 253
1170 {
1171 252 string = BitVector_to_Hex(address);
1172 252 ▶ if (string != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (string != NULL) 252 0 252
1173 {
1174 252 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 252 252
1175 252 PUSHs(sv_2mortal(newSVpv((char *)string,0)));
1176 252 BitVector_Dispose(string);
1177 }
1178 0 else BIT_VECTOR_MEMORY_ERROR;
1179 }
1180 3 else BIT_VECTOR_OBJECT_ERROR;
1181 }
1182  
1183  
1184 void
1185 BitVector_from_Hex(reference,string)
1186 BitVector_Object reference
1187 BitVector_Scalar string
1188 ALIAS:
1189 from_string = 2
1190 CODE:
1191 {
1192 BitVector_Handle handle;
1193 BitVector_Address address;
1194 charptr pointer;
1195 BV_ErrCode code;
1196  
1197 3071 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3071 0 3071
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3070 1 3071
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3070 0 3070
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3070 0 3070
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3069 1 3070
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3069 0 3069
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3069 0 3069
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3068 1 3069
1198 {
1199 6135 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 3068 0 3068
if ( BIT_VECTOR_STRING(string,pointer) ) 3067 1 3068
if ( BIT_VECTOR_STRING(string,pointer) ) 3067 0 3067
1200 {
1201 3067 ▶ if ((code = BitVector_from_Hex(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Hex(address,pointer))) 5 3062 3067
1202 5 BIT_VECTOR_EXCEPTION(code);
1203 }
1204 1 else BIT_VECTOR_STRING_ERROR;
1205 }
1206 3 else BIT_VECTOR_OBJECT_ERROR;
1207 }
1208  
1209  
1210 void
1211 BitVector_to_Bin(reference)
1212 BitVector_Object reference
1213 PPCODE:
1214 {
1215 BitVector_Handle handle;
1216 BitVector_Address address;
1217 charptr string;
1218  
1219 112 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 112 0 112
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 111 1 112
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 111 0 111
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 111 0 111
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 110 1 111
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 110 0 110
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 110 0 110
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 109 1 110
1220 {
1221 109 string = BitVector_to_Bin(address);
1222 109 ▶ if (string != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (string != NULL) 109 0 109
1223 {
1224 109 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 109 109
1225 109 PUSHs(sv_2mortal(newSVpv((char *)string,0)));
1226 109 BitVector_Dispose(string);
1227 }
1228 0 else BIT_VECTOR_MEMORY_ERROR;
1229 }
1230 3 else BIT_VECTOR_OBJECT_ERROR;
1231 }
1232  
1233  
1234 void
1235 BitVector_from_Bin(reference,string)
1236 BitVector_Object reference
1237 BitVector_Scalar string
1238 CODE:
1239 {
1240 BitVector_Handle handle;
1241 BitVector_Address address;
1242 charptr pointer;
1243 BV_ErrCode code;
1244  
1245 59 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 59 0 59
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 58 1 59
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 58 0 58
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 58 0 58
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 57 1 58
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 57 0 57
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 57 0 57
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 56 1 57
1246 {
1247 111 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 56 0 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 1 56
if ( BIT_VECTOR_STRING(string,pointer) ) 55 0 55
1248 {
1249 55 ▶ if ((code = BitVector_from_Bin(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Bin(address,pointer))) 0 55 55
1250 0 BIT_VECTOR_EXCEPTION(code);
1251 }
1252 1 else BIT_VECTOR_STRING_ERROR;
1253 }
1254 3 else BIT_VECTOR_OBJECT_ERROR;
1255 }
1256  
1257  
1258 void
1259 BitVector_to_Dec(reference)
1260 BitVector_Object reference
1261 PPCODE:
1262 {
1263 BitVector_Handle handle;
1264 BitVector_Address address;
1265 charptr string;
1266  
1267 805 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 805 0 805
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 804 1 805
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 804 0 804
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 804 0 804
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 803 1 804
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 803 0 803
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 803 0 803
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 802 1 803
1268 {
1269 802 string = BitVector_to_Dec(address);
1270 802 ▶ if (string != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (string != NULL) 802 0 802
1271 {
1272 802 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 802 802
1273 802 PUSHs(sv_2mortal(newSVpv((char *)string,0)));
1274 802 BitVector_Dispose(string);
1275 }
1276 0 else BIT_VECTOR_MEMORY_ERROR;
1277 }
1278 3 else BIT_VECTOR_OBJECT_ERROR;
1279 }
1280  
1281  
1282 void
1283 BitVector_from_Dec(reference,string)
1284 BitVector_Object reference
1285 BitVector_Scalar string
1286 CODE:
1287 {
1288 BitVector_Handle handle;
1289 BitVector_Address address;
1290 charptr pointer;
1291 BV_ErrCode code;
1292  
1293 213 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 213 0 213
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 212 1 213
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 212 0 212
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 212 0 212
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 211 1 212
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 211 0 211
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 211 0 211
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 210 1 211
1294 {
1295 419 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 210 0 210
if ( BIT_VECTOR_STRING(string,pointer) ) 209 1 210
if ( BIT_VECTOR_STRING(string,pointer) ) 209 0 209
1296 {
1297 209 ▶ if ((code = BitVector_from_Dec(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Dec(address,pointer))) 0 209 209
1298 0 BIT_VECTOR_EXCEPTION(code);
1299 }
1300 1 else BIT_VECTOR_STRING_ERROR;
1301 }
1302 3 else BIT_VECTOR_OBJECT_ERROR;
1303 }
1304  
1305  
1306 void
1307 BitVector_to_Enum(reference)
1308 BitVector_Object reference
1309 ALIAS:
1310 to_ASCII = 2
1311 PPCODE:
1312 {
1313 BitVector_Handle handle;
1314 BitVector_Address address;
1315 charptr string;
1316  
1317 115 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 115 0 115
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 114 1 115
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 114 0 114
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 114 0 114
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 113 1 114
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 113 0 113
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 113 0 113
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 112 1 113
1318 {
1319 112 string = BitVector_to_Enum(address);
1320 112 ▶ if (string != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (string != NULL) 112 0 112
1321 {
1322 112 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 112 112
1323 112 PUSHs(sv_2mortal(newSVpv((char *)string,0)));
1324 112 BitVector_Dispose(string);
1325 }
1326 0 else BIT_VECTOR_MEMORY_ERROR;
1327 }
1328 3 else BIT_VECTOR_OBJECT_ERROR;
1329 }
1330  
1331  
1332 void
1333 BitVector_from_Enum(reference,string)
1334 BitVector_Object reference
1335 BitVector_Scalar string
1336 ALIAS:
1337 from_ASCII = 2
1338 CODE:
1339 {
1340 BitVector_Handle handle;
1341 BitVector_Address address;
1342 charptr pointer;
1343 BV_ErrCode code;
1344  
1345 71 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 71 0 71
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 70 1 71
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 70 0 70
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 70 0 70
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 69 1 70
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 69 0 69
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 69 0 69
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 68 1 69
1346 {
1347 135 ▶ if ( BIT_VECTOR_STRING(string,pointer) )
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_STRING(string,pointer) ) 68 0 68
if ( BIT_VECTOR_STRING(string,pointer) ) 67 1 68
if ( BIT_VECTOR_STRING(string,pointer) ) 67 0 67
1348 {
1349 67 ▶ if ((code = BitVector_from_Enum(address,pointer)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_from_Enum(address,pointer))) 8 59 67
1350 8 BIT_VECTOR_EXCEPTION(code);
1351 }
1352 1 else BIT_VECTOR_STRING_ERROR;
1353 }
1354 3 else BIT_VECTOR_OBJECT_ERROR;
1355 }
1356  
1357  
1358 void
1359 BitVector_Bit_Off(reference,index)
1360 BitVector_Object reference
1361 BitVector_Scalar index
1362 CODE:
1363 {
1364 BitVector_Handle handle;
1365 BitVector_Address address;
1366 N_int idx;
1367  
1368 25028 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25028 0 25028
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25027 1 25028
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25027 0 25027
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25027 0 25027
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25026 1 25027
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25026 0 25026
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25026 0 25026
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 25025 1 25026
1369 {
1370 25025 ▶ if ( BIT_VECTOR_SCALAR(index,N_int,idx) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 25025 0 25025
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 25024 1 25025
1371 {
1372 25024 ▶ if (idx < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (idx < BV_BITS_(address)) 25022 2 25024
1373 {
1374 25022 BitVector_Bit_Off(address,idx);
1375 }
1376 2 else BIT_VECTOR_INDEX_ERROR;
1377 }
1378 1 else BIT_VECTOR_SCALAR_ERROR;
1379 }
1380 3 else BIT_VECTOR_OBJECT_ERROR;
1381 }
1382  
1383  
1384 void
1385 BitVector_Bit_On(reference,index)
1386 BitVector_Object reference
1387 BitVector_Scalar index
1388 CODE:
1389 {
1390 BitVector_Handle handle;
1391 BitVector_Address address;
1392 N_int idx;
1393  
1394 22898 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22898 0 22898
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22897 1 22898
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22897 0 22897
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22897 0 22897
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22896 1 22897
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22896 0 22896
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22896 0 22896
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 22895 1 22896
1395 {
1396 22895 ▶ if ( BIT_VECTOR_SCALAR(index,N_int,idx) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 22895 0 22895
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 22894 1 22895
1397 {
1398 22894 ▶ if (idx < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (idx < BV_BITS_(address)) 22892 2 22894
1399 {
1400 22892 BitVector_Bit_On(address,idx);
1401 }
1402 2 else BIT_VECTOR_INDEX_ERROR;
1403 }
1404 1 else BIT_VECTOR_SCALAR_ERROR;
1405 }
1406 3 else BIT_VECTOR_OBJECT_ERROR;
1407 }
1408  
1409  
1410 boolean
1411 BitVector_bit_flip(reference,index)
1412 BitVector_Object reference
1413 BitVector_Scalar index
1414 ALIAS:
1415 flip = 2
1416 CODE:
1417 {
1418 BitVector_Handle handle;
1419 BitVector_Address address;
1420 N_int idx;
1421  
1422 13343 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13343 0 13343
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13342 1 13343
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13342 0 13342
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13342 0 13342
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13341 1 13342
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13341 0 13341
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13341 0 13341
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 13340 1 13341
1423 {
1424 13340 ▶ if ( BIT_VECTOR_SCALAR(index,N_int,idx) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 13340 0 13340
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 13339 1 13340
1425 {
1426 13339 ▶ if (idx < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (idx < BV_BITS_(address)) 13337 2 13339
1427 {
1428 13337 RETVAL = BitVector_bit_flip(address,idx);
1429 }
1430 2 else BIT_VECTOR_INDEX_ERROR;
1431 }
1432 1 else BIT_VECTOR_SCALAR_ERROR;
1433 }
1434 3 else BIT_VECTOR_OBJECT_ERROR;
1435 }
1436 OUTPUT:
1437 RETVAL
1438  
1439  
1440 boolean
1441 BitVector_bit_test(reference,index)
1442 BitVector_Object reference
1443 BitVector_Scalar index
1444 ALIAS:
1445 contains = 1
1446 in = 2
1447 CODE:
1448 {
1449 BitVector_Handle handle;
1450 BitVector_Address address;
1451 N_int idx;
1452  
1453 128255 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128255 0 128255
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128254 1 128255
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128254 0 128254
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128254 0 128254
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128253 1 128254
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128253 0 128253
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128253 0 128253
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 128252 1 128253
1454 {
1455 128252 ▶ if ( BIT_VECTOR_SCALAR(index,N_int,idx) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 128252 0 128252
if ( BIT_VECTOR_SCALAR(index,N_int,idx) ) 128251 1 128252
1456 {
1457 128251 ▶ if (idx < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (idx < BV_BITS_(address)) 128249 2 128251
1458 {
1459 128249 RETVAL = BitVector_bit_test(address,idx);
1460 }
1461 2 else BIT_VECTOR_INDEX_ERROR;
1462 }
1463 1 else BIT_VECTOR_SCALAR_ERROR;
1464 }
1465 3 else BIT_VECTOR_OBJECT_ERROR;
1466 }
1467 OUTPUT:
1468 RETVAL
1469  
1470  
1471 void
1472 BitVector_Bit_Copy(reference,index,bit)
1473 BitVector_Object reference
1474 BitVector_Scalar index
1475 BitVector_Scalar bit
1476 CODE:
1477 {
1478 BitVector_Handle handle;
1479 BitVector_Address address;
1480 N_int idx;
1481 boolean b;
1482  
1483 8 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 0 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 1 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 1 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 1 6
1484 {
1485 5 ▶ if ( BIT_VECTOR_SCALAR(index,N_int,idx) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(index,N_int,idx) && 5 0 5
if ( BIT_VECTOR_SCALAR(index,N_int,idx) && 4 1 5
if ( BIT_VECTOR_SCALAR(index,N_int,idx) && 4 0 4
1486 4 ▶ BIT_VECTOR_SCALAR(bit,boolean,b) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(bit,boolean,b) ) 3 1 4
1487 {
1488 3 ▶ if (idx < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (idx < BV_BITS_(address)) 1 2 3
1489 {
1490 1 BitVector_Bit_Copy(address,idx,b);
1491 }
1492 2 else BIT_VECTOR_INDEX_ERROR;
1493 }
1494 2 else BIT_VECTOR_SCALAR_ERROR;
1495 }
1496 3 else BIT_VECTOR_OBJECT_ERROR;
1497 }
1498  
1499  
1500 void
1501 BitVector_LSB(reference,bit)
1502 BitVector_Object reference
1503 BitVector_Scalar bit
1504 CODE:
1505 {
1506 BitVector_Handle handle;
1507 BitVector_Address address;
1508 boolean b;
1509  
1510 5 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 0 5
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 1 5
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 1 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 1 3
1511 {
1512 2 ▶ if ( BIT_VECTOR_SCALAR(bit,boolean,b) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bit,boolean,b) ) 2 0 2
if ( BIT_VECTOR_SCALAR(bit,boolean,b) ) 1 1 2
1513 {
1514 1 BitVector_LSB(address,b);
1515 }
1516 1 else BIT_VECTOR_SCALAR_ERROR;
1517 }
1518 3 else BIT_VECTOR_OBJECT_ERROR;
1519 }
1520  
1521  
1522 void
1523 BitVector_MSB(reference,bit)
1524 BitVector_Object reference
1525 BitVector_Scalar bit
1526 CODE:
1527 {
1528 BitVector_Handle handle;
1529 BitVector_Address address;
1530 boolean b;
1531  
1532 5 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 0 5
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 1 5
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 1 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 1 3
1533 {
1534 2 ▶ if ( BIT_VECTOR_SCALAR(bit,boolean,b) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bit,boolean,b) ) 2 0 2
if ( BIT_VECTOR_SCALAR(bit,boolean,b) ) 1 1 2
1535 {
1536 1 BitVector_MSB(address,b);
1537 }
1538 1 else BIT_VECTOR_SCALAR_ERROR;
1539 }
1540 3 else BIT_VECTOR_OBJECT_ERROR;
1541 }
1542  
1543  
1544 boolean
1545 BitVector_lsb(reference)
1546 BitVector_Object reference
1547 CODE:
1548 {
1549 BitVector_Handle handle;
1550 BitVector_Address address;
1551  
1552 4 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 1 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 1 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1 1 2
1553 {
1554 1 RETVAL = BitVector_lsb_(address);
1555 }
1556 3 else BIT_VECTOR_OBJECT_ERROR;
1557 }
1558 OUTPUT:
1559 RETVAL
1560  
1561  
1562 boolean
1563 BitVector_msb(reference)
1564 BitVector_Object reference
1565 CODE:
1566 {
1567 BitVector_Handle handle;
1568 BitVector_Address address;
1569  
1570 29 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 29 0 29
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 28 1 29
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 28 0 28
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 28 0 28
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 27 1 28
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 27 0 27
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 27 0 27
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 26 1 27
1571 {
1572 26 RETVAL = BitVector_msb_(address);
1573 }
1574 3 else BIT_VECTOR_OBJECT_ERROR;
1575 }
1576 OUTPUT:
1577 RETVAL
1578  
1579  
1580 boolean
1581 BitVector_rotate_left(reference)
1582 BitVector_Object reference
1583 CODE:
1584 {
1585 BitVector_Handle handle;
1586 BitVector_Address address;
1587  
1588 4061 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4061 0 4061
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4060 1 4061
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4060 0 4060
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4060 0 4060
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4059 1 4060
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4059 0 4059
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4059 0 4059
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4058 1 4059
1589 {
1590 4058 RETVAL = BitVector_rotate_left(address);
1591 }
1592 3 else BIT_VECTOR_OBJECT_ERROR;
1593 }
1594 OUTPUT:
1595 RETVAL
1596  
1597  
1598 boolean
1599 BitVector_rotate_right(reference)
1600 BitVector_Object reference
1601 CODE:
1602 {
1603 BitVector_Handle handle;
1604 BitVector_Address address;
1605  
1606 4061 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4061 0 4061
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4060 1 4061
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4060 0 4060
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4060 0 4060
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4059 1 4060
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4059 0 4059
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4059 0 4059
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4058 1 4059
1607 {
1608 4058 RETVAL = BitVector_rotate_right(address);
1609 }
1610 3 else BIT_VECTOR_OBJECT_ERROR;
1611 }
1612 OUTPUT:
1613 RETVAL
1614  
1615  
1616 boolean
1617 BitVector_shift_left(reference,carry)
1618 BitVector_Object reference
1619 BitVector_Scalar carry
1620 CODE:
1621 {
1622 BitVector_Handle handle;
1623 BitVector_Address address;
1624 boolean c;
1625  
1626 12176 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12176 0 12176
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12175 1 12176
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12175 0 12175
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12175 0 12175
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12174 1 12175
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12174 0 12174
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12174 0 12174
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12173 1 12174
1627 {
1628 12173 ▶ if ( BIT_VECTOR_SCALAR(carry,boolean,c) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 12173 0 12173
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 12172 1 12173
1629 {
1630 12172 RETVAL = BitVector_shift_left(address,c);
1631 }
1632 1 else BIT_VECTOR_SCALAR_ERROR;
1633 }
1634 3 else BIT_VECTOR_OBJECT_ERROR;
1635 }
1636 OUTPUT:
1637 RETVAL
1638  
1639  
1640 boolean
1641 BitVector_shift_right(reference,carry)
1642 BitVector_Object reference
1643 BitVector_Scalar carry
1644 CODE:
1645 {
1646 BitVector_Handle handle;
1647 BitVector_Address address;
1648 boolean c;
1649  
1650 12176 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12176 0 12176
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12175 1 12176
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12175 0 12175
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12175 0 12175
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12174 1 12175
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12174 0 12174
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12174 0 12174
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 12173 1 12174
1651 {
1652 12173 ▶ if ( BIT_VECTOR_SCALAR(carry,boolean,c) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 12173 0 12173
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 12172 1 12173
1653 {
1654 12172 RETVAL = BitVector_shift_right(address,c);
1655 }
1656 1 else BIT_VECTOR_SCALAR_ERROR;
1657 }
1658 3 else BIT_VECTOR_OBJECT_ERROR;
1659 }
1660 OUTPUT:
1661 RETVAL
1662  
1663  
1664 void
1665 BitVector_Move_Left(reference,bits)
1666 BitVector_Object reference
1667 BitVector_Scalar bits
1668 CODE:
1669 {
1670 BitVector_Handle handle;
1671 BitVector_Address address;
1672 N_int cnt;
1673  
1674 2568 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2568 0 2568
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2567 1 2568
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2567 0 2567
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2567 0 2567
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2566 1 2567
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2566 0 2566
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2566 0 2566
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2565 1 2566
1675 {
1676 2565 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,cnt) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,cnt) ) 2565 0 2565
if ( BIT_VECTOR_SCALAR(bits,N_int,cnt) ) 2564 1 2565
1677 {
1678 2564 BitVector_Move_Left(address,cnt);
1679 }
1680 1 else BIT_VECTOR_SCALAR_ERROR;
1681 }
1682 3 else BIT_VECTOR_OBJECT_ERROR;
1683 }
1684  
1685  
1686 void
1687 BitVector_Move_Right(reference,bits)
1688 BitVector_Object reference
1689 BitVector_Scalar bits
1690 CODE:
1691 {
1692 BitVector_Handle handle;
1693 BitVector_Address address;
1694 N_int cnt;
1695  
1696 2568 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2568 0 2568
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2567 1 2568
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2567 0 2567
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2567 0 2567
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2566 1 2567
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2566 0 2566
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2566 0 2566
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2565 1 2566
1697 {
1698 2565 ▶ if ( BIT_VECTOR_SCALAR(bits,N_int,cnt) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(bits,N_int,cnt) ) 2565 0 2565
if ( BIT_VECTOR_SCALAR(bits,N_int,cnt) ) 2564 1 2565
1699 {
1700 2564 BitVector_Move_Right(address,cnt);
1701 }
1702 1 else BIT_VECTOR_SCALAR_ERROR;
1703 }
1704 3 else BIT_VECTOR_OBJECT_ERROR;
1705 }
1706  
1707  
1708 void
1709 BitVector_Insert(reference,offset,count)
1710 BitVector_Object reference
1711 BitVector_Scalar offset
1712 BitVector_Scalar count
1713 CODE:
1714 {
1715 BitVector_Handle handle;
1716 BitVector_Address address;
1717 N_int off;
1718 N_int cnt;
1719  
1720 5160 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5160 0 5160
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5159 1 5160
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5159 0 5159
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5159 0 5159
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5158 1 5159
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5158 0 5158
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5158 0 5158
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5157 1 5158
1721 {
1722 5157 ▶ if ( BIT_VECTOR_SCALAR(offset,N_int,off) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5157 0 5157
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5156 1 5157
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5156 0 5156
1723 5156 ▶ BIT_VECTOR_SCALAR(count,N_int,cnt) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(count,N_int,cnt) ) 5155 1 5156
1724 {
1725 5155 ▶ if (off < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_BITS_(address)) 5153 2 5155
1726 {
1727 5153 BitVector_Insert(address,off,cnt,true);
1728 }
1729 2 else BIT_VECTOR_OFFSET_ERROR;
1730 }
1731 2 else BIT_VECTOR_SCALAR_ERROR;
1732 }
1733 3 else BIT_VECTOR_OBJECT_ERROR;
1734 }
1735  
1736  
1737 void
1738 BitVector_Delete(reference,offset,count)
1739 BitVector_Object reference
1740 BitVector_Scalar offset
1741 BitVector_Scalar count
1742 CODE:
1743 {
1744 BitVector_Handle handle;
1745 BitVector_Address address;
1746 N_int off;
1747 N_int cnt;
1748  
1749 5160 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5160 0 5160
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5159 1 5160
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5159 0 5159
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5159 0 5159
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5158 1 5159
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5158 0 5158
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5158 0 5158
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5157 1 5158
1750 {
1751 5157 ▶ if ( BIT_VECTOR_SCALAR(offset,N_int,off) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5157 0 5157
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5156 1 5157
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5156 0 5156
1752 5156 ▶ BIT_VECTOR_SCALAR(count,N_int,cnt) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(count,N_int,cnt) ) 5155 1 5156
1753 {
1754 5155 ▶ if (off < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_BITS_(address)) 5153 2 5155
1755 {
1756 5153 BitVector_Delete(address,off,cnt,true);
1757 }
1758 2 else BIT_VECTOR_OFFSET_ERROR;
1759 }
1760 2 else BIT_VECTOR_SCALAR_ERROR;
1761 }
1762 3 else BIT_VECTOR_OBJECT_ERROR;
1763 }
1764  
1765  
1766 boolean
1767 BitVector_increment(reference)
1768 BitVector_Object reference
1769 CODE:
1770 {
1771 BitVector_Handle handle;
1772 BitVector_Address address;
1773  
1774 1336 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1336 0 1336
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1335 1 1336
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1335 0 1335
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1335 0 1335
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1334 1 1335
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1334 0 1334
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1334 0 1334
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1333 1 1334
1775 {
1776 1333 RETVAL = BitVector_increment(address);
1777 }
1778 3 else BIT_VECTOR_OBJECT_ERROR;
1779 }
1780 OUTPUT:
1781 RETVAL
1782  
1783  
1784 boolean
1785 BitVector_decrement(reference)
1786 BitVector_Object reference
1787 CODE:
1788 {
1789 BitVector_Handle handle;
1790 BitVector_Address address;
1791  
1792 1336 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1336 0 1336
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1335 1 1336
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1335 0 1335
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1335 0 1335
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1334 1 1335
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1334 0 1334
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1334 0 1334
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1333 1 1334
1793 {
1794 1333 RETVAL = BitVector_decrement(address);
1795 }
1796 3 else BIT_VECTOR_OBJECT_ERROR;
1797 }
1798 OUTPUT:
1799 RETVAL
1800  
1801  
1802 void
1803 BitVector_add(Xref,Yref,Zref,carry)
1804 BitVector_Object Xref
1805 BitVector_Object Yref
1806 BitVector_Object Zref
1807 BitVector_Scalar carry
1808 PPCODE:
1809 {
1810 BitVector_Handle Xhdl;
1811 BitVector_Address Xadr;
1812 BitVector_Handle Yhdl;
1813 BitVector_Address Yadr;
1814 BitVector_Handle Zhdl;
1815 BitVector_Address Zadr;
1816 boolean c;
1817 boolean v;
1818  
1819 593 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 593 0 593
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 592 1 593
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 592 0 592
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 592 0 592
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 591 1 592
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 591 0 591
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 591 0 591
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 590 1 591
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 590 0 590
1820 590 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 589 1 590
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 589 0 589
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 589 0 589
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 588 1 589
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 588 0 588
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 588 0 588
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 587 1 588
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 587 0 587
1821 587 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 586 1 587
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 586 0 586
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 586 0 586
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 585 1 586
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 585 0 585
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 585 0 585
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 584 1 585
1822 {
1823 584 ▶ if ( BIT_VECTOR_SCALAR(carry,boolean,c) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 584 0 584
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 583 1 584
1824 {
1825 583 ▶ if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 581 2 583
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 580 1 581
1826 {
1827 580 v = BitVector_compute(Xadr,Yadr,Zadr,false,&c);
1828 1160 ▶ if (GIMME_V == G_ARRAY)
Branch: 1 branch
BranchTrueFalseTotal
if (GIMME_V == G_ARRAY) 0 580 580
1829 {
1830 0 ▶ EXTEND(sp,2);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,2); 0 0 0
1831 0 PUSHs(sv_2mortal(newSViv((IV)c)));
1832 0 PUSHs(sv_2mortal(newSViv((IV)v)));
1833 }
1834 else
1835 {
1836 580 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 580 580
1837 580 PUSHs(sv_2mortal(newSViv((IV)c)));
1838 }
1839 }
1840 3 else BIT_VECTOR_SIZE_ERROR;
1841 }
1842 1 else BIT_VECTOR_SCALAR_ERROR;
1843 }
1844 9 else BIT_VECTOR_OBJECT_ERROR;
1845 }
1846  
1847  
1848 void
1849 BitVector_subtract(Xref,Yref,Zref,carry)
1850 BitVector_Object Xref
1851 BitVector_Object Yref
1852 BitVector_Object Zref
1853 BitVector_Scalar carry
1854 ALIAS:
1855 sub = 2
1856 PPCODE:
1857 {
1858 BitVector_Handle Xhdl;
1859 BitVector_Address Xadr;
1860 BitVector_Handle Yhdl;
1861 BitVector_Address Yadr;
1862 BitVector_Handle Zhdl;
1863 BitVector_Address Zadr;
1864 boolean c;
1865 boolean v;
1866  
1867 516 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 516 0 516
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 515 1 516
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 515 0 515
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 515 0 515
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 514 1 515
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 514 0 514
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 514 0 514
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 513 1 514
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 513 0 513
1868 513 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 512 1 513
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 512 0 512
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 512 0 512
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 511 1 512
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 511 0 511
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 511 0 511
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 510 1 511
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 510 0 510
1869 510 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 509 1 510
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 509 0 509
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 509 0 509
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 508 1 509
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 508 0 508
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 508 0 508
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 507 1 508
1870 {
1871 507 ▶ if ( BIT_VECTOR_SCALAR(carry,boolean,c) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 507 0 507
if ( BIT_VECTOR_SCALAR(carry,boolean,c) ) 506 1 507
1872 {
1873 506 ▶ if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 504 2 506
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 503 1 504
1874 {
1875 503 v = BitVector_compute(Xadr,Yadr,Zadr,true,&c);
1876 1006 ▶ if (GIMME_V == G_ARRAY)
Branch: 1 branch
BranchTrueFalseTotal
if (GIMME_V == G_ARRAY) 0 503 503
1877 {
1878 0 ▶ EXTEND(sp,2);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,2); 0 0 0
1879 0 PUSHs(sv_2mortal(newSViv((IV)c)));
1880 0 PUSHs(sv_2mortal(newSViv((IV)v)));
1881 }
1882 else
1883 {
1884 503 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 503 503
1885 503 PUSHs(sv_2mortal(newSViv((IV)c)));
1886 }
1887 }
1888 3 else BIT_VECTOR_SIZE_ERROR;
1889 }
1890 1 else BIT_VECTOR_SCALAR_ERROR;
1891 }
1892 9 else BIT_VECTOR_OBJECT_ERROR;
1893 }
1894  
1895  
1896 boolean
1897 BitVector_inc(Xref,Yref)
1898 BitVector_Object Xref
1899 BitVector_Object Yref
1900 CODE:
1901 {
1902 BitVector_Handle Xhdl;
1903 BitVector_Address Xadr;
1904 BitVector_Handle Yhdl;
1905 BitVector_Address Yadr;
1906 0 boolean c = true;
1907  
1908 0 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
1909 0 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
1910 {
1911 0 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 0 0 0
1912 {
1913 0 RETVAL = BitVector_compute(Xadr,Yadr,NULL,false,&c);
1914 }
1915 0 else BIT_VECTOR_SIZE_ERROR;
1916 }
1917 0 else BIT_VECTOR_OBJECT_ERROR;
1918 }
1919 OUTPUT:
1920 RETVAL
1921  
1922  
1923 boolean
1924 BitVector_dec(Xref,Yref)
1925 BitVector_Object Xref
1926 BitVector_Object Yref
1927 CODE:
1928 {
1929 BitVector_Handle Xhdl;
1930 BitVector_Address Xadr;
1931 BitVector_Handle Yhdl;
1932 BitVector_Address Yadr;
1933 0 boolean c = true;
1934  
1935 0 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 0 0 0
1936 0 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 0 0 0
1937 {
1938 0 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 0 0 0
1939 {
1940 0 RETVAL = BitVector_compute(Xadr,Yadr,NULL,true,&c);
1941 }
1942 0 else BIT_VECTOR_SIZE_ERROR;
1943 }
1944 0 else BIT_VECTOR_OBJECT_ERROR;
1945 }
1946 OUTPUT:
1947 RETVAL
1948  
1949  
1950 void
1951 BitVector_Negate(Xref,Yref)
1952 BitVector_Object Xref
1953 BitVector_Object Yref
1954 ALIAS:
1955 Neg = 1
1956 CODE:
1957 {
1958 BitVector_Handle Xhdl;
1959 BitVector_Address Xadr;
1960 BitVector_Handle Yhdl;
1961 BitVector_Address Yadr;
1962  
1963 10 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 1 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 0 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 0 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 1 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 0 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 0 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 1 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 0 7
1964 7 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 1 7
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 0 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 0 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 1 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 0 5
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 0 5
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 4 1 5
1965 {
1966 4 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 2 2 4
1967 {
1968 2 BitVector_Negate(Xadr,Yadr);
1969 }
1970 2 else BIT_VECTOR_SIZE_ERROR;
1971 }
1972 6 else BIT_VECTOR_OBJECT_ERROR;
1973 }
1974  
1975  
1976 void
1977 BitVector_Absolute(Xref,Yref)
1978 BitVector_Object Xref
1979 BitVector_Object Yref
1980 ALIAS:
1981 Abs = 1
1982 CODE:
1983 {
1984 BitVector_Handle Xhdl;
1985 BitVector_Address Xadr;
1986 BitVector_Handle Yhdl;
1987 BitVector_Address Yadr;
1988  
1989 10 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 10 0 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 1 10
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 0 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 9 0 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 1 9
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 0 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 8 0 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 1 8
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 7 0 7
1990 7 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 1 7
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 0 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 6 0 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 1 6
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 0 5
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5 0 5
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 4 1 5
1991 {
1992 4 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 2 2 4
1993 {
1994 2 BitVector_Absolute(Xadr,Yadr);
1995 }
1996 2 else BIT_VECTOR_SIZE_ERROR;
1997 }
1998 6 else BIT_VECTOR_OBJECT_ERROR;
1999 }
2000  
2001  
2002 Z_int
2003 BitVector_Sign(reference)
2004 BitVector_Object reference
2005 CODE:
2006 {
2007 BitVector_Handle handle;
2008 BitVector_Address address;
2009  
2010 4 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 1 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 1 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1 1 2
2011 {
2012 1 RETVAL = BitVector_Sign(address);
2013 }
2014 3 else BIT_VECTOR_OBJECT_ERROR;
2015 }
2016 OUTPUT:
2017 RETVAL
2018  
2019  
2020 void
2021 BitVector_Multiply(Xref,Yref,Zref)
2022 BitVector_Object Xref
2023 BitVector_Object Yref
2024 BitVector_Object Zref
2025 CODE:
2026 {
2027 BitVector_Handle Xhdl;
2028 BitVector_Address Xadr;
2029 BitVector_Handle Yhdl;
2030 BitVector_Address Yadr;
2031 BitVector_Handle Zhdl;
2032 BitVector_Address Zadr;
2033 BV_ErrCode code;
2034  
2035 168 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 168 0 168
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 167 1 168
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 167 0 167
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 167 0 167
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 166 1 167
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 166 0 166
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 166 0 166
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 165 1 166
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 165 0 165
2036 165 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 164 1 165
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 164 0 164
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 164 0 164
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 163 1 164
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 163 0 163
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 163 0 163
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 162 1 163
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 162 0 162
2037 162 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 161 1 162
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 161 0 161
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 161 0 161
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 160 1 161
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 160 0 160
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 160 0 160
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 159 1 160
2038 {
2039 159 ▶ if ((BV_BITS_(Xadr) >= BV_BITS_(Yadr)) and (BV_BITS_(Yadr) == BV_BITS_(Zadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((BV_BITS_(Xadr) >= BV_BITS_(Yadr)) and (BV_BITS_(Yadr) == BV_BITS_(Zadr))) 158 1 159
if ((BV_BITS_(Xadr) >= BV_BITS_(Yadr)) and (BV_BITS_(Yadr) == BV_BITS_(Zadr))) 156 2 158
2040 {
2041 156 ▶ if ((code = BitVector_Multiply(Xadr,Yadr,Zadr)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_Multiply(Xadr,Yadr,Zadr))) 0 156 156
2042 0 BIT_VECTOR_EXCEPTION(code);
2043 }
2044 3 else BIT_VECTOR_SIZE_ERROR;
2045 }
2046 9 else BIT_VECTOR_OBJECT_ERROR;
2047 }
2048  
2049  
2050 void
2051 BitVector_Divide(Qref,Xref,Yref,Rref)
2052 BitVector_Object Qref
2053 BitVector_Object Xref
2054 BitVector_Object Yref
2055 BitVector_Object Rref
2056 CODE:
2057 {
2058 BitVector_Handle Qhdl;
2059 BitVector_Address Qadr;
2060 BitVector_Handle Xhdl;
2061 BitVector_Address Xadr;
2062 BitVector_Handle Yhdl;
2063 BitVector_Address Yadr;
2064 BitVector_Handle Rhdl;
2065 BitVector_Address Radr;
2066 BV_ErrCode code;
2067  
2068 18 ▶ if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 18 0 18
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 17 1 18
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 17 0 17
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 17 0 17
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 16 1 17
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 16 0 16
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 16 0 16
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 15 1 16
if ( BIT_VECTOR_OBJECT(Qref,Qhdl,Qadr) && 15 0 15
2069 15 ▶ BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 1 15
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 0 14
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 0 14
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 1 14
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 0 13
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 0 13
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 12 1 13
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 12 0 12
2070 12 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 11 1 12
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 11 0 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 11 0 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 10 1 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 10 0 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 10 0 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 9 1 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 9 0 9
2071 9 ▶ BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) ) 8 1 9
BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) ) 8 0 8
BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) ) 8 0 8
BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) ) 7 1 8
BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) ) 7 0 7
BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) ) 7 0 7
BIT_VECTOR_OBJECT(Rref,Rhdl,Radr) ) 6 1 7
2072 {
2073 6 ▶ if ((code = BitVector_Divide(Qadr,Xadr,Yadr,Radr)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_Divide(Qadr,Xadr,Yadr,Radr))) 5 1 6
2074 5 BIT_VECTOR_EXCEPTION(code);
2075 }
2076 12 else BIT_VECTOR_OBJECT_ERROR;
2077 }
2078  
2079  
2080 void
2081 BitVector_GCD(...)
2082 CODE:
2083 {
2084 BitVector_Object Uref;
2085 BitVector_Handle Uhdl;
2086 BitVector_Address Uadr;
2087 BitVector_Object Vref;
2088 BitVector_Handle Vhdl;
2089 BitVector_Address Vadr;
2090 BitVector_Object Wref;
2091 BitVector_Handle Whdl;
2092 BitVector_Address Wadr;
2093 BitVector_Object Xref;
2094 BitVector_Handle Xhdl;
2095 BitVector_Address Xadr;
2096 BitVector_Object Yref;
2097 BitVector_Handle Yhdl;
2098 BitVector_Address Yadr;
2099 BV_ErrCode code;
2100  
2101 170 ▶ if (items == 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items == 3) 91 79 170
2102 {
2103 91 Uref = ST(0);
2104 91 Xref = ST(1);
2105 91 Yref = ST(2);
2106 91 ▶ if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 91 0 91
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 90 1 91
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 90 0 90
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 90 0 90
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 89 1 90
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 89 0 89
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 89 0 89
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 88 1 89
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 88 0 88
2107 88 ▶ BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 87 1 88
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 87 0 87
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 87 0 87
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 86 1 87
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 86 0 86
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 86 0 86
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 85 1 86
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 85 0 85
2108 85 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 84 1 85
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 84 0 84
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 84 0 84
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 83 1 84
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 83 0 83
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 83 0 83
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 82 1 83
2109 {
2110 82 ▶ if ((code = BitVector_GCD(Uadr,Xadr,Yadr)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_GCD(Uadr,Xadr,Yadr))) 3 79 82
2111 3 BIT_VECTOR_EXCEPTION(code);
2112 }
2113 9 else BIT_VECTOR_OBJECT_ERROR;
2114 }
2115 79 ▶ else if (items == 5)
Branch: 1 branch
BranchTrueFalseTotal
else if (items == 5) 77 2 79
2116 {
2117 77 Uref = ST(0);
2118 77 Vref = ST(1);
2119 77 Wref = ST(2);
2120 77 Xref = ST(3);
2121 77 Yref = ST(4);
2122 77 ▶ if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
if ( BIT_VECTOR_OBJECT(Uref,Uhdl,Uadr) && 77 0 77
2123 77 ▶ BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
BIT_VECTOR_OBJECT(Vref,Vhdl,Vadr) && 77 0 77
2124 77 ▶ BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
BIT_VECTOR_OBJECT(Wref,Whdl,Wadr) && 77 0 77
2125 77 ▶ BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 77 0 77
2126 77 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 77 0 77
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 77 0 77
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 77 0 77
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 77 0 77
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 77 0 77
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 77 0 77
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 77 0 77
2127 {
2128 77 ▶ if ((code = BitVector_GCD2(Uadr,Vadr,Wadr,Xadr,Yadr)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_GCD2(Uadr,Vadr,Wadr,Xadr,Yadr))) 0 77 77
2129 0 BIT_VECTOR_EXCEPTION(code);
2130 }
2131 0 else BIT_VECTOR_OBJECT_ERROR;
2132 }
2133 2 else croak("Usage: %s(Uref[,Vref,Wref],Xref,Yref)", GvNAME(CvGV(cv)));
2134 }
2135  
2136  
2137 void
2138 BitVector_Power(Xref,Yref,Zref)
2139 BitVector_Object Xref
2140 BitVector_Object Yref
2141 BitVector_Object Zref
2142 CODE:
2143 {
2144 BitVector_Handle Xhdl;
2145 BitVector_Address Xadr;
2146 BitVector_Handle Yhdl;
2147 BitVector_Address Yadr;
2148 BitVector_Handle Zhdl;
2149 BitVector_Address Zadr;
2150 BV_ErrCode code;
2151  
2152 14 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 14 0 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 1 14
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 0 13
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 13 0 13
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 12 1 13
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 12 0 12
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 12 0 12
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 11 1 12
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 11 0 11
2153 11 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 10 1 11
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 10 0 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 10 0 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 9 1 10
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 9 0 9
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 9 0 9
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 8 1 9
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 8 0 8
2154 8 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 7 1 8
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 7 0 7
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 7 0 7
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 6 1 7
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 6 0 6
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 6 0 6
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 5 1 6
2155 {
2156 5 ▶ if ((code = BitVector_Power(Xadr,Yadr,Zadr)))
Branch: 1 branch
BranchTrueFalseTotal
if ((code = BitVector_Power(Xadr,Yadr,Zadr))) 2 3 5
2157 2 BIT_VECTOR_EXCEPTION(code);
2158 }
2159 9 else BIT_VECTOR_OBJECT_ERROR;
2160 }
2161  
2162  
2163 void
2164 BitVector_Block_Store(reference,buffer)
2165 BitVector_Object reference
2166 BitVector_Scalar buffer
2167 CODE:
2168 {
2169 BitVector_Handle handle;
2170 BitVector_Address address;
2171 charptr string;
2172 N_int length;
2173  
2174 3770 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3770 0 3770
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3769 1 3770
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3769 0 3769
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3769 0 3769
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3768 1 3769
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3768 0 3768
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3768 0 3768
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3767 1 3768
2175 {
2176 7533 ▶ if ( BIT_VECTOR_BUFFER(buffer,string,length) )
Branch: 4 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_BUFFER(buffer,string,length) ) 3767 0 3767
if ( BIT_VECTOR_BUFFER(buffer,string,length) ) 3766 1 3767
if ( BIT_VECTOR_BUFFER(buffer,string,length) ) 3766 0 3766
if ( BIT_VECTOR_BUFFER(buffer,string,length) ) 3766 0 3766
2177 {
2178 3766 BitVector_Block_Store(address,string,length);
2179 }
2180 1 else BIT_VECTOR_STRING_ERROR;
2181 }
2182 3 else BIT_VECTOR_OBJECT_ERROR;
2183 }
2184  
2185  
2186 void
2187 BitVector_Block_Read(reference)
2188 BitVector_Object reference
2189 PPCODE:
2190 {
2191 BitVector_Handle handle;
2192 BitVector_Address address;
2193 charptr string;
2194 N_int length;
2195  
2196 3769 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3769 0 3769
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3768 1 3769
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3768 0 3768
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3768 0 3768
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3767 1 3768
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3767 0 3767
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3767 0 3767
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3766 1 3767
2197 {
2198 3766 string = BitVector_Block_Read(address,&length);
2199 3766 ▶ if (string != NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (string != NULL) 3766 0 3766
2200 {
2201 3766 ▶ EXTEND(sp,1);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(sp,1); 0 3766 3766
2202 3766 PUSHs(sv_2mortal(newSVpv((char *)string,length)));
2203 3766 BitVector_Dispose(string);
2204 }
2205 0 else BIT_VECTOR_MEMORY_ERROR;
2206 }
2207 3 else BIT_VECTOR_OBJECT_ERROR;
2208 }
2209  
2210  
2211 N_int
2212 BitVector_Word_Size(reference)
2213 BitVector_Object reference
2214 CODE:
2215 {
2216 BitVector_Handle handle;
2217 BitVector_Address address;
2218  
2219 103 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 103 0 103
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 102 1 103
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 102 0 102
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 102 0 102
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 101 1 102
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 101 0 101
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 101 0 101
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 100 1 101
2220 {
2221 100 ▶ RETVAL = BV_SIZE_(address);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = BV_SIZE_(address); 97 3 100
2222 }
2223 3 else BIT_VECTOR_OBJECT_ERROR;
2224 }
2225 OUTPUT:
2226 RETVAL
2227  
2228  
2229 void
2230 BitVector_Word_Store(reference,offset,value)
2231 BitVector_Object reference
2232 BitVector_Scalar offset
2233 BitVector_Scalar value
2234 CODE:
2235 {
2236 BitVector_Handle handle;
2237 BitVector_Address address;
2238 N_int off;
2239 N_int val;
2240  
2241 8 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 0 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 1 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 1 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 1 6
2242 {
2243 5 ▶ if ( BIT_VECTOR_SCALAR(offset,N_int,off) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5 0 5
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 4 1 5
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 4 0 4
2244 4 ▶ BIT_VECTOR_SCALAR(value,N_int,val) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(value,N_int,val) ) 3 1 4
2245 {
2246 3 ▶ if (off < BV_SIZE_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_SIZE_(address)) 1 2 3
2247 {
2248 1 BitVector_Word_Store(address,off,val);
2249 }
2250 2 else BIT_VECTOR_OFFSET_ERROR;
2251 }
2252 2 else BIT_VECTOR_SCALAR_ERROR;
2253 }
2254 3 else BIT_VECTOR_OBJECT_ERROR;
2255 }
2256  
2257  
2258 N_int
2259 BitVector_Word_Read(reference,offset)
2260 BitVector_Object reference
2261 BitVector_Scalar offset
2262 CODE:
2263 {
2264 BitVector_Handle handle;
2265 BitVector_Address address;
2266 N_int off;
2267  
2268 7 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 1 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 1 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 0 5
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 0 5
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 1 5
2269 {
2270 4 ▶ if ( BIT_VECTOR_SCALAR(offset,N_int,off) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(offset,N_int,off) ) 4 0 4
if ( BIT_VECTOR_SCALAR(offset,N_int,off) ) 3 1 4
2271 {
2272 3 ▶ if (off < BV_SIZE_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_SIZE_(address)) 1 2 3
2273 {
2274 1 RETVAL = BitVector_Word_Read(address,off);
2275 }
2276 2 else BIT_VECTOR_OFFSET_ERROR;
2277 }
2278 1 else BIT_VECTOR_SCALAR_ERROR;
2279 }
2280 3 else BIT_VECTOR_OBJECT_ERROR;
2281 }
2282 OUTPUT:
2283 RETVAL
2284  
2285  
2286 void
2287 BitVector_Word_List_Store(reference,...)
2288 BitVector_Object reference
2289 CODE:
2290 {
2291 BitVector_Handle handle;
2292 BitVector_Address address;
2293 BitVector_Scalar scalar;
2294 N_int offset;
2295 N_int value;
2296 N_int size;
2297 I32 index;
2298  
2299 9 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9 0 9
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 1 9
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 0 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 0 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 1 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 1 7
2300 {
2301 6 size = BV_SIZE_(address);
2302 6 for ( offset = 0, index = 1;
2303 21 ▶ ((offset < size) and (index < items)); offset++, index++ )
Branch: 2 branches
BranchTrueFalseTotal
((offset < size) and (index < items)); offset++, index++ ) 21 0 21
((offset < size) and (index < items)); offset++, index++ ) 20 1 21
2304 {
2305 20 scalar = ST(index);
2306 20 ▶ if ( BIT_VECTOR_SCALAR(scalar,N_int,value) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(scalar,N_int,value) ) 20 0 20
if ( BIT_VECTOR_SCALAR(scalar,N_int,value) ) 15 5 20
2307 {
2308 15 BitVector_Word_Store(address,offset,value);
2309 }
2310 5 else BIT_VECTOR_SCALAR_ERROR;
2311 }
2312 12 ▶ for ( ; (offset < size); offset++ )
Branch: 1 branch
BranchTrueFalseTotal
for ( ; (offset < size); offset++ ) 11 1 12
2313 {
2314 11 BitVector_Word_Store(address,offset,0);
2315 }
2316 }
2317 3 else BIT_VECTOR_OBJECT_ERROR;
2318 }
2319  
2320  
2321 void
2322 BitVector_Word_List_Read(reference)
2323 BitVector_Object reference
2324 PPCODE:
2325 {
2326 BitVector_Handle handle;
2327 BitVector_Address address;
2328 N_int offset;
2329 N_int value;
2330 N_int size;
2331  
2332 4 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 1 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 1 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1 1 2
2333 {
2334 1 size = BV_SIZE_(address);
2335 1 ▶ EXTEND(sp,(int)size);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(sp,(int)size); 1 0 1
EXTEND(sp,(int)size); 0 1 1
2336 17 ▶ for ( offset = 0; (offset < size); offset++ )
Branch: 1 branch
BranchTrueFalseTotal
for ( offset = 0; (offset < size); offset++ ) 16 1 17
2337 {
2338 16 value = BitVector_Word_Read(address,offset);
2339 16 PUSHs(sv_2mortal(newSViv((IV)value)));
2340 }
2341 }
2342 3 else BIT_VECTOR_OBJECT_ERROR;
2343 }
2344  
2345  
2346 void
2347 BitVector_Word_Insert(reference,offset,count)
2348 BitVector_Object reference
2349 BitVector_Scalar offset
2350 BitVector_Scalar count
2351 CODE:
2352 {
2353 BitVector_Handle handle;
2354 BitVector_Address address;
2355 N_int off;
2356 N_int cnt;
2357  
2358 8 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 0 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 1 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 1 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 1 6
2359 {
2360 5 ▶ if ( BIT_VECTOR_SCALAR(offset,N_int,off) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5 0 5
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 4 1 5
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 4 0 4
2361 4 ▶ BIT_VECTOR_SCALAR(count,N_int,cnt) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(count,N_int,cnt) ) 3 1 4
2362 {
2363 3 ▶ if (off < BV_SIZE_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_SIZE_(address)) 1 2 3
2364 {
2365 1 BitVector_Word_Insert(address,off,cnt,true);
2366 }
2367 2 else BIT_VECTOR_OFFSET_ERROR;
2368 }
2369 2 else BIT_VECTOR_SCALAR_ERROR;
2370 }
2371 3 else BIT_VECTOR_OBJECT_ERROR;
2372 }
2373  
2374  
2375 void
2376 BitVector_Word_Delete(reference,offset,count)
2377 BitVector_Object reference
2378 BitVector_Scalar offset
2379 BitVector_Scalar count
2380 CODE:
2381 {
2382 BitVector_Handle handle;
2383 BitVector_Address address;
2384 N_int off;
2385 N_int cnt;
2386  
2387 8 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 0 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 1 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 1 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 1 6
2388 {
2389 5 ▶ if ( BIT_VECTOR_SCALAR(offset,N_int,off) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 5 0 5
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 4 1 5
if ( BIT_VECTOR_SCALAR(offset,N_int,off) && 4 0 4
2390 4 ▶ BIT_VECTOR_SCALAR(count,N_int,cnt) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(count,N_int,cnt) ) 3 1 4
2391 {
2392 3 ▶ if (off < BV_SIZE_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_SIZE_(address)) 1 2 3
2393 {
2394 1 BitVector_Word_Delete(address,off,cnt,true);
2395 }
2396 2 else BIT_VECTOR_OFFSET_ERROR;
2397 }
2398 2 else BIT_VECTOR_SCALAR_ERROR;
2399 }
2400 3 else BIT_VECTOR_OBJECT_ERROR;
2401 }
2402  
2403  
2404 void
2405 BitVector_Chunk_Store(reference,chunksize,offset,value)
2406 BitVector_Object reference
2407 BitVector_Scalar chunksize
2408 BitVector_Scalar offset
2409 BitVector_Scalar value
2410 CODE:
2411 {
2412 BitVector_Handle handle;
2413 BitVector_Address address;
2414 N_int bits;
2415 N_int off;
2416 N_long val;
2417  
2418 19364 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19364 0 19364
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19363 1 19364
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19363 0 19363
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19363 0 19363
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19362 1 19363
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19362 0 19362
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19362 0 19362
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19361 1 19362
2419 {
2420 19361 ▶ if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) && 19361 0 19361
if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) && 19360 1 19361
if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) && 19360 0 19360
2421 19360 ▶ BIT_VECTOR_SCALAR(offset,N_int,off) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(offset,N_int,off) && 19359 1 19360
BIT_VECTOR_SCALAR(offset,N_int,off) && 19359 0 19359
2422 19359 ▶ BIT_VECTOR_SCALAR(value,N_long,val) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(value,N_long,val) ) 19358 1 19359
2423 {
2424 19358 ▶ if ((bits > 0) and (bits <= BitVector_Long_Bits()))
Branch: 2 branches
BranchTrueFalseTotal
if ((bits > 0) and (bits <= BitVector_Long_Bits())) 19357 1 19358
if ((bits > 0) and (bits <= BitVector_Long_Bits())) 19355 2 19357
2425 {
2426 19355 ▶ if (off < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_BITS_(address)) 19353 2 19355
2427 {
2428 19353 BitVector_Chunk_Store(address,bits,off,val);
2429 }
2430 2 else BIT_VECTOR_OFFSET_ERROR;
2431 }
2432 3 else BIT_VECTOR_CHUNK_ERROR;
2433 }
2434 3 else BIT_VECTOR_SCALAR_ERROR;
2435 }
2436 3 else BIT_VECTOR_OBJECT_ERROR;
2437 }
2438  
2439  
2440 N_long
2441 BitVector_Chunk_Read(reference,chunksize,offset)
2442 BitVector_Object reference
2443 BitVector_Scalar chunksize
2444 BitVector_Scalar offset
2445 CODE:
2446 {
2447 BitVector_Handle handle;
2448 BitVector_Address address;
2449 N_int bits;
2450 N_int off;
2451  
2452 19363 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19363 0 19363
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19362 1 19363
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19362 0 19362
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19362 0 19362
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19361 1 19362
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19361 0 19361
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19361 0 19361
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19360 1 19361
2453 {
2454 19360 ▶ if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) && 19360 0 19360
if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) && 19359 1 19360
if ( BIT_VECTOR_SCALAR(chunksize,N_int,bits) && 19359 0 19359
2455 19359 ▶ BIT_VECTOR_SCALAR(offset,N_int,off) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(offset,N_int,off) ) 19358 1 19359
2456 {
2457 19358 ▶ if ((bits > 0) and (bits <= BitVector_Long_Bits()))
Branch: 2 branches
BranchTrueFalseTotal
if ((bits > 0) and (bits <= BitVector_Long_Bits())) 19357 1 19358
if ((bits > 0) and (bits <= BitVector_Long_Bits())) 19355 2 19357
2458 {
2459 19355 ▶ if (off < BV_BITS_(address))
Branch: 1 branch
BranchTrueFalseTotal
if (off < BV_BITS_(address)) 19353 2 19355
2460 {
2461 19353 RETVAL = BitVector_Chunk_Read(address,bits,off);
2462 }
2463 2 else BIT_VECTOR_OFFSET_ERROR;
2464 }
2465 3 else BIT_VECTOR_CHUNK_ERROR;
2466 }
2467 2 else BIT_VECTOR_SCALAR_ERROR;
2468 }
2469 3 else BIT_VECTOR_OBJECT_ERROR;
2470 }
2471 OUTPUT:
2472 RETVAL
2473  
2474  
2475 void
2476 BitVector_Chunk_List_Store(reference,chunksize,...)
2477 BitVector_Object reference
2478 BitVector_Scalar chunksize
2479 CODE:
2480 {
2481 BitVector_Handle handle;
2482 BitVector_Address address;
2483 BitVector_Scalar scalar;
2484 N_int chunkspan;
2485 N_long chunkmask;
2486 N_long mask;
2487 N_long chunk;
2488 N_long value;
2489 N_int chunkbits;
2490 N_int wordbits;
2491 N_int wordsize;
2492 N_int offset;
2493 N_int size;
2494 N_int bits;
2495 I32 index;
2496  
2497 449 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 449 0 449
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 448 1 449
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 448 0 448
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 448 0 448
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 447 1 448
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 447 0 447
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 447 0 447
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 446 1 447
2498 {
2499 446 ▶ if ( BIT_VECTOR_SCALAR(chunksize,N_int,chunkspan) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(chunksize,N_int,chunkspan) ) 446 0 446
if ( BIT_VECTOR_SCALAR(chunksize,N_int,chunkspan) ) 445 1 446
2500 {
2501 445 ▶ if ((chunkspan > 0) and (chunkspan <= BitVector_Long_Bits()))
Branch: 2 branches
BranchTrueFalseTotal
if ((chunkspan > 0) and (chunkspan <= BitVector_Long_Bits())) 444 1 445
if ((chunkspan > 0) and (chunkspan <= BitVector_Long_Bits())) 442 2 444
2502 {
2503 442 wordsize = BitVector_Word_Bits();
2504 442 size = BV_SIZE_(address);
2505 442 chunkmask = ~((~0L << (chunkspan-1)) << 1); /* C bug work-around */
2506 442 chunk = 0L;
2507 442 value = 0L;
2508 442 index = 2;
2509 442 offset = 0;
2510 442 wordbits = 0;
2511 442 chunkbits = 0;
2512 47470 ▶ while (offset < size)
Branch: 1 branch
BranchTrueFalseTotal
while (offset < size) 47033 437 47470
2513 {
2514 47033 ▶ if ((chunkbits == 0) and (index < items))
Branch: 2 branches
BranchTrueFalseTotal
if ((chunkbits == 0) and (index < items)) 43123 3910 47033
if ((chunkbits == 0) and (index < items)) 43112 11 43123
2515 {
2516 43112 scalar = ST(index);
2517 43112 ▶ if ( BIT_VECTOR_SCALAR(scalar,N_long,chunk) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(scalar,N_long,chunk) ) 43112 0 43112
if ( BIT_VECTOR_SCALAR(scalar,N_long,chunk) ) 43107 5 43112
2518 {
2519 43107 chunk &= chunkmask;
2520 43107 chunkbits = chunkspan;
2521 43107 index++;
2522 }
2523 5 else BIT_VECTOR_SCALAR_ERROR;
2524 }
2525 47028 bits = wordsize - wordbits;
2526 47028 ▶ if (chunkbits <= bits)
Branch: 1 branch
BranchTrueFalseTotal
if (chunkbits <= bits) 42940 4088 47028
2527 {
2528 42940 chunk <<= wordbits;
2529 42940 value |= chunk;
2530 42940 wordbits += chunkbits;
2531 42940 chunk = 0L;
2532 42940 chunkbits = 0;
2533 }
2534 else
2535 {
2536 4088 mask = ~(~0L << bits);
2537 4088 mask &= chunk;
2538 4088 mask <<= wordbits;
2539 4088 value |= mask;
2540 4088 wordbits += bits;
2541 4088 chunk >>= bits;
2542 4088 chunkbits -= bits;
2543 }
2544 47028 ▶ if ((wordbits >= wordsize) or (index >= items))
Branch: 2 branches
BranchTrueFalseTotal
if ((wordbits >= wordsize) or (index >= items)) 41965 5063 47028
if ((wordbits >= wordsize) or (index >= items)) 257 41708 41965
2545 {
2546 5320 BitVector_Word_Store(address,offset,(N_int)value);
2547 5320 value = 0L;
2548 5320 wordbits = 0;
2549 5320 offset++;
2550 }
2551 }
2552 }
2553 3 else BIT_VECTOR_CHUNK_ERROR;
2554 }
2555 1 else BIT_VECTOR_SCALAR_ERROR;
2556 }
2557 3 else BIT_VECTOR_OBJECT_ERROR;
2558 }
2559  
2560  
2561 void
2562 BitVector_Chunk_List_Read(reference,chunksize)
2563 BitVector_Object reference
2564 BitVector_Scalar chunksize
2565 PPCODE:
2566 {
2567 BitVector_Handle handle;
2568 BitVector_Address address;
2569 N_int chunkspan;
2570 N_long chunk;
2571 N_long value;
2572 N_long mask;
2573 N_int chunkbits;
2574 N_int wordbits;
2575 N_int wordsize;
2576 N_int length;
2577 N_int index;
2578 N_int offset;
2579 N_int size;
2580 N_int bits;
2581  
2582 453 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 453 0 453
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 452 1 453
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 452 0 452
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 452 0 452
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 451 1 452
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 451 0 451
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 451 0 451
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 450 1 451
2583 {
2584 450 ▶ if ( BIT_VECTOR_SCALAR(chunksize,N_int,chunkspan) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(chunksize,N_int,chunkspan) ) 450 0 450
if ( BIT_VECTOR_SCALAR(chunksize,N_int,chunkspan) ) 449 1 450
2585 {
2586 449 ▶ if ((chunkspan > 0) and (chunkspan <= BitVector_Long_Bits()))
Branch: 2 branches
BranchTrueFalseTotal
if ((chunkspan > 0) and (chunkspan <= BitVector_Long_Bits())) 448 1 449
if ((chunkspan > 0) and (chunkspan <= BitVector_Long_Bits())) 446 2 448
2587 {
2588 446 wordsize = BitVector_Word_Bits();
2589 446 bits = BV_BITS_(address);
2590 446 size = BV_SIZE_(address);
2591 446 length = (N_int) (bits / chunkspan);
2592 446 ▶ if ((length * chunkspan) < bits) length++;
Branch: 1 branch
BranchTrueFalseTotal
if ((length * chunkspan) < bits) length++; 378 68 446
2593 446 ▶ EXTEND(sp,(int)length);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(sp,(int)length); 446 0 446
EXTEND(sp,(int)length); 0 446 446
2594 446 chunk = 0L;
2595 446 value = 0L;
2596 446 index = 0;
2597 446 offset = 0;
2598 446 wordbits = 0;
2599 446 chunkbits = 0;
2600 48668 ▶ while (index < length)
Branch: 1 branch
BranchTrueFalseTotal
while (index < length) 48222 446 48668
2601 {
2602 48222 ▶ if ((wordbits == 0) and (offset < size))
Branch: 2 branches
BranchTrueFalseTotal
if ((wordbits == 0) and (offset < size)) 5351 42871 48222
if ((wordbits == 0) and (offset < size)) 5351 0 5351
2603 {
2604 5351 value = (N_long) BitVector_Word_Read(address,offset);
2605 5351 wordbits = wordsize;
2606 5351 offset++;
2607 }
2608 48222 bits = chunkspan - chunkbits;
2609 48222 ▶ if (wordbits <= bits)
Branch: 1 branch
BranchTrueFalseTotal
if (wordbits <= bits) 5117 43105 48222
2610 {
2611 5117 value <<= chunkbits;
2612 5117 chunk |= value;
2613 5117 chunkbits += wordbits;
2614 5117 value = 0L;
2615 5117 wordbits = 0;
2616 }
2617 else
2618 {
2619 43105 mask = ~(~0L << bits);
2620 43105 mask &= value;
2621 43105 mask <<= chunkbits;
2622 43105 chunk |= mask;
2623 43105 chunkbits += bits;
2624 43105 value >>= bits;
2625 43105 wordbits -= bits;
2626 }
2627 48222 ▶ if ((chunkbits >= chunkspan) or
Branch: 2 branches
BranchTrueFalseTotal
if ((chunkbits >= chunkspan) or 4126 44096 48222
if ((chunkbits >= chunkspan) or 199 3927 4126
2628 199 ▶ ((offset >= size) and (chunkbits > 0)))
Branch: 1 branch
BranchTrueFalseTotal
((offset >= size) and (chunkbits > 0))) 199 0 199
2629 {
2630 44295 PUSHs(sv_2mortal(newSViv((IV)chunk)));
2631 44295 chunk = 0L;
2632 44295 chunkbits = 0;
2633 44295 index++;
2634 }
2635 }
2636 }
2637 3 else BIT_VECTOR_CHUNK_ERROR;
2638 }
2639 1 else BIT_VECTOR_SCALAR_ERROR;
2640 }
2641 3 else BIT_VECTOR_OBJECT_ERROR;
2642 }
2643  
2644  
2645 void
2646 BitVector_Index_List_Remove(reference,...)
2647 BitVector_Object reference
2648 CODE:
2649 {
2650 BitVector_Handle handle;
2651 BitVector_Address address;
2652 BitVector_Scalar scalar;
2653 N_int value;
2654 N_int bits;
2655 I32 index;
2656  
2657 19 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19 0 19
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 18 1 19
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 18 0 18
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 18 0 18
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17 1 18
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17 0 17
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17 0 17
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 16 1 17
2658 {
2659 16 bits = BV_BITS_(address);
2660 51 ▶ for ( index = 1; index < items; index++ )
Branch: 1 branch
BranchTrueFalseTotal
for ( index = 1; index < items; index++ ) 50 1 51
2661 {
2662 50 scalar = ST(index);
2663 50 ▶ if ( BIT_VECTOR_SCALAR(scalar,N_int,value) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(scalar,N_int,value) ) 50 0 50
if ( BIT_VECTOR_SCALAR(scalar,N_int,value) ) 45 5 50
2664 {
2665 45 ▶ if (value < bits)
Branch: 1 branch
BranchTrueFalseTotal
if (value < bits) 35 10 45
2666 {
2667 35 BitVector_Bit_Off(address,value);
2668 }
2669 10 else BIT_VECTOR_INDEX_ERROR;
2670 }
2671 5 else BIT_VECTOR_SCALAR_ERROR;
2672 }
2673 }
2674 3 else BIT_VECTOR_OBJECT_ERROR;
2675 }
2676  
2677  
2678 void
2679 BitVector_Index_List_Store(reference,...)
2680 BitVector_Object reference
2681 CODE:
2682 {
2683 BitVector_Handle handle;
2684 BitVector_Address address;
2685 BitVector_Scalar scalar;
2686 N_int value;
2687 N_int bits;
2688 I32 index;
2689  
2690 19 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 19 0 19
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 18 1 19
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 18 0 18
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 18 0 18
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17 1 18
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17 0 17
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 17 0 17
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 16 1 17
2691 {
2692 16 bits = BV_BITS_(address);
2693 51 ▶ for ( index = 1; index < items; index++ )
Branch: 1 branch
BranchTrueFalseTotal
for ( index = 1; index < items; index++ ) 50 1 51
2694 {
2695 50 scalar = ST(index);
2696 50 ▶ if ( BIT_VECTOR_SCALAR(scalar,N_int,value) )
Branch: 2 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(scalar,N_int,value) ) 50 0 50
if ( BIT_VECTOR_SCALAR(scalar,N_int,value) ) 45 5 50
2697 {
2698 45 ▶ if (value < bits)
Branch: 1 branch
BranchTrueFalseTotal
if (value < bits) 35 10 45
2699 {
2700 35 BitVector_Bit_On(address,value);
2701 }
2702 10 else BIT_VECTOR_INDEX_ERROR;
2703 }
2704 5 else BIT_VECTOR_SCALAR_ERROR;
2705 }
2706 }
2707 3 else BIT_VECTOR_OBJECT_ERROR;
2708 }
2709  
2710  
2711 void
2712 BitVector_Index_List_Read(reference)
2713 BitVector_Object reference
2714 PPCODE:
2715 {
2716 BitVector_Handle handle;
2717 BitVector_Address address;
2718 N_int size;
2719 N_int bits;
2720 N_int norm;
2721 N_int base;
2722 N_int word;
2723 N_int index;
2724 N_int value;
2725  
2726 4 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 4 0 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 1 4
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 3 0 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 1 3
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 2 0 2
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 1 1 2
2727 {
2728 1 size = BV_SIZE_(address);
2729 1 bits = BitVector_Word_Bits();
2730 1 norm = Set_Norm(address);
2731 1 ▶ if (norm > 0)
Branch: 1 branch
BranchTrueFalseTotal
if (norm > 0) 1 0 1
2732 {
2733 1 ▶ EXTEND(sp,(int)norm);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(sp,(int)norm); 1 0 1
EXTEND(sp,(int)norm); 0 1 1
2734 17 ▶ for ( base = word = 0; word < size; word++, base += bits )
Branch: 1 branch
BranchTrueFalseTotal
for ( base = word = 0; word < size; word++, base += bits ) 16 1 17
2735 {
2736 16 index = base;
2737 16 value = BitVector_Word_Read(address,word);
2738 17 ▶ while (value)
Branch: 1 branch
BranchTrueFalseTotal
while (value) 1 16 17
2739 {
2740 1 ▶ if (value AND 0x0001)
Branch: 1 branch
BranchTrueFalseTotal
if (value AND 0x0001) 1 0 1
2741 1 PUSHs(sv_2mortal(newSViv((IV)index)));
2742 1 value >>= 1;
2743 1 index++;
2744 }
2745 }
2746 }
2747 }
2748 3 else BIT_VECTOR_OBJECT_ERROR;
2749 }
2750  
2751  
2752 MODULE = Bit::Vector PACKAGE = Bit::Vector PREFIX = Set_
2753  
2754  
2755 void
2756 Set_Union(Xref,Yref,Zref)
2757 BitVector_Object Xref
2758 BitVector_Object Yref
2759 BitVector_Object Zref
2760 ALIAS:
2761 Or = 1
2762 CODE:
2763 {
2764 BitVector_Handle Xhdl;
2765 BitVector_Address Xadr;
2766 BitVector_Handle Yhdl;
2767 BitVector_Address Yadr;
2768 BitVector_Handle Zhdl;
2769 BitVector_Address Zadr;
2770  
2771 1071 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1071 0 1071
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1070 1 1071
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1070 0 1070
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1070 0 1070
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1069 1 1070
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1069 0 1069
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1069 0 1069
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1068 1 1069
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1068 0 1068
2772 1068 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1067 1 1068
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1067 0 1067
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1067 0 1067
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1066 1 1067
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1066 0 1066
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1066 0 1066
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1065 1 1066
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1065 0 1065
2773 1065 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1064 1 1065
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1064 0 1064
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1064 0 1064
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1063 1 1064
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1063 0 1063
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1063 0 1063
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1062 1 1063
2774 {
2775 1062 ▶ if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 1060 2 1062
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 1059 1 1060
2776 {
2777 1059 Set_Union(Xadr,Yadr,Zadr);
2778 }
2779 3 else BIT_VECTOR_SET_ERROR;
2780 }
2781 9 else BIT_VECTOR_OBJECT_ERROR;
2782 }
2783  
2784  
2785 void
2786 Set_Intersection(Xref,Yref,Zref)
2787 BitVector_Object Xref
2788 BitVector_Object Yref
2789 BitVector_Object Zref
2790 ALIAS:
2791 And = 1
2792 CODE:
2793 {
2794 BitVector_Handle Xhdl;
2795 BitVector_Address Xadr;
2796 BitVector_Handle Yhdl;
2797 BitVector_Address Yadr;
2798 BitVector_Handle Zhdl;
2799 BitVector_Address Zadr;
2800  
2801 65 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 65 0 65
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 64 1 65
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 64 0 64
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 64 0 64
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 63 1 64
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 63 0 63
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 63 0 63
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 62 1 63
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 62 0 62
2802 62 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 61 1 62
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 61 0 61
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 61 0 61
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 60 1 61
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 60 0 60
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 60 0 60
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 59 1 60
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 59 0 59
2803 59 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 58 1 59
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 58 0 58
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 58 0 58
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 57 1 58
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 57 0 57
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 57 0 57
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 56 1 57
2804 {
2805 56 ▶ if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 54 2 56
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 53 1 54
2806 {
2807 53 Set_Intersection(Xadr,Yadr,Zadr);
2808 }
2809 3 else BIT_VECTOR_SET_ERROR;
2810 }
2811 9 else BIT_VECTOR_OBJECT_ERROR;
2812 }
2813  
2814  
2815 void
2816 Set_Difference(Xref,Yref,Zref)
2817 BitVector_Object Xref
2818 BitVector_Object Yref
2819 BitVector_Object Zref
2820 ALIAS:
2821 AndNot = 1
2822 CODE:
2823 {
2824 BitVector_Handle Xhdl;
2825 BitVector_Address Xadr;
2826 BitVector_Handle Yhdl;
2827 BitVector_Address Yadr;
2828 BitVector_Handle Zhdl;
2829 BitVector_Address Zadr;
2830  
2831 1684 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1684 0 1684
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1683 1 1684
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1683 0 1683
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1683 0 1683
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1682 1 1683
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1682 0 1682
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1682 0 1682
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1681 1 1682
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 1681 0 1681
2832 1681 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1680 1 1681
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1680 0 1680
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1680 0 1680
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1679 1 1680
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1679 0 1679
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1679 0 1679
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1678 1 1679
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 1678 0 1678
2833 1678 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1677 1 1678
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1677 0 1677
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1677 0 1677
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1676 1 1677
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1676 0 1676
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1676 0 1676
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 1675 1 1676
2834 {
2835 1675 ▶ if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 1673 2 1675
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 1672 1 1673
2836 {
2837 1672 Set_Difference(Xadr,Yadr,Zadr);
2838 }
2839 3 else BIT_VECTOR_SET_ERROR;
2840 }
2841 9 else BIT_VECTOR_OBJECT_ERROR;
2842 }
2843  
2844  
2845 void
2846 Set_ExclusiveOr(Xref,Yref,Zref)
2847 BitVector_Object Xref
2848 BitVector_Object Yref
2849 BitVector_Object Zref
2850 ALIAS:
2851 Xor = 1
2852 CODE:
2853 {
2854 BitVector_Handle Xhdl;
2855 BitVector_Address Xadr;
2856 BitVector_Handle Yhdl;
2857 BitVector_Address Yadr;
2858 BitVector_Handle Zhdl;
2859 BitVector_Address Zadr;
2860  
2861 61 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 61 0 61
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 60 1 61
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 60 0 60
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 60 0 60
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 59 1 60
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 59 0 59
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 59 0 59
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 58 1 59
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 58 0 58
2862 58 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 57 1 58
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 57 0 57
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 57 0 57
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 56 1 57
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 56 0 56
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 56 0 56
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 55 1 56
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 55 0 55
2863 55 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 54 1 55
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 54 0 54
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 54 0 54
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 53 1 54
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 53 0 53
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 53 0 53
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 52 1 53
2864 {
2865 52 ▶ if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr)))
Branch: 2 branches
BranchTrueFalseTotal
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 50 2 52
if ((BV_BITS_(Xadr) == BV_BITS_(Yadr)) and (BV_BITS_(Xadr) == BV_BITS_(Zadr))) 49 1 50
2866 {
2867 49 Set_ExclusiveOr(Xadr,Yadr,Zadr);
2868 }
2869 3 else BIT_VECTOR_SET_ERROR;
2870 }
2871 9 else BIT_VECTOR_OBJECT_ERROR;
2872 }
2873  
2874  
2875 void
2876 Set_Complement(Xref,Yref)
2877 BitVector_Object Xref
2878 BitVector_Object Yref
2879 ALIAS:
2880 Not = 1
2881 CODE:
2882 {
2883 BitVector_Handle Xhdl;
2884 BitVector_Address Xadr;
2885 BitVector_Handle Yhdl;
2886 BitVector_Address Yadr;
2887  
2888 28 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 28 0 28
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 27 1 28
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 27 0 27
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 27 0 27
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 26 1 27
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 26 0 26
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 26 0 26
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 1 26
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 0 25
2889 25 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 24 1 25
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 24 0 24
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 24 0 24
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23 1 24
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23 0 23
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 23 0 23
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 22 1 23
2890 {
2891 22 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 20 2 22
2892 {
2893 20 Set_Complement(Xadr,Yadr);
2894 }
2895 2 else BIT_VECTOR_SET_ERROR;
2896 }
2897 6 else BIT_VECTOR_OBJECT_ERROR;
2898 }
2899  
2900  
2901 boolean
2902 Set_subset(Xref,Yref)
2903 BitVector_Object Xref
2904 BitVector_Object Yref
2905 ALIAS:
2906 inclusion = 2
2907 CODE:
2908 {
2909 BitVector_Handle Xhdl;
2910 BitVector_Address Xadr;
2911 BitVector_Handle Yhdl;
2912 BitVector_Address Yadr;
2913  
2914 5527 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5527 0 5527
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5526 1 5527
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5526 0 5526
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5526 0 5526
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5525 1 5526
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5525 0 5525
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5525 0 5525
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5524 1 5525
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 5524 0 5524
2915 5524 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5523 1 5524
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5523 0 5523
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5523 0 5523
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5522 1 5523
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5522 0 5522
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5522 0 5522
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 5521 1 5522
2916 {
2917 5521 ▶ if (BV_BITS_(Xadr) == BV_BITS_(Yadr))
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(Xadr) == BV_BITS_(Yadr)) 5519 2 5521
2918 {
2919 5519 RETVAL = Set_subset(Xadr,Yadr);
2920 }
2921 2 else BIT_VECTOR_SET_ERROR;
2922 }
2923 6 else BIT_VECTOR_OBJECT_ERROR;
2924 }
2925 OUTPUT:
2926 RETVAL
2927  
2928  
2929 N_int
2930 Set_Norm(reference)
2931 BitVector_Object reference
2932 CODE:
2933 {
2934 BitVector_Handle handle;
2935 BitVector_Address address;
2936  
2937 9000 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 9000 0 9000
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8999 1 9000
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8999 0 8999
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8999 0 8999
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8998 1 8999
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8998 0 8998
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8998 0 8998
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8997 1 8998
2938 {
2939 8997 RETVAL = Set_Norm(address);
2940 }
2941 3 else BIT_VECTOR_OBJECT_ERROR;
2942 }
2943 OUTPUT:
2944 RETVAL
2945  
2946  
2947 N_int
2948 Set_Norm2(reference)
2949 BitVector_Object reference
2950 CODE:
2951 {
2952 BitVector_Handle handle;
2953 BitVector_Address address;
2954  
2955 0 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
2956 {
2957 0 RETVAL = Set_Norm2(address);
2958 }
2959 0 else BIT_VECTOR_OBJECT_ERROR;
2960 }
2961 OUTPUT:
2962 RETVAL
2963  
2964  
2965 N_int
2966 Set_Norm3(reference)
2967 BitVector_Object reference
2968 CODE:
2969 {
2970 BitVector_Handle handle;
2971 BitVector_Address address;
2972  
2973 0 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 0 0 0
2974 {
2975 0 RETVAL = Set_Norm3(address);
2976 }
2977 0 else BIT_VECTOR_OBJECT_ERROR;
2978 }
2979 OUTPUT:
2980 RETVAL
2981  
2982  
2983 Z_long
2984 Set_Min(reference)
2985 BitVector_Object reference
2986 CODE:
2987 {
2988 BitVector_Handle handle;
2989 BitVector_Address address;
2990  
2991 763 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 763 0 763
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 762 1 763
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 762 0 762
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 762 0 762
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 761 1 762
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 761 0 761
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 761 0 761
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 760 1 761
2992 {
2993 760 RETVAL = Set_Min(address);
2994 }
2995 3 else BIT_VECTOR_OBJECT_ERROR;
2996 }
2997 OUTPUT:
2998 RETVAL
2999  
3000  
3001 Z_long
3002 Set_Max(reference)
3003 BitVector_Object reference
3004 CODE:
3005 {
3006 BitVector_Handle handle;
3007 BitVector_Address address;
3008  
3009 763 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 763 0 763
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 762 1 763
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 762 0 762
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 762 0 762
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 761 1 762
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 761 0 761
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 761 0 761
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 760 1 761
3010 {
3011 760 RETVAL = Set_Max(address);
3012 }
3013 3 else BIT_VECTOR_OBJECT_ERROR;
3014 }
3015 OUTPUT:
3016 RETVAL
3017  
3018  
3019 MODULE = Bit::Vector PACKAGE = Bit::Vector PREFIX = Matrix_
3020  
3021  
3022 void
3023 Matrix_Multiplication(Xref,Xrows,Xcols,Yref,Yrows,Ycols,Zref,Zrows,Zcols)
3024 BitVector_Object Xref
3025 BitVector_Scalar Xrows
3026 BitVector_Scalar Xcols
3027 BitVector_Object Yref
3028 BitVector_Scalar Yrows
3029 BitVector_Scalar Ycols
3030 BitVector_Object Zref
3031 BitVector_Scalar Zrows
3032 BitVector_Scalar Zcols
3033 CODE:
3034 {
3035 BitVector_Handle Xhdl;
3036 BitVector_Address Xadr;
3037 BitVector_Handle Yhdl;
3038 BitVector_Address Yadr;
3039 BitVector_Handle Zhdl;
3040 BitVector_Address Zadr;
3041 N_int rowsX;
3042 N_int colsX;
3043 N_int rowsY;
3044 N_int colsY;
3045 N_int rowsZ;
3046 N_int colsZ;
3047  
3048 26 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 26 0 26
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 1 26
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 0 25
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 0 25
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 24 1 25
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 24 0 24
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 24 0 24
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23 1 24
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23 0 23
3049 23 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 22 1 23
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 22 0 22
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 22 0 22
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 21 1 22
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 21 0 21
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 21 0 21
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 20 1 21
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 20 0 20
3050 20 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 19 1 20
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 19 0 19
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 19 0 19
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 18 1 19
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 18 0 18
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 18 0 18
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 17 1 18
3051 {
3052 17 ▶ if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 17 0 17
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 16 1 17
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 16 0 16
3053 16 ▶ BIT_VECTOR_SCALAR(Xcols,N_int,colsX) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Xcols,N_int,colsX) && 15 1 16
BIT_VECTOR_SCALAR(Xcols,N_int,colsX) && 15 0 15
3054 15 ▶ BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) && 14 1 15
BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) && 14 0 14
3055 14 ▶ BIT_VECTOR_SCALAR(Ycols,N_int,colsY) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Ycols,N_int,colsY) && 13 1 14
BIT_VECTOR_SCALAR(Ycols,N_int,colsY) && 13 0 13
3056 13 ▶ BIT_VECTOR_SCALAR(Zrows,N_int,rowsZ) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Zrows,N_int,rowsZ) && 12 1 13
BIT_VECTOR_SCALAR(Zrows,N_int,rowsZ) && 12 0 12
3057 12 ▶ BIT_VECTOR_SCALAR(Zcols,N_int,colsZ) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Zcols,N_int,colsZ) ) 11 1 12
3058 {
3059 11 ▶ if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and
Branch: 3 branches
BranchTrueFalseTotal
if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and 9 2 11
if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and 7 2 9
if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and 5 2 7
3060 5 ▶ (BV_BITS_(Xadr) == rowsX*colsX) and
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Xadr) == rowsX*colsX) and 4 1 5
3061 4 ▶ (BV_BITS_(Yadr) == rowsY*colsY) and
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Yadr) == rowsY*colsY) and 3 1 4
3062 3 ▶ (BV_BITS_(Zadr) == rowsZ*colsZ))
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Zadr) == rowsZ*colsZ)) 2 1 3
3063 {
3064 2 Matrix_Multiplication(Xadr,rowsX,colsX,
3065 Yadr,rowsY,colsY,
3066 Zadr,rowsZ,colsZ);
3067 }
3068 9 else BIT_VECTOR_MATRIX_ERROR;
3069 }
3070 6 else BIT_VECTOR_SCALAR_ERROR;
3071 }
3072 9 else BIT_VECTOR_OBJECT_ERROR;
3073 }
3074  
3075  
3076 void
3077 Matrix_Product(Xref,Xrows,Xcols,Yref,Yrows,Ycols,Zref,Zrows,Zcols)
3078 BitVector_Object Xref
3079 BitVector_Scalar Xrows
3080 BitVector_Scalar Xcols
3081 BitVector_Object Yref
3082 BitVector_Scalar Yrows
3083 BitVector_Scalar Ycols
3084 BitVector_Object Zref
3085 BitVector_Scalar Zrows
3086 BitVector_Scalar Zcols
3087 CODE:
3088 {
3089 BitVector_Handle Xhdl;
3090 BitVector_Address Xadr;
3091 BitVector_Handle Yhdl;
3092 BitVector_Address Yadr;
3093 BitVector_Handle Zhdl;
3094 BitVector_Address Zadr;
3095 N_int rowsX;
3096 N_int colsX;
3097 N_int rowsY;
3098 N_int colsY;
3099 N_int rowsZ;
3100 N_int colsZ;
3101  
3102 26 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 26 0 26
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 1 26
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 0 25
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 25 0 25
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 24 1 25
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 24 0 24
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 24 0 24
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23 1 24
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 23 0 23
3103 23 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) &&
Branch: 8 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 22 1 23
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 22 0 22
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 22 0 22
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 21 1 22
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 21 0 21
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 21 0 21
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 20 1 21
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) && 20 0 20
3104 20 ▶ BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 19 1 20
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 19 0 19
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 19 0 19
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 18 1 19
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 18 0 18
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 18 0 18
BIT_VECTOR_OBJECT(Zref,Zhdl,Zadr) ) 17 1 18
3105 {
3106 17 ▶ if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 17 0 17
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 16 1 17
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 16 0 16
3107 16 ▶ BIT_VECTOR_SCALAR(Xcols,N_int,colsX) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Xcols,N_int,colsX) && 15 1 16
BIT_VECTOR_SCALAR(Xcols,N_int,colsX) && 15 0 15
3108 15 ▶ BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) && 14 1 15
BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) && 14 0 14
3109 14 ▶ BIT_VECTOR_SCALAR(Ycols,N_int,colsY) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Ycols,N_int,colsY) && 13 1 14
BIT_VECTOR_SCALAR(Ycols,N_int,colsY) && 13 0 13
3110 13 ▶ BIT_VECTOR_SCALAR(Zrows,N_int,rowsZ) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Zrows,N_int,rowsZ) && 12 1 13
BIT_VECTOR_SCALAR(Zrows,N_int,rowsZ) && 12 0 12
3111 12 ▶ BIT_VECTOR_SCALAR(Zcols,N_int,colsZ) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Zcols,N_int,colsZ) ) 11 1 12
3112 {
3113 11 ▶ if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and
Branch: 3 branches
BranchTrueFalseTotal
if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and 9 2 11
if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and 7 2 9
if ((colsY == rowsZ) and (rowsX == rowsY) and (colsX == colsZ) and 5 2 7
3114 5 ▶ (BV_BITS_(Xadr) == rowsX*colsX) and
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Xadr) == rowsX*colsX) and 4 1 5
3115 4 ▶ (BV_BITS_(Yadr) == rowsY*colsY) and
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Yadr) == rowsY*colsY) and 3 1 4
3116 3 ▶ (BV_BITS_(Zadr) == rowsZ*colsZ))
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Zadr) == rowsZ*colsZ)) 2 1 3
3117 {
3118 2 Matrix_Product(Xadr,rowsX,colsX,
3119 Yadr,rowsY,colsY,
3120 Zadr,rowsZ,colsZ);
3121 }
3122 9 else BIT_VECTOR_MATRIX_ERROR;
3123 }
3124 6 else BIT_VECTOR_SCALAR_ERROR;
3125 }
3126 9 else BIT_VECTOR_OBJECT_ERROR;
3127 }
3128  
3129  
3130 void
3131 Matrix_Closure(reference,rows,cols)
3132 BitVector_Object reference
3133 BitVector_Scalar rows
3134 BitVector_Scalar cols
3135 CODE:
3136 {
3137 BitVector_Handle handle;
3138 BitVector_Address address;
3139 N_int r;
3140 N_int c;
3141  
3142 8 ▶ if ( BIT_VECTOR_OBJECT(reference,handle,address) )
Branch: 8 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 8 0 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 1 8
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 7 0 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 1 7
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 6 0 6
if ( BIT_VECTOR_OBJECT(reference,handle,address) ) 5 1 6
3143 {
3144 5 ▶ if ( BIT_VECTOR_SCALAR(rows,N_int,r) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(rows,N_int,r) && 5 0 5
if ( BIT_VECTOR_SCALAR(rows,N_int,r) && 4 1 5
if ( BIT_VECTOR_SCALAR(rows,N_int,r) && 4 0 4
3145 4 ▶ BIT_VECTOR_SCALAR(cols,N_int,c) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(cols,N_int,c) ) 3 1 4
3146 {
3147 3 ▶ if (BV_BITS_(address) == r*c)
Branch: 1 branch
BranchTrueFalseTotal
if (BV_BITS_(address) == r*c) 1 2 3
3148 {
3149 1 ▶ if (r == c)
Branch: 1 branch
BranchTrueFalseTotal
if (r == c) 1 0 1
3150 {
3151 1 Matrix_Closure(address,r,c);
3152 }
3153 0 else BIT_VECTOR_SHAPE_ERROR;
3154 }
3155 2 else BIT_VECTOR_MATRIX_ERROR;
3156 }
3157 2 else BIT_VECTOR_SCALAR_ERROR;
3158 }
3159 3 else BIT_VECTOR_OBJECT_ERROR;
3160 }
3161  
3162  
3163 void
3164 Matrix_Transpose(Xref,Xrows,Xcols,Yref,Yrows,Ycols)
3165 BitVector_Object Xref
3166 BitVector_Scalar Xrows
3167 BitVector_Scalar Xcols
3168 BitVector_Object Yref
3169 BitVector_Scalar Yrows
3170 BitVector_Scalar Ycols
3171 CODE:
3172 {
3173 BitVector_Handle Xhdl;
3174 BitVector_Address Xadr;
3175 BitVector_Handle Yhdl;
3176 BitVector_Address Yadr;
3177 N_int rowsX;
3178 N_int colsX;
3179 N_int rowsY;
3180 N_int colsY;
3181  
3182 18 ▶ if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) &&
Branch: 9 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 18 0 18
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 17 1 18
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 17 0 17
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 17 0 17
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 16 1 17
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 16 0 16
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 16 0 16
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 15 1 16
if ( BIT_VECTOR_OBJECT(Xref,Xhdl,Xadr) && 15 0 15
3183 15 ▶ BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) )
Branch: 7 branches
BranchTrueFalseTotal
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 14 1 15
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 14 0 14
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 14 0 14
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 13 1 14
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 13 0 13
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 13 0 13
BIT_VECTOR_OBJECT(Yref,Yhdl,Yadr) ) 12 1 13
3184 {
3185 12 ▶ if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) &&
Branch: 3 branches
BranchTrueFalseTotal
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 12 0 12
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 11 1 12
if ( BIT_VECTOR_SCALAR(Xrows,N_int,rowsX) && 11 0 11
3186 11 ▶ BIT_VECTOR_SCALAR(Xcols,N_int,colsX) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Xcols,N_int,colsX) && 10 1 11
BIT_VECTOR_SCALAR(Xcols,N_int,colsX) && 10 0 10
3187 10 ▶ BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) &&
Branch: 2 branches
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) && 9 1 10
BIT_VECTOR_SCALAR(Yrows,N_int,rowsY) && 9 0 9
3188 9 ▶ BIT_VECTOR_SCALAR(Ycols,N_int,colsY) )
Branch: 1 branch
BranchTrueFalseTotal
BIT_VECTOR_SCALAR(Ycols,N_int,colsY) ) 8 1 9
3189 {
3190 8 ▶ if ((rowsX == colsY) and (colsX == rowsY) and
Branch: 2 branches
BranchTrueFalseTotal
if ((rowsX == colsY) and (colsX == rowsY) and 6 2 8
if ((rowsX == colsY) and (colsX == rowsY) and 4 2 6
3191 4 ▶ (BV_BITS_(Xadr) == rowsX*colsX) and
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Xadr) == rowsX*colsX) and 3 1 4
3192 3 ▶ (BV_BITS_(Yadr) == rowsY*colsY))
Branch: 1 branch
BranchTrueFalseTotal
(BV_BITS_(Yadr) == rowsY*colsY)) 2 1 3
3193 {
3194 2 ▶ if ((Xadr != Yadr) or (rowsY == colsY))
Branch: 2 branches
BranchTrueFalseTotal
if ((Xadr != Yadr) or (rowsY == colsY)) 1 1 2
if ((Xadr != Yadr) or (rowsY == colsY)) 1 0 1
3195 {
3196 2 Matrix_Transpose(Xadr,rowsX,colsX,
3197 Yadr,rowsY,colsY);
3198 }
3199 0 else BIT_VECTOR_SHAPE_ERROR;
3200 }
3201 6 else BIT_VECTOR_MATRIX_ERROR;
3202 }
3203 4 else BIT_VECTOR_SCALAR_ERROR;
3204 }
3205 6 else BIT_VECTOR_OBJECT_ERROR;
3206 }
3207  
3208  
« blib/lib/Bit/Vector/String.pm ↑ Summary BitVector.c »