| 1 |
|
| |
| 2 |
|
| #line 453 "lib/PDL/PP.pm" |
| 3 |
|
| /* |
| 4 |
|
| * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/Bad.pd! Do not modify! |
| 5 |
|
| */ |
| 6 |
|
| |
| 7 |
|
| #define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \ |
| 8 |
|
| if (destroy) { \ |
| 9 |
|
| comp_free_code \ |
| 10 |
|
| } \ |
| 11 |
|
| if ((trans)->dims_redone) { \ |
| 12 |
|
| ntpriv_free_code \ |
| 13 |
|
| } |
| 14 |
|
| |
| 15 |
|
| #include "EXTERN.h" |
| 16 |
|
| #include "perl.h" |
| 17 |
|
| #include "XSUB.h" |
| 18 |
|
| #include "pdl.h" |
| 19 |
|
| #include "pdlcore.h" |
| 20 |
|
| #define PDL PDL_Bad |
| 21 |
|
| extern Core* PDL; /* Structure hold core C functions */ |
| 22 |
|
| #line 23 "lib/PDL/Bad.xs" |
| 23 |
|
| |
| 24 |
|
| #include <math.h> |
| 25 |
|
| pdl_error pdl_run_isbad(pdl *a,pdl *b); |
| 26 |
|
| pdl_error pdl_run_isnan(pdl *a,pdl *b); |
| 27 |
|
| pdl_error pdl_run_isgood(pdl *a,pdl *b); |
| 28 |
|
| pdl_error pdl_run_nbadover(pdl *a,pdl *b); |
| 29 |
|
| pdl_error pdl_run_ngoodover(pdl *a,pdl *b); |
| 30 |
|
| pdl_error pdl_run_setbadif(pdl *a,pdl *mask,pdl *b); |
| 31 |
|
| pdl_error pdl_run_setvaltobad(pdl *a,pdl *b,double value); |
| 32 |
|
| pdl_error pdl_run_setnantobad(pdl *a,pdl *b); |
| 33 |
|
| pdl_error pdl_run_setinftobad(pdl *a,pdl *b); |
| 34 |
|
| pdl_error pdl_run_setnonfinitetobad(pdl *a,pdl *b); |
| 35 |
|
| pdl_error pdl_run_setbadtonan(pdl *a,pdl *b); |
| 36 |
|
| pdl_error pdl_run_setbadtoval(pdl *a,pdl *b,double newval); |
| 37 |
|
| pdl_error pdl_run_badmask(pdl *a,pdl *b,pdl *c); |
| 38 |
|
| pdl_error pdl_run_copybad(pdl *a,pdl *mask,pdl *b); |
| 39 |
|
| pdl_error pdl_run_locf(pdl *a,pdl *b); |
| 40 |
|
| |
| 41 |
|
| #line 449 "lib/PDL/PP.pm" |
| 42 |
|
| #include "pdlperl.h" |
| 43 |
|
| #line 44 "lib/PDL/Bad.xs" |
| 44 |
|
| |
| 45 |
|
| Core* PDL = NULL; /* Structure hold core C functions */ |
| 46 |
|
| |
| 47 |
|
| MODULE = PDL::Bad PACKAGE = PDL PREFIX=pdl_run_ |
| 48 |
|
| |
| 49 |
|
| PROTOTYPES: DISABLE |
| 50 |
|
| |
| 51 |
|
| |
| 52 |
|
| MODULE = PDL::Bad PACKAGE = PDL::Bad |
| 53 |
|
| |
| 54 |
|
| pdl * |
| 55 |
|
| _badvalue_int(val, type) |
| 56 |
|
| PDL_Anyval val |
| 57 |
|
| int type |
| 58 |
|
| CODE: |
| 59 |
114 |
▶ | if ( val.type != -1 ) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ( val.type != -1 ) { |
4 |
110 |
114 |
|
| 60 |
|
| #define X_OUTER(datatype, ctype, ppsym, ...) \ |
| 61 |
|
| ctype cnewval = val.value.ppsym; |
| 62 |
|
| #define X_INNER(datatype, ctype, ppsym, ...) \ |
| 63 |
|
| PDL->bvals.ppsym = cnewval; |
| 64 |
4 |
| PDL_GENERICSWITCH2( |
| 65 |
|
| PDL_TYPELIST_ALL, val.type, X_OUTER, croak("Not a known data type code=%d", val.type), |
| 66 |
|
| PDL_TYPELIST_ALL_, type, X_INNER, croak("Not a known data type code=%d", type)) |
| 67 |
|
| #undef X_OUTER |
| 68 |
|
| #undef X_INNER |
| 69 |
|
| } |
| 70 |
114 |
| PDL_Anyval newval = {type, {0}}; |
| 71 |
114 |
| pdl* p = PDL->scalar(newval); |
| 72 |
114 |
▶ | if (!p) PDL->pdl_barf("Error making new pdl"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (!p) PDL->pdl_barf("Error making new pdl"); |
0 |
114 |
114 |
|
| 73 |
|
| #define X(datatype, ctype, ppsym, ...) \ |
| 74 |
|
| *((ctype *)p->data) = PDL->bvals.ppsym; |
| 75 |
114 |
| PDL_GENERICSWITCH(PDL_TYPELIST_ALL, type, X, croak("Not a known data type code=%d", type)) |
| 76 |
|
| #undef X |
| 77 |
114 |
| RETVAL = p; |
| 78 |
|
| OUTPUT: |
| 79 |
|
| RETVAL |
| 80 |
|
| |
| 81 |
|
| pdl * |
| 82 |
|
| _badvalue_per_pdl_int(pdl_val, val, type) |
| 83 |
|
| pdl* pdl_val |
| 84 |
|
| PDL_Anyval val |
| 85 |
|
| int type |
| 86 |
|
| CODE: |
| 87 |
108 |
▶ | if ( val.type != -1) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ( val.type != -1) { |
42 |
66 |
108 |
|
| 88 |
|
| PDL_Anyval typedval; |
| 89 |
42 |
| ANYVAL_TO_ANYVAL_NEWTYPE(val, typedval, pdl_val->datatype); |
| 90 |
42 |
▶ | if (typedval.type < 0) PDL->pdl_barf("Error making typedval"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (typedval.type < 0) PDL->pdl_barf("Error making typedval"); |
0 |
42 |
42 |
|
| 91 |
|
| #define X(datatype, ctype, ppsym, ...) \ |
| 92 |
|
| pdl_val->badvalue.type = typedval.type; \ |
| 93 |
|
| pdl_val->badvalue.value.ppsym = typedval.value.ppsym; |
| 94 |
42 |
| PDL_GENERICSWITCH(PDL_TYPELIST_ALL, pdl_val->datatype, X, croak("Not a known data type code=%d", type)) |
| 95 |
|
| #undef X |
| 96 |
42 |
| pdl_val->has_badvalue = 1; |
| 97 |
42 |
| PDL->propagate_badvalue( pdl_val ); |
| 98 |
|
| } |
| 99 |
108 |
| PDL_Anyval newval = {type, {0}}; |
| 100 |
108 |
| pdl* p = PDL->scalar(newval); |
| 101 |
108 |
▶ | if (!p) PDL->pdl_barf("Error making new pdl"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (!p) PDL->pdl_barf("Error making new pdl"); |
0 |
108 |
108 |
|
| 102 |
108 |
▶ | if (pdl_val->has_badvalue == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (pdl_val->has_badvalue == 0) { |
57 |
51 |
108 |
|
| 103 |
|
| #define X(datatype, ctype, ppsym, ...) \ |
| 104 |
|
| *((ctype *)p->data) = PDL->bvals.ppsym; |
| 105 |
57 |
| PDL_GENERICSWITCH(PDL_TYPELIST_ALL, type, X, croak("Not a known data type code=%d", type)) |
| 106 |
|
| #undef X |
| 107 |
|
| } else { |
| 108 |
|
| #define X_OUTER(datatype, ctype, ...) \ |
| 109 |
|
| ctype *coutvalp = p->data; |
| 110 |
|
| #define X_INNER(datatype, ctype, ppsym, ...) \ |
| 111 |
|
| *coutvalp = pdl_val->badvalue.value.ppsym; |
| 112 |
51 |
| PDL_GENERICSWITCH2( |
| 113 |
|
| PDL_TYPELIST_ALL, type, X_OUTER, croak("Not a known data type code=%d", type), |
| 114 |
|
| PDL_TYPELIST_ALL_, pdl_val->badvalue.type, X_INNER, croak("Not a known data type code=%d", pdl_val->badvalue.type)) |
| 115 |
|
| #undef X_OUTER |
| 116 |
|
| #undef X_INNER |
| 117 |
|
| } |
| 118 |
108 |
| RETVAL = p; |
| 119 |
|
| OUTPUT: |
| 120 |
|
| RETVAL |
| 121 |
|
| |
| 122 |
|
| pdl * |
| 123 |
|
| _default_badvalue_int(type) |
| 124 |
|
| int type |
| 125 |
|
| CODE: |
| 126 |
33 |
| PDL_Anyval val = {type, {0}}; |
| 127 |
33 |
| pdl* p = PDL->scalar(val); |
| 128 |
33 |
▶ | if (!p) PDL->pdl_barf("Error making new pdl"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (!p) PDL->pdl_barf("Error making new pdl"); |
0 |
33 |
33 |
|
| 129 |
|
| #define X(datatype, ctype, ppsym, shortctype, defbval, ...) \ |
| 130 |
|
| *((ctype *)p->data) = defbval; |
| 131 |
33 |
| PDL_GENERICSWITCH(PDL_TYPELIST_ALL, type, X, croak("Not a known data type code=%d", type)) |
| 132 |
|
| #undef X |
| 133 |
33 |
| RETVAL = p; |
| 134 |
|
| OUTPUT: |
| 135 |
|
| RETVAL |
| 136 |
|
| |
| 137 |
|
| MODULE = PDL::Bad PACKAGE = PDL PREFIX=pdl_run_ |
| 138 |
|
| |
| 139 |
|
| |
| 140 |
|
| void |
| 141 |
|
| pdl_run_isbad(a, b=PDL_XS_PERLINIT_initsv(b_SV)) |
| 142 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 143 |
|
| PREINIT: |
| 144 |
396 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
396 |
0 |
396 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
396 |
396 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
396 |
0 |
396 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
396 |
0 |
396 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
396 |
0 |
396 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
396 |
396 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
396 |
0 |
396 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
396 |
396 |
|
| 145 |
|
| INPUT: |
| 146 |
|
| pdl *a |
| 147 |
|
| pdl *b |
| 148 |
|
| PPCODE: |
| 149 |
396 |
▶ | if (PDL_IS_INPLACE(a)) PDL->pdl_barf("isbad: a->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(a)) PDL->pdl_barf("isbad: a->inplace but not supported"); |
0 |
396 |
396 |
|
| 150 |
396 |
| PDL->barf_if_error(pdl_run_isbad(a,b)); |
| 151 |
396 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
396 |
0 |
396 |
| PDL_XS_RETURN(ST(0) = b_SV) |
396 |
0 |
396 |
| PDL_XS_RETURN(ST(0) = b_SV) |
396 |
0 |
396 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
396 |
396 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 152 |
|
| |
| 153 |
|
| void |
| 154 |
|
| pdl_run_isnan(a, b=PDL_XS_PERLINIT_initsv(b_SV)) |
| 155 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 156 |
|
| PREINIT: |
| 157 |
1 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
|
| 158 |
|
| INPUT: |
| 159 |
|
| pdl *a |
| 160 |
|
| pdl *b |
| 161 |
|
| PPCODE: |
| 162 |
1 |
▶ | if (PDL_IS_INPLACE(a)) PDL->pdl_barf("isnan: a->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(a)) PDL->pdl_barf("isnan: a->inplace but not supported"); |
0 |
1 |
1 |
|
| 163 |
1 |
| PDL->barf_if_error(pdl_run_isnan(a,b)); |
| 164 |
1 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
1 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 165 |
|
| |
| 166 |
|
| void |
| 167 |
|
| pdl_run_isgood(a, b=PDL_XS_PERLINIT_initsv(b_SV)) |
| 168 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 169 |
|
| PREINIT: |
| 170 |
1 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
|
| 171 |
|
| INPUT: |
| 172 |
|
| pdl *a |
| 173 |
|
| pdl *b |
| 174 |
|
| PPCODE: |
| 175 |
1 |
▶ | if (PDL_IS_INPLACE(a)) PDL->pdl_barf("isgood: a->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(a)) PDL->pdl_barf("isgood: a->inplace but not supported"); |
0 |
1 |
1 |
|
| 176 |
1 |
| PDL->barf_if_error(pdl_run_isgood(a,b)); |
| 177 |
1 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
1 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 178 |
|
| |
| 179 |
|
| void |
| 180 |
|
| pdl_run_nbadover(a, b=PDL_XS_PERLINIT_initsv(b_SV)) |
| 181 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 182 |
|
| PREINIT: |
| 183 |
4 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
4 |
0 |
4 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
4 |
4 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
4 |
0 |
4 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
4 |
0 |
4 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
4 |
0 |
4 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
4 |
4 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
4 |
0 |
4 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
4 |
4 |
|
| 184 |
|
| INPUT: |
| 185 |
|
| pdl *a |
| 186 |
|
| pdl *b |
| 187 |
|
| PPCODE: |
| 188 |
4 |
▶ | if (PDL_IS_INPLACE(a)) PDL->pdl_barf("nbadover: a->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(a)) PDL->pdl_barf("nbadover: a->inplace but not supported"); |
0 |
4 |
4 |
|
| 189 |
4 |
| PDL->barf_if_error(pdl_run_nbadover(a,b)); |
| 190 |
4 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
3 |
4 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
1 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
3 |
3 |
|
| 191 |
|
| |
| 192 |
|
| void |
| 193 |
|
| pdl_run_ngoodover(a, b=PDL_XS_PERLINIT_initsv(b_SV)) |
| 194 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 195 |
|
| PREINIT: |
| 196 |
24 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
24 |
0 |
24 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
24 |
24 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
24 |
0 |
24 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
24 |
0 |
24 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
24 |
0 |
24 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
24 |
24 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
24 |
0 |
24 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
24 |
24 |
|
| 197 |
|
| INPUT: |
| 198 |
|
| pdl *a |
| 199 |
|
| pdl *b |
| 200 |
|
| PPCODE: |
| 201 |
24 |
▶ | if (PDL_IS_INPLACE(a)) PDL->pdl_barf("ngoodover: a->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(a)) PDL->pdl_barf("ngoodover: a->inplace but not supported"); |
0 |
24 |
24 |
|
| 202 |
24 |
| PDL->barf_if_error(pdl_run_ngoodover(a,b)); |
| 203 |
24 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
19 |
5 |
24 |
| PDL_XS_RETURN(ST(0) = b_SV) |
19 |
0 |
19 |
| PDL_XS_RETURN(ST(0) = b_SV) |
19 |
0 |
19 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
19 |
19 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
5 |
5 |
|
| 204 |
|
| |
| 205 |
|
| void |
| 206 |
|
| pdl_run_setbadif(a, mask, b=PDL_XS_PERLINIT_initsv(b_SV)) |
| 207 |
|
| SV *b_SV = items > 2 ? ST(2) : NULL; |
| 208 |
|
| PREINIT: |
| 209 |
40 |
▶ | PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
40 |
0 |
40 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
40 |
40 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
40 |
0 |
40 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
40 |
0 |
40 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
40 |
0 |
40 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
40 |
40 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
40 |
0 |
40 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
40 |
40 |
|
| 210 |
|
| INPUT: |
| 211 |
|
| pdl *a |
| 212 |
|
| pdl *mask |
| 213 |
|
| pdl *b |
| 214 |
|
| PPCODE: |
| 215 |
40 |
▶ | if (PDL_IS_INPLACE(a)) PDL->pdl_barf("setbadif: a->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(a)) PDL->pdl_barf("setbadif: a->inplace but not supported"); |
0 |
40 |
40 |
|
| 216 |
40 |
▶ | if (PDL_IS_INPLACE(mask)) PDL->pdl_barf("setbadif: mask->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(mask)) PDL->pdl_barf("setbadif: mask->inplace but not supported"); |
0 |
40 |
40 |
|
| 217 |
40 |
| PDL->barf_if_error(pdl_run_setbadif(a,mask,b)); |
| 218 |
40 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
40 |
0 |
40 |
| PDL_XS_RETURN(ST(0) = b_SV) |
40 |
0 |
40 |
| PDL_XS_RETURN(ST(0) = b_SV) |
40 |
0 |
40 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
40 |
40 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 219 |
|
| |
| 220 |
|
| void |
| 221 |
|
| pdl_run_setvaltobad(a, b=b, value=value) |
| 222 |
|
| SV *b_SV = (items == 3) ? ST(1) : NULL; |
| 223 |
|
| SV *value_SV = (items == 3) ? ST(2) : ST(1); |
| 224 |
|
| PREINIT: |
| 225 |
121 |
▶ | PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
121 |
0 |
121 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
121 |
121 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
121 |
0 |
121 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
121 |
0 |
121 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
121 |
0 |
121 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
121 |
121 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
121 |
0 |
121 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
121 |
121 |
|
| 226 |
121 |
▶ | if (!((items == 2) || (items == 3))) |
Branch: 2 branches
| Branch | True | False | Total |
| if (!((items == 2) || (items == 3))) |
0 |
121 |
121 |
| if (!((items == 2) || (items == 3))) |
0 |
0 |
0 |
|
| 227 |
0 |
| croak("Usage: PDL::setvaltobad(a,[b],value) (you may leave [outputs] and values with =defaults out of list)"); |
| 228 |
|
| INPUT: |
| 229 |
|
| pdl *a |
| 230 |
|
| pdl *b=NO_INIT |
| 231 |
|
| double value; { value = (double)SvNV(value_SV); } |
| 232 |
|
| PPCODE: |
| 233 |
121 |
▶ | PDL_XS_INPLACE(a, b) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, b) |
97 |
24 |
121 |
| PDL_XS_INPLACE(a, b) |
0 |
97 |
97 |
| PDL_XS_INPLACE(a, b) |
0 |
24 |
24 |
| PDL_XS_INPLACE(a, b) |
0 |
24 |
24 |
|
| 234 |
121 |
| PDL->barf_if_error(pdl_run_setvaltobad(a,b,value)); |
| 235 |
121 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
121 |
0 |
121 |
| PDL_XS_RETURN(ST(0) = b_SV) |
121 |
0 |
121 |
| PDL_XS_RETURN(ST(0) = b_SV) |
121 |
0 |
121 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
121 |
121 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 236 |
|
| |
| 237 |
|
| void |
| 238 |
|
| pdl_run_setnantobad(a, b=b) |
| 239 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 240 |
|
| PREINIT: |
| 241 |
63 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
63 |
0 |
63 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
63 |
63 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
63 |
0 |
63 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
63 |
0 |
63 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
63 |
0 |
63 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
63 |
63 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
63 |
0 |
63 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
63 |
63 |
|
| 242 |
|
| INPUT: |
| 243 |
|
| pdl *a |
| 244 |
|
| pdl *b=NO_INIT |
| 245 |
|
| PPCODE: |
| 246 |
63 |
▶ | PDL_XS_INPLACE(a, b) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, b) |
35 |
28 |
63 |
| PDL_XS_INPLACE(a, b) |
0 |
35 |
35 |
| PDL_XS_INPLACE(a, b) |
0 |
28 |
28 |
| PDL_XS_INPLACE(a, b) |
0 |
28 |
28 |
|
| 247 |
63 |
| PDL->barf_if_error(pdl_run_setnantobad(a,b)); |
| 248 |
63 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
63 |
0 |
63 |
| PDL_XS_RETURN(ST(0) = b_SV) |
63 |
0 |
63 |
| PDL_XS_RETURN(ST(0) = b_SV) |
63 |
0 |
63 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
63 |
63 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 249 |
|
| |
| 250 |
|
| void |
| 251 |
|
| pdl_run_setinftobad(a, b=b) |
| 252 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 253 |
|
| PREINIT: |
| 254 |
1 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
|
| 255 |
|
| INPUT: |
| 256 |
|
| pdl *a |
| 257 |
|
| pdl *b=NO_INIT |
| 258 |
|
| PPCODE: |
| 259 |
1 |
▶ | PDL_XS_INPLACE(a, b) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, b) |
1 |
0 |
1 |
| PDL_XS_INPLACE(a, b) |
0 |
1 |
1 |
| PDL_XS_INPLACE(a, b) |
0 |
0 |
0 |
| PDL_XS_INPLACE(a, b) |
0 |
0 |
0 |
|
| 260 |
1 |
| PDL->barf_if_error(pdl_run_setinftobad(a,b)); |
| 261 |
1 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
1 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 262 |
|
| |
| 263 |
|
| void |
| 264 |
|
| pdl_run_setnonfinitetobad(a, b=b) |
| 265 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 266 |
|
| PREINIT: |
| 267 |
1 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
|
| 268 |
|
| INPUT: |
| 269 |
|
| pdl *a |
| 270 |
|
| pdl *b=NO_INIT |
| 271 |
|
| PPCODE: |
| 272 |
1 |
▶ | PDL_XS_INPLACE(a, b) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, b) |
1 |
0 |
1 |
| PDL_XS_INPLACE(a, b) |
0 |
1 |
1 |
| PDL_XS_INPLACE(a, b) |
0 |
0 |
0 |
| PDL_XS_INPLACE(a, b) |
0 |
0 |
0 |
|
| 273 |
1 |
| PDL->barf_if_error(pdl_run_setnonfinitetobad(a,b)); |
| 274 |
1 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
1 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 275 |
|
| |
| 276 |
|
| void |
| 277 |
|
| pdl_run_setbadtonan(a, b=b) |
| 278 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 279 |
|
| PREINIT: |
| 280 |
3 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
3 |
3 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
3 |
3 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
3 |
3 |
|
| 281 |
|
| INPUT: |
| 282 |
|
| pdl *a |
| 283 |
|
| pdl *b=NO_INIT |
| 284 |
|
| PPCODE: |
| 285 |
3 |
▶ | PDL_XS_INPLACE(a, b) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, b) |
3 |
0 |
3 |
| PDL_XS_INPLACE(a, b) |
0 |
3 |
3 |
| PDL_XS_INPLACE(a, b) |
0 |
0 |
0 |
| PDL_XS_INPLACE(a, b) |
0 |
0 |
0 |
|
| 286 |
3 |
| PDL->barf_if_error(pdl_run_setbadtonan(a,b)); |
| 287 |
3 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
3 |
0 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
3 |
0 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
3 |
0 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
3 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 288 |
|
| |
| 289 |
|
| void |
| 290 |
|
| pdl_run_setbadtoval(a, b=b, newval=newval) |
| 291 |
|
| SV *b_SV = (items == 3) ? ST(1) : NULL; |
| 292 |
|
| SV *newval_SV = (items == 3) ? ST(2) : ST(1); |
| 293 |
|
| PREINIT: |
| 294 |
58 |
▶ | PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
58 |
0 |
58 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
58 |
58 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
58 |
0 |
58 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
58 |
0 |
58 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
58 |
0 |
58 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
58 |
58 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
58 |
0 |
58 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
58 |
58 |
|
| 295 |
58 |
▶ | if (!((items == 2) || (items == 3))) |
Branch: 2 branches
| Branch | True | False | Total |
| if (!((items == 2) || (items == 3))) |
0 |
58 |
58 |
| if (!((items == 2) || (items == 3))) |
0 |
0 |
0 |
|
| 296 |
0 |
| croak("Usage: PDL::setbadtoval(a,[b],newval) (you may leave [outputs] and values with =defaults out of list)"); |
| 297 |
|
| INPUT: |
| 298 |
|
| pdl *a |
| 299 |
|
| pdl *b=NO_INIT |
| 300 |
|
| double newval; { newval = (double)SvNV(newval_SV); } |
| 301 |
|
| PPCODE: |
| 302 |
58 |
▶ | PDL_XS_INPLACE(a, b) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, b) |
28 |
30 |
58 |
| PDL_XS_INPLACE(a, b) |
0 |
28 |
28 |
| PDL_XS_INPLACE(a, b) |
0 |
30 |
30 |
| PDL_XS_INPLACE(a, b) |
0 |
30 |
30 |
|
| 303 |
58 |
| PDL->barf_if_error(pdl_run_setbadtoval(a,b,newval)); |
| 304 |
58 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
58 |
0 |
58 |
| PDL_XS_RETURN(ST(0) = b_SV) |
58 |
0 |
58 |
| PDL_XS_RETURN(ST(0) = b_SV) |
58 |
0 |
58 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
58 |
58 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 305 |
|
| |
| 306 |
|
| void |
| 307 |
|
| pdl_run_badmask(a, b, c=c) |
| 308 |
|
| SV *c_SV = items > 2 ? ST(2) : NULL; |
| 309 |
|
| PREINIT: |
| 310 |
1 |
▶ | PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
1 |
1 |
|
| 311 |
|
| INPUT: |
| 312 |
|
| pdl *a |
| 313 |
|
| pdl *b |
| 314 |
|
| pdl *c=NO_INIT |
| 315 |
|
| PPCODE: |
| 316 |
1 |
▶ | PDL_XS_INPLACE(a, c) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, c) |
1 |
0 |
1 |
| PDL_XS_INPLACE(a, c) |
0 |
1 |
1 |
| PDL_XS_INPLACE(a, c) |
0 |
0 |
0 |
| PDL_XS_INPLACE(a, c) |
0 |
0 |
0 |
|
| 317 |
1 |
| PDL->barf_if_error(pdl_run_badmask(a,b,c)); |
| 318 |
1 |
▶ | PDL_XS_RETURN(ST(0) = c_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = c_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = c_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = c_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = c_SV) |
0 |
1 |
1 |
| PDL_XS_RETURN(ST(0) = c_SV) |
0 |
0 |
0 |
|
| 319 |
|
| |
| 320 |
|
| void |
| 321 |
|
| pdl_run_copybad(a, mask, b=b) |
| 322 |
|
| SV *b_SV = items > 2 ? ST(2) : NULL; |
| 323 |
|
| PREINIT: |
| 324 |
3 |
▶ | PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
3 |
3 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
3 |
3 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
3 |
0 |
3 |
| PDL_XS_PREAMBLE((items == 3) ? 0 : 1); |
0 |
3 |
3 |
|
| 325 |
|
| INPUT: |
| 326 |
|
| pdl *a |
| 327 |
|
| pdl *mask |
| 328 |
|
| pdl *b=NO_INIT |
| 329 |
|
| PPCODE: |
| 330 |
3 |
▶ | PDL_XS_INPLACE(a, b) |
Branch: 4 branches
| Branch | True | False | Total |
| PDL_XS_INPLACE(a, b) |
2 |
1 |
3 |
| PDL_XS_INPLACE(a, b) |
0 |
2 |
2 |
| PDL_XS_INPLACE(a, b) |
0 |
1 |
1 |
| PDL_XS_INPLACE(a, b) |
0 |
1 |
1 |
|
| 331 |
3 |
| PDL->barf_if_error(pdl_run_copybad(a,mask,b)); |
| 332 |
3 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
3 |
0 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
3 |
0 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
3 |
0 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
3 |
3 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 333 |
|
| |
| 334 |
|
| void |
| 335 |
|
| pdl_run_locf(a, b=PDL_XS_PERLINIT_initsv(b_SV)) |
| 336 |
|
| SV *b_SV = items > 1 ? ST(1) : NULL; |
| 337 |
|
| PREINIT: |
| 338 |
1 |
▶ | PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
Branch: 10 branches
| Branch | True | False | Total |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
0 |
0 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
1 |
0 |
1 |
| PDL_XS_PREAMBLE((items == 2) ? 0 : 1); |
0 |
1 |
1 |
|
| 339 |
|
| INPUT: |
| 340 |
|
| pdl *a |
| 341 |
|
| pdl *b |
| 342 |
|
| PPCODE: |
| 343 |
1 |
▶ | if (PDL_IS_INPLACE(a)) PDL->pdl_barf("locf: a->inplace but not supported"); |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL_IS_INPLACE(a)) PDL->pdl_barf("locf: a->inplace but not supported"); |
0 |
1 |
1 |
|
| 344 |
1 |
| PDL->barf_if_error(pdl_run_locf(a,b)); |
| 345 |
1 |
▶ | PDL_XS_RETURN(ST(0) = b_SV) |
Branch: 5 branches
| Branch | True | False | Total |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
1 |
0 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
1 |
1 |
| PDL_XS_RETURN(ST(0) = b_SV) |
0 |
0 |
0 |
|
| 346 |
|
| |
| 347 |
|
| |
| 348 |
|
| #line 483 "lib/PDL/PP.pm" |
| 349 |
|
| BOOT: |
| 350 |
|
| /* Get pointer to structure of core shared C routines */ |
| 351 |
|
| /* make sure PDL::Core is loaded */ |
| 352 |
|
| #line 353 "lib/PDL/Bad.xs" |
| 353 |
71 |
| perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */ |
| 354 |
|
| #ifndef aTHX_ |
| 355 |
|
| #define aTHX_ |
| 356 |
|
| #endif |
| 357 |
71 |
▶ | if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); |
Branch: 3 branches
| Branch | True | False | Total |
| if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); |
71 |
0 |
71 |
| if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); |
0 |
71 |
71 |
| if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); |
0 |
0 |
0 |
|
| 358 |
71 |
| SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */ |
| 359 |
71 |
▶ | if (!CoreSV) |
Branch: 1 branch
| Branch | True | False | Total |
| if (!CoreSV) |
0 |
71 |
71 |
|
| 360 |
0 |
| Perl_croak(aTHX_ "We require the PDL::Core module, which was not found"); |
| 361 |
71 |
▶ | if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ |
0 |
71 |
71 |
|
| 362 |
0 |
| Perl_croak(aTHX_ "Got NULL pointer for PDL"); |
| 363 |
71 |
▶ | if (PDL->Version != PDL_CORE_VERSION) |
Branch: 1 branch
| Branch | True | False | Total |
| if (PDL->Version != PDL_CORE_VERSION) |
0 |
71 |
71 |
|
| 364 |
0 |
| Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::Bad needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION); |