RdGen.xs.inc

filter: Statementstmt 79.1% 19 / 24 Branchbran 54.1% 13 / 24 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 66.6% 32 / 48 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Statistics/CaseResampling.pm ↑ Summary _stats.c »
1  
2 MODULE = Statistics::CaseResampling PACKAGE = Statistics::CaseResampling::RdGen PREFIX=mt_
3 PROTOTYPES: DISABLE
4  
5 int
6 mt_CLONE_SKIP(...)
7 CODE:
8 0 ▶ RETVAL = 1;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = 1; 0 0 0
9 OUTPUT:
10 RETVAL
11  
12 Statistics::CaseResampling::RdGen
13 mt_setup(seed)
14 U32 seed
15 CODE:
16 7 RETVAL = mt_setup(seed);
17 7 ▶ if (RETVAL == NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (RETVAL == NULL) 0 7 7
18 0 croak("Out of memory allocating RdGen");
19 OUTPUT:
20 RETVAL
21  
22 Statistics::CaseResampling::RdGen
23 mt_setup_array( array, ... )
24 CODE:
25 16 U32 * array = U32ArrayPtr(aTHX_ items);
26 16 U32 ix_array = 0;
27 85 ▶ while (items--) {
Branch: 1 branch
BranchTrueFalseTotal
while (items--) { 69 16 85
28 69 array[ix_array] = (U32)SvUV(ST(ix_array));
29 69 ix_array++;
30 }
31 16 RETVAL = mt_setup_array( (uint32_t*)array, ix_array );
32 16 ▶ if (RETVAL == NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (RETVAL == NULL) 0 16 16
33 0 croak("Out of memory allocating RdGen");
34 OUTPUT:
35 RETVAL
36  
37 void
38 mt__os_entropy(nwords)
39 I32 nwords
40 PREINIT:
41 uint32_t buf[64];
42 I32 i;
43 PPCODE:
44 15 ▶ if (nwords >= 1 && nwords <= 64 && mt_os_entropy(buf, nwords)) {
Branch: 3 branches
BranchTrueFalseTotal
if (nwords >= 1 && nwords <= 64 && mt_os_entropy(buf, nwords)) { 15 0 15
if (nwords >= 1 && nwords <= 64 && mt_os_entropy(buf, nwords)) { 15 0 15
if (nwords >= 1 && nwords <= 64 && mt_os_entropy(buf, nwords)) { 15 0 15
45 15 ▶ EXTEND(SP, nwords);
Branch: 2 branches
BranchTrueFalseTotal
EXTEND(SP, nwords); 15 0 15
EXTEND(SP, nwords); 0 15 15
46 75 ▶ for (i = 0; i < nwords; ++i) {
Branch: 1 branch
BranchTrueFalseTotal
for (i = 0; i < nwords; ++i) { 60 15 75
47 60 mPUSHu((UV)buf[i]);
48 }
49 }
50  
51 void
52 mt__mark_auto_seeded(self, pid)
53 Statistics::CaseResampling::RdGen self
54 IV pid
55 CODE:
56 11 ▶ if (self == NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (self == NULL) 0 11 11
57 0 croak("Invalid RdGen object");
58 11 self->auto_seeded = 1;
59 11 self->pid = (long)pid;
60  
61 void
62 mt_DESTROY(self)
63 Statistics::CaseResampling::RdGen self
64 CODE:
65 23 mt_free(self);
66  
67 double
68 mt_genrand(self)
69 Statistics::CaseResampling::RdGen self
70 CODE:
71 18007 ▶ if (self == NULL)
Branch: 1 branch
BranchTrueFalseTotal
if (self == NULL) 0 18007 18007
72 0 croak("Invalid RdGen object");
73 18007 RETVAL = mt_genrand(self);
74 OUTPUT:
75 RETVAL
76  
« blib/lib/Statistics/CaseResampling.pm ↑ Summary _stats.c »