dim mclvUpdateMeet ( mclVector* v1 , const mclVector* v2 , double (*op)(pval mval, pval nval) ) { if (!v1->n_ivps || !v2->n_ivps) return 0 ; if ((int) MCLV_IS_CANONICAL(v1)) return update_meet_canonical(v1, v2, op) ; else if ( v2->n_ivps * nu_magic * log(v1->n_ivps) < v1->n_ivps || v1->n_ivps * nu_magic * log(v2->n_ivps) < v2->n_ivps ) return update_meet_small_large(v1, v2, op) ; else return update_meet_zip(v1, v2, op) ; }
dim mclvUpdateDiff ( mclVector* v1 , const mclVector* v2 , double (*op)(pval mval, pval nval) ) { if (!v1->n_ivps) return 0 ; if (MCLV_IS_CANONICAL(v1)) return update_diff_canonical(v1, v2, op) ; else if ( (v1->n_ivps * nu_magic * log(v2->n_ivps) < v2->n_ivps) || (v2->n_ivps * nu_magic * log(v1->n_ivps) < v1->n_ivps) ) return update_diff_small_large(v1, v2, op) ; else return update_diff_zip(v1, v2, op) ; }
; debug_g = mcx_debug_g ; n_thread_g = mclx_set_threads_or_die(mediam, n_thread_l, i_group, n_group_G) ;fprintf(stderr, "%d %d %d\n", (int) n_thread_g, (int) n_thread_l, (int) n_group_G) ; mcxIOopen(xfout, EXIT_ON_FAIL) ; mx = mcx_get_network(xfmx_g, xfabc_g, xftab_g, &tab_g) ; mcxIOfree(&xfmx_g) ; mclxAdjustLoops(mx, mclxLoopCBremove, NULL) ; tabulator = calloc(N_COLS(mx), sizeof tabulator[0]) ; ecc_scratch = mclvCopy(NULL, mx->dom_rows) /* ^ used as ecc scratch: should have values 1.0 */ ; canonical = MCLV_IS_CANONICAL(mx->dom_cols) ; if (rough && !mclxGraphCanonical(mx)) mcxDie(1, mediam, "rough needs canonical domains") ; if (rough) { u8* rough_scratch = calloc(N_COLS(mx), sizeof rough_scratch[0]) ; long* rough_priority = mcxAlloc(N_COLS(mx) * sizeof rough_priority[0], EXIT_ON_FAIL) ; for (i=0;i<N_COLS(mx);i++) rough_priority[i] = 0 ; for (i=0;i<N_COLS(mx);i++) { dim priority = 0 ; rough_it(mx, tabulator, i, rough_scratch, rough_priority, &priority) ; } mcxFree(rough_scratch) ; mcxFree(rough_priority)