Hitmap 1.3
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Friends
Macros
Groups
Pages
extern
metis
Lib
mrefine2.c
Go to the documentation of this file.
1
/*
2
* Copyright 1997, Regents of the University of Minnesota
3
*
4
* mrefine2.c
5
*
6
* This file contains the driving routines for multilevel refinement
7
*
8
* Started 7/24/97
9
* George
10
*
11
* $Id: mrefine2.c,v 1.1 1998/11/27 17:59:26 karypis Exp $
12
*/
13
14
#include <
metis.h
>
15
16
17
/*************************************************************************
18
* This function is the entry point of refinement
19
**************************************************************************/
20
void
MocRefine2Way2
(
CtrlType
*ctrl,
GraphType
*orggraph,
GraphType
*
graph
,
float
*tpwgts,
21
float
*ubvec)
22
{
23
24
IFSET
(ctrl->
dbglvl
,
DBG_TIME
,
starttimer
(ctrl->
UncoarsenTmr
));
25
26
/* Compute the parameters of the coarsest graph */
27
MocCompute2WayPartitionParams
(ctrl, graph);
28
29
for
(;;) {
30
ASSERT
(
CheckBnd
(graph));
31
32
IFSET
(ctrl->
dbglvl
,
DBG_TIME
,
starttimer
(ctrl->
RefTmr
));
33
switch
(ctrl->
RType
) {
34
case
RTYPE_FM
:
35
MocBalance2Way2
(ctrl, graph, tpwgts, ubvec);
36
MocFM_2WayEdgeRefine2
(ctrl, graph, tpwgts, ubvec, 8);
37
break
;
38
default
:
39
errexit
(
"Unknown refinement type: %d\n"
, ctrl->
RType
);
40
}
41
IFSET
(ctrl->
dbglvl
,
DBG_TIME
,
stoptimer
(ctrl->
RefTmr
));
42
43
if
(graph == orggraph)
44
break
;
45
46
graph = graph->
finer
;
47
IFSET
(ctrl->
dbglvl
,
DBG_TIME
,
starttimer
(ctrl->
ProjectTmr
));
48
MocProject2WayPartition
(ctrl, graph);
49
IFSET
(ctrl->
dbglvl
,
DBG_TIME
,
stoptimer
(ctrl->
ProjectTmr
));
50
}
51
52
IFSET
(ctrl->
dbglvl
,
DBG_TIME
,
stoptimer
(ctrl->
UncoarsenTmr
));
53
}
54
55
controldef::ProjectTmr
timer ProjectTmr
Definition:
struct.h:230
controldef::RefTmr
timer RefTmr
Definition:
struct.h:230
MocRefine2Way2
#define MocRefine2Way2
Definition:
rename.h:275
MocProject2WayPartition
#define MocProject2WayPartition
Definition:
rename.h:271
stoptimer
#define stoptimer(tmr)
Definition:
macros.h:54
graphdef::finer
struct graphdef * finer
Definition:
struct.h:198
graph
HitTile_Vector graph
Definition:
spring_bitmap.c:132
controldef
Definition:
struct.h:214
MocFM_2WayEdgeRefine2
#define MocFM_2WayEdgeRefine2
Definition:
rename.h:190
IFSET
#define IFSET(a, flag, cmd)
Definition:
macros.h:61
controldef::dbglvl
int dbglvl
Definition:
struct.h:216
MocCompute2WayPartitionParams
#define MocCompute2WayPartitionParams
Definition:
rename.h:270
RTYPE_FM
#define RTYPE_FM
Definition:
defs.h:113
CheckBnd
#define CheckBnd
Definition:
rename.h:44
metis.h
graphdef
Definition:
struct.h:156
MocBalance2Way2
#define MocBalance2Way2
Definition:
rename.h:151
controldef::UncoarsenTmr
timer UncoarsenTmr
Definition:
struct.h:230
errexit
#define errexit
Definition:
rename.h:379
DBG_TIME
#define DBG_TIME
Definition:
defs.h:154
controldef::RType
int RType
Definition:
struct.h:219
ASSERT
#define ASSERT(expr)
Definition:
macros.h:130
starttimer
#define starttimer(tmr)
Definition:
macros.h:53
Generated on Thu Oct 11 2018 12:23:26 for Hitmap 1.3 by
1.8.5