mt-Metis
Classes | Macros | Typedefs | Functions
ctrl.h File Reference

Type and function prototypes for the ctrl structure. More...

#include "base.h"

Go to the source code of this file.

Classes

struct  timers_type
 
struct  ctrl_type
 

Macros

#define ctrl_create   MTMETIS_ctrl_create
 
#define ctrl_setup   MTMETIS_ctrl_setup
 
#define ctrl_parse   MTMETIS_ctrl_parse
 
#define ctrl_free   MTMETIS_ctrl_free
 
#define ctrl_combine_timers   MTMETIS_ctrl_combine_timers
 
#define ser_ctrl_split   MTMETIS_ser_ctrl_split
 
#define ser_ctrl_rb   MTMETIS_ser_ctrl_rb
 
#define par_ctrl_split   MTMETIS_par_ctrl_split
 
#define par_ctrl_free   MTMETIS_par_ctrl_free
 
#define par_ctrl_parse   MTMETIS_par_ctrl_parse
 
#define par_ctrl_setup   MTMETIS_par_ctrl_setup
 
#define par_ctrl_rb   MTMETIS_par_ctrl_rb
 

Typedefs

typedef struct timers_type timers_type
 
typedef struct ctrl_type ctrl_type
 

Functions

ctrl_typectrl_create (void)
 Allocate and initialize a control structure. More...
 
void ctrl_setup (ctrl_type *ctrl, real_type *tpwgts, vtx_type nvtxs)
 Setup a control structure to partition a graph with a specified number of vertices. The structure should already be configured with nthreads and nparts. More...
 
int ctrl_parse (double const *options, ctrl_type **ctrl)
 Create a control structure using the specified set of options. More...
 
void ctrl_free (ctrl_type *ctrl)
 Free a control structure and its associated memory. More...
 
void ctrl_combine_timers (ctrl_type *ctrl, ctrl_type const *ctrl2)
 Combine the times of the two timers into the first. More...
 
void ser_ctrl_split (ctrl_type const *ctrl, vtx_type const *hnvtxs, ctrl_type **hctrls)
 Split the control structure serially for recursive bisection or nested dissection. More...
 
ctrl_typeser_ctrl_rb (ctrl_type *ctrl, pid_type const *offset)
 Create a new control for creating an edge separator. More...
 
ctrl_typepar_ctrl_split (ctrl_type const *ctrl, vtx_type nvtxs, pid_type nparts, dlthread_comm_t comm)
 Duplicate a control structure. More...
 
void par_ctrl_free (ctrl_type *ctrl)
 Free a control structure and its associated memory. More...
 
int par_ctrl_parse (double const *options, ctrl_type **r_ctrl, dlthread_comm_t comm)
 Parse a control structure options in parallel. More...
 
void par_ctrl_setup (ctrl_type *ctrl, real_type *tpwgts, vtx_type nvtxs)
 Setup a control structure in parallel. More...
 
ctrl_typepar_ctrl_rb (ctrl_type *ctrl, pid_type const *offset)
 Create a new control for creating an edge separator. More...
 
char const * trans_ptype_string (mtmetis_ptype_t type)
 
char const * trans_ctype_string (mtmetis_ctype_t type)
 
char const * trans_contype_string (mtmetis_contype_t type)
 
char const * trans_rtype_string (mtmetis_rtype_t type)
 
char const * trans_verbosity_string (mtmetis_verbosity_t type)
 
char const * trans_dtype_string (mtmetis_dtype_t type)
 
mtmetis_ptype_t trans_string_ptype (char const *str)
 
mtmetis_ctype_t trans_string_ctype (char const *str)
 
mtmetis_contype_t trans_string_contype (char const *str)
 
mtmetis_rtype_t trans_string_rtype (char const *str)
 
mtmetis_verbosity_t trans_string_verbosity (char const *str)
 
mtmetis_dtype_t trans_string_dtype (char const *str)
 

Detailed Description

Type and function prototypes for the ctrl structure.

Author
Dominique LaSalle lasal.nosp@m.le@c.nosp@m.s.umn.nosp@m..edu Copyright 2014, Regents of the University of Minnesota
Version
1
Date
2014-09-17

Function Documentation

void ctrl_combine_timers ( ctrl_type ctrl,
ctrl_type const *  ctrl2 
)

Combine the times of the two timers into the first.

Parameters
ctrlThe timer to recieve the combined times.
ctrl2The timer to combine times with.
ctrl_type* ctrl_create ( void  )

Allocate and initialize a control structure.

Returns
The new control structure.
void ctrl_free ( ctrl_type ctrl)

Free a control structure and its associated memory.

Parameters
ctrlThe control structure to free.
int ctrl_parse ( double const *  options,
ctrl_type **  ctrl 
)

Create a control structure using the specified set of options.

Parameters
optionsThe options specifying how to setup the ctrl.
ctrlA reference to the control structure to allocate and configure.
Returns
MTMETIS_SUCCESS if the options array is valid.
void ctrl_setup ( ctrl_type ctrl,
real_type *  tpwgts,
vtx_type  nvtxs 
)

Setup a control structure to partition a graph with a specified number of vertices. The structure should already be configured with nthreads and nparts.

Parameters
ctrlThe control structure to configure.
tpwgtsThe target partition weights for this control (can be NULL).
nvtxsThe number of vertices in the graph to partition.
void par_ctrl_free ( ctrl_type ctrl)

Free a control structure and its associated memory.

Parameters
ctrlThe control structure to free.
int par_ctrl_parse ( double const *  options,
ctrl_type **  r_ctrl,
dlthread_comm_t  comm 
)

Parse a control structure options in parallel.

Parameters
optionsThe options to parse.
r_ctrlA reference to the ctrl pointer.
commThe thread communicator for the current thread group.
Returns
MTMETIS_SUCCESS if the options are valid.
ctrl_type* par_ctrl_rb ( ctrl_type ctrl,
pid_type const *  offset 
)

Create a new control for creating an edge separator.

Parameters
ctrlThe control to parse options from.
offsetThe prefixsum of the number of partitions per half (lengh 3). This is an exclusive prefixsum so offset[0] = 0, and offset[2] = ctrl->nparts.
Returns
The new control.
void par_ctrl_setup ( ctrl_type ctrl,
real_type *  tpwgts,
vtx_type  nvtxs 
)

Setup a control structure in parallel.

Parameters
ctrlThe control structure.
tpwgtsThe target partition weights for this control (can be NULL).
nvtxsThe number of vertices in the graph.
ctrl_type* par_ctrl_split ( ctrl_type const *  ctrl,
vtx_type  nvtxs,
pid_type  nparts,
dlthread_comm_t  comm 
)

Duplicate a control structure.

Parameters
ctrlThe control structure to split.
nvtxsThe new number of starting vertices.
npartsThe new number of partitions.
commThe new thread communicator.
Returns
The duplicated contrl structure.
ctrl_type* ser_ctrl_rb ( ctrl_type ctrl,
pid_type const *  offset 
)

Create a new control for creating an edge separator.

Parameters
ctrlThe control to parse options from.
offsetThe prefixsum of the number of partitions per half (lengh 3). This is an exclusive prefixsum so offset[0] = 0, and offset[2] = ctrl->nparts.
Returns
The new control.
void ser_ctrl_split ( ctrl_type const *  ctrl,
vtx_type const *  hnvtxs,
ctrl_type **  hctrls 
)

Split the control structure serially for recursive bisection or nested dissection.

Parameters
ctrlThe base control to split.
hnvtxsThe number of vertices in each graph.
hctrlThe two resulting ctrls (output).