Branch Coverage

lib/PDL/Core/pdlutil.c
Criterion Covered Total %
branch 82 214 38.3


line true false branch
29 0 115 PDLDEBUG_f(printf("pdl_make_error called: "));
35 0 115 if (size < 0) return PDL_err;
38 114 1 if (pdl_pthread_main_thread()) {
41 0 114 if (p == NULL) return PDL_err;
45 0 114 if (size < 0) {
56 0 115 PDLDEBUG_f(printf("%s\n", p));
76 30 0 if(paramIndex < 0 || paramIndex >= vtable->npdls) {
0 30 if(paramIndex < 0 || paramIndex >= vtable->npdls) {
82 90 30 for(i=0; inpdls; i++) {
85 60 30 if(i < vtable->npdls-1) {
98 18 12 snprintf(msgptr, remaining,
103 90 30 for(i=maxrealdims=0; inpdls; i++)
104 30 60 if(vtable->par_realdims[i]>maxrealdims)
108 28 2 if(maxrealdims > 0) {
116 90 30 for(i=0; inpdls; i++) {
117 4 86 snprintf(msgptr,remaining," #%3d (%s",i,creating[i]?"null)\n":"normal): ");
119 4 86 if(creating[i])
121 72 14 if(maxrealdims == 1) {
125 4 86 for(j=0; j< maxrealdims - vtable->par_realdims[i]; j++) {
129 88 86 for(j=0; j< vtable->par_realdims[i]; j++) {
133 82 4 if(maxrealdims) {
137 57 67 for(j=0; jpar_realdims[i] < pdls[i]->ndims; j++) {
38 19 for(j=0; jpar_realdims[i] < pdls[i]->ndims; j++) {
150 0 3 for (i=0;i
3 5 for (i=0;i
156 0 0 SET_SPACE(spaces, nspac);
0 0 SET_SPACE(spaces, nspac);
178 0 0 for (i=0;vtable->gentypes[i]!=-1; i++) {
181 0 0 if ((sz+thislen)>PDL_MAXLIN) {sz=nspac+4; printf("\n%s ",spaces);}
182 0 0 printf("%s%s",found ? ",":"",this_str); found = 1;
187 0 0 for (i=0;inpdls;i++) {
190 0 0 for (j=0;jpar_realdims[i];j++) {
191 0 0 if (found) sz += printf(","); found=1;
194 0 0 if (vtable->par_flags[i] & PDL_PARAM_ISTYPED)
195 0 0 sz += printf(") (%s", PDL_TYPENAME(vtable->par_types[i]));
0 0 sz += printf(") (%s", PDL_TYPENAME(vtable->par_types[i]));
0 0 sz += printf(") (%s", PDL_TYPENAME(vtable->par_types[i]));
198 0 0 for (j=0;paramflagval[j]!=0; j++)
199 0 0 if (vtable->par_flags[i] & paramflagval[j]) {
202 0 0 if ((sz+thislen)>PDL_MAXLIN) {sz=nspac+8; printf("\n%s ",spaces);}
203 0 0 sz += printf("%s%s",found ? "|":"",this_str); found = 1;
205 0 0 if (!found) printf("(no flags set)");
209 0 0 for (i=0;ininds;i++)
216 0 0 SET_SPACE(spaces, nspac);
0 0 SET_SPACE(spaces, nspac);
230 0 0 if (broadcast->transvtable)
234 0 0 for (i=0;flagval[i]!=0; i++)
235 0 0 if (broadcast->gflags & flagval[i]) {
238 0 0 if ((sz+thislen)>PDL_MAXLIN) {sz=nspac; printf("\n%s",spaces);}
239 0 0 printf("%s%s",found ? "|":"",this_str); found = 1;
247 0 0 if (broadcast->mag_nthr <= 0) {
253 0 0 for (i=0;imag_nthr;i++) {
258 0 0 for (i=0;imag_nthr;i++) {
263 0 0 for (i=0;imag_nthr;i++) {
269 0 0 for (i=0;indims;i++) {
275 0 0 for (i=0;inpdls;i++)
276 0 0 printf("%s%p",(i?" ":""),(broadcast->pdls[i]));
279 0 0 for (i=0;inpdls;i++)
280 0 0 printf("%s%d",(i?" ":""),broadcast->flags[i]);
290 0 0 for(j=0; j
291 0 0 if(creating[j]) continue;
293 0 0 for( k=0; k < nbroadcastedDims[j]; k++){
346 0 3 SET_SPACE(spaces, nspac);
15 3 SET_SPACE(spaces, nspac);
363 23 3 for (i=0;flagval[i]!=0; i++)
364 7 16 if (flags & flagval[i]) {
367 0 7 if ((sz+thislen)>PDL_MAXLIN) {sz=7+nspac; printf("\n %s",spaces);}
368 4 3 printf("%s%s",found ? "|":"",this_str); found = 1;
377 0 1 SET_SPACE(spaces, nspac);
3 1 SET_SPACE(spaces, nspac);
383 0 1 if(it->flags & PDL_ITRANS_ISAFFINE) {
384 0 0 if(it->pdls[1]->state & PDL_PARENTDIMSCHANGED) {
388 0 0 if (it->incs)
403 1 1 for(i=0; ivtable->nparents; i++)
404 0 1 printf("%s%p",(i?" ":""),(it->pdls[i]));
406 1 1 for(;ivtable->npdls; i++)
407 0 1 printf("%s%p",(i>it->vtable->nparents?" ":""),(it->pdls[i]));
413 0 1 SET_SPACE(spaces, nspac);
0 1 SET_SPACE(spaces, nspac);
417 1 0 it->trans_parent?it->trans_parent->vtable:0, it->trans_parent, it->sv);
418 0 1 if (it->datasv)
421 0 1 if (it->data)
424 0 1 if (it->hdrsv)
431 0 1 if (it->vafftrans) {
434 0 0 pdl_print_iarr(PDL_REPRINCS(it), it->vafftrans->ndims);
436 0 1 if (it->state & PDL_BADVAL) {
437 0 0 printf("\n%s Badvalue (%s): ",spaces, it->has_badvalue ? "bespoke" : "orig");
439 0 0 if (!(it->has_badvalue && it->badvalue.type != it->datatype)) {
0 0 if (!(it->has_badvalue && it->badvalue.type != it->datatype)) {
440 0 0 if (it->has_badvalue)
449 0 0 if (result.type < 0)
454 0 1 if (it->state & PDL_ALLOCATED) {
456 0 0 for (i=0; invals && i<10; i++) {
0 0 for (i=0; invals && i<10; i++) {
457 0 0 if (i) printf(" ");
466 1 0 if (it->trans_parent) {
469 0 1 if (it->ntrans_children) {
471 0 0 for (i = 0; i < it->ntrans_children_allocated; i++) {
473 0 0 if (!t) continue;
485 0 0 if (v.type < PDL_CF) {
499 114 1 if (e.needs_free == 1) {
508 302310 117 if (!err.error) return;
510 115 2 if (err.needs_free) {
520 571 52 if (!err_new.error) return err_current;
521 52 0 if (!err_current.error) return err_new;
526 0 0 if (err_current.needs_free) pdl_error_free(err_current);
527 0 0 if (err_new.needs_free) pdl_error_free(err_new);