28 if (graph == orggraph) {
44 switch (ctrl->
rtype) {
56 }
while (graph != orggraph);
72 graph->
pwgts =
imalloc(3,
"Allocate2WayNodePartitionMemory: pwgts");
73 graph->
where =
imalloc(nvtxs,
"Allocate2WayNodePartitionMemory: where");
74 graph->
bndptr =
imalloc(nvtxs,
"Allocate2WayNodePartitionMemory: bndptr");
75 graph->
bndind =
imalloc(nvtxs,
"Allocate2WayNodePartitionMemory: bndind");
87 idx_t *
where, *pwgts, *bndind, *bndptr, *edegrees;
107 for (i=0; i<nvtxs; i++) {
109 pwgts[me] += vwgt[
i];
111 ASSERT(me >=0 && me <= 2);
117 edegrees[0] = edegrees[1] = 0;
119 for (j=xadj[i]; j<xadj[i+1]; j++) {
120 other = where[adjncy[
j]];
122 edegrees[
other] += vwgt[adjncy[
j]];
144 cwhere = cgraph->
where;
146 nvtxs = graph->
nvtxs;
150 where = graph->
where;
153 for (i=0; i<nvtxs; i++) {
154 where[
i] = cwhere[cmap[
i]];
156 i, cmap[i], where[i], cwhere[cmap[i]]));
#define FM_2WayNodeRefine2Sided
idx_t idx_t idx_t idx_t * vwgt
#define gk_startcputimer(tmr)
#define gk_stopcputimer(tmr)
#define ASSERTP(expr, msg)
void Refine2WayNode(ctrl_t *ctrl, graph_t *orggraph, graph_t *graph)
void gk_errexit(int signum, char *f_str,...)
#define CheckNodePartitionParams
NonlinearFactorGraph graph
#define FM_2WayNodeRefine1Sided
#define ASSERT(expression)
#define BNDInsert(nbnd, bndind, bndptr, vtx)
void Allocate2WayNodePartitionMemory(ctrl_t *ctrl, graph_t *graph)
void * gk_malloc(size_t nbytes, char *msg)
idx_t idx_t idx_t idx_t * where
idx_t idx_t idx_t * adjncy
void Project2WayNodePartition(ctrl_t *ctrl, graph_t *graph)
#define FM_2WayNodeBalance
void Compute2WayNodePartitionParams(ctrl_t *ctrl, graph_t *graph)
#define IFSET(a, flag, cmd)