Exemple #1
0
void AllocateWorkSpace(ctrl_t *ctrl, graph_t *graph) {
    size_t coresize;

    switch (ctrl->optype) {
        case METIS_OP_PMETIS:
            coresize = 3 * (graph->nvtxs + 1) * sizeof(idx_t) +
                5 * (ctrl->nparts + 1) * graph->ncon * sizeof(idx_t) +
                5 * (ctrl->nparts + 1) * graph->ncon * sizeof(real_t);
            break;
        default:
            coresize = 4 * (graph->nvtxs + 1) * sizeof(idx_t) +
                5 * (ctrl->nparts + 1) * graph->ncon * sizeof(idx_t) +
                5 * (ctrl->nparts + 1) * graph->ncon * sizeof(real_t);
    }
    /*coresize = 0;*/
    ctrl->mcore = gk_mcoreCreate(coresize);

    ctrl->nbrpoolsize = 0;
    ctrl->nbrpoolcpos = 0;
}
Exemple #2
0
void AllocateWSpace(ctrl_t *ctrl, size_t nwords)
{
  ctrl->mcore = gk_mcoreCreate(nwords*sizeof(idx_t));
}