Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
limbo::algorithms::placement::GreedySearch< CallbackType > Class Template Reference

#include <GreedySearch.h>

Public Types

typedef CallbackType callback_type
 
typedef callback_type::node_type node_type
 
typedef callback_type::cost_type cost_type
 
typedef callback_type::row_type row_type
 
typedef
callback_type::site_coordinate_type 
site_coordinate_type
 
typedef
callback_type::node_vector_type 
node_vector_type
 node container for a single row
 
typedef
callback_type::node_fail_vector_type 
node_fail_vector_type
 
typedef
callback_type::row_vector_type 
row_vector_type
 
typedef gs_choose_type
< typename
row_vector_type::value_type >
::value_type 
row_value_type
 
typedef gs_choose_type
< typename
row_vector_type::value_type >
::const_value_type 
row_const_value_type
 
typedef gs_choose_type
< typename
node_vector_type::value_type >
::value_type 
node_value_type
 
typedef gs_choose_type
< typename
node_vector_type::value_type >
::const_value_type 
node_const_value_type
 

Public Member Functions

 GreedySearch (callback_type cbk=callback_type())
 
void operator() (node_fail_vector_type &vFailNode, int max_swap_cnt)
 
void run (node_fail_vector_type &vFailNode, int max_swap_cnt)
 
bool search_swap (node_value_type n, node_fail_vector_type &vFailNode, int swap_cnt)
 

Protected Member Functions

site_coordinate_type node_site_size_x (node_const_value_type n) const
 
site_coordinate_type node_site_gap_x (node_const_value_type n1, node_const_value_type n2) const
 
site_coordinate_type site_xl (node_const_value_type n) const
 
site_coordinate_type site_xh (node_const_value_type n) const
 

Protected Attributes

callback_type m_cbk
 a copiable callback_type is required
 

Detailed Description

template<typename CallbackType>
class limbo::algorithms::placement::GreedySearch< CallbackType >

core class to perform greedy search functions

Template Parameters
CallbackTypeprovides all the information needed

Definition at line 139 of file GreedySearch.h.

Constructor & Destructor Documentation

template<typename CallbackType >
limbo::algorithms::placement::GreedySearch< CallbackType >::GreedySearch ( callback_type  cbk = callback_type())
inline

constructor

Parameters
cbkcallback object

Definition at line 162 of file GreedySearch.h.

Member Function Documentation

template<typename CallbackType >
site_coordinate_type limbo::algorithms::placement::GreedySearch< CallbackType >::node_site_gap_x ( node_const_value_type  n1,
node_const_value_type  n2 
) const
inlineprotected
Parameters
n1node
n2node
Returns
gap in number of sites between nodes

Definition at line 299 of file GreedySearch.h.

template<typename CallbackType >
site_coordinate_type limbo::algorithms::placement::GreedySearch< CallbackType >::node_site_size_x ( node_const_value_type  n) const
inlineprotected
Parameters
nnode
Returns
width of node

Definition at line 292 of file GreedySearch.h.

template<typename CallbackType >
void limbo::algorithms::placement::GreedySearch< CallbackType >::operator() ( node_fail_vector_type &  vFailNode,
int  max_swap_cnt 
)
inline

API to run the algorithm

Parameters
vFailNodecontainer to store failed nodes
max_swap_cntone cell can swap with how many other cells

Definition at line 167 of file GreedySearch.h.

template<typename CallbackType >
void limbo::algorithms::placement::GreedySearch< CallbackType >::run ( node_fail_vector_type &  vFailNode,
int  max_swap_cnt 
)
inline

kernel function to run the algorithm

Parameters
vFailNodecontainer to store failed nodes
max_swap_cntone cell can swap with how many other cells

Definition at line 171 of file GreedySearch.h.

template<typename CallbackType >
bool limbo::algorithms::placement::GreedySearch< CallbackType >::search_swap ( node_value_type  n,
node_fail_vector_type &  vFailNode,
int  swap_cnt 
)
inline

node_map_type can be vector<list<node_type> > row_vector_type can be vector<row_type>

Parameters
nnode
vFailNodecontainer to store failed nodes
swap_cntnumber of swaps occurs

Definition at line 200 of file GreedySearch.h.

template<typename CallbackType >
site_coordinate_type limbo::algorithms::placement::GreedySearch< CallbackType >::site_xh ( node_const_value_type  n) const
inlineprotected
Parameters
nnode
Returns
right coordiate in sites

Definition at line 311 of file GreedySearch.h.

template<typename CallbackType >
site_coordinate_type limbo::algorithms::placement::GreedySearch< CallbackType >::site_xl ( node_const_value_type  n) const
inlineprotected
Parameters
nnode
Returns
left coordiate in sites

Definition at line 305 of file GreedySearch.h.


The documentation for this class was generated from the following file: