SkelGIS
3.0
|
First specialization of the DDAG_impl class. More...
#include <ddag_impl.hpp>
Public Member Functions | |
DDAG_impl (const char *file) | |
Constructor of the DDAG_impl. | |
~DDAG_impl () | |
Destructor of the DDAG_impl. | |
unsigned int | getDimNode () |
get the number of nodes | |
unsigned int | getDimEdge () |
get the number of edges | |
unsigned int | getDimLoc () |
get the number of pure local nodes | |
unsigned int | getDimComm () |
get the number of communication nodes | |
unsigned int | getDimRoots () |
get the number of roots nodes | |
unsigned int | getDimLeafs () |
get the number of leafs nodes | |
unsigned int | getDimTorIn () |
get the number of elements to receive in | |
unsigned int | getDimTorOut () |
get the number of elements to receive out | |
unsigned int | getIndexNode (unsigned int ind) |
get the global index of a local node | |
unsigned int | getIndexEdge (unsigned int ind) |
get the global index of a local edge | |
unsigned int | getSrcNode (unsigned int r) |
to get the iterator rank on the source node of the index edge | |
unsigned int | getDstNode (unsigned int r) |
to get the iterator rank on the destination node of the index edge | |
std::vector< iterator_dag > | getInEdges (unsigned int r) |
to get a vector of iterator on input edges for the node at rank r | |
std::vector< iterator_dag > | getOutEdges (unsigned int r) |
to get a vector of iterator on output edges for the node at rank r | |
std::vector< iterator_dag > | getInNodes (unsigned int r) |
to get a vector of iterator on input nodes for the node at rank r | |
std::vector< iterator_dag > | getOutNodes (unsigned int r) |
to get a vector of iterator on output nodes for the node at rank r | |
unsigned int | getNbNodesToSend (unsigned int rank) |
to get the number of elements to send to a precised processor rank | |
unsigned int * | getNodesToSend (unsigned int rank) |
to fill a table with indexes to send to other processors | |
unsigned int | getNbEdgesToSend (unsigned int rank) |
to get the number of edges to send to a precised processor rank | |
unsigned int | getNbEdgesToSendIn (unsigned int rank) |
to get the number of edges to send in to a precised processor rank | |
unsigned int | getNbEdgesToSendOut (unsigned int rank) |
to get the number of edges to send out to a precised processor rank, those edges go inside the processor rank | |
unsigned int * | getEdgesToSend (unsigned int rank) |
to fill a table with indexes to send to other processors, those edges go outside the processor rank | |
unsigned int * | getEdgesToSendIn (unsigned int rank) |
to fill a table with indexes to send in to other processors | |
unsigned int * | getEdgesToSendOut (unsigned int rank) |
to fill a table with indexes to send out to other processors | |
unsigned int | getNbNodesToRecv (unsigned int rank) |
to get the number of elements to receive to a precised processor rank | |
unsigned int * | getNodesToRecv (unsigned int rank) |
to fill a table with indexes to receive to other processors | |
unsigned int | getNbEdgesToRecv (unsigned int rank) |
to get the number of edges to receive to a precised processor rank | |
unsigned int | getNbEdgesToRecvIn (unsigned int rank) |
to get the number of edges to receive in to a precised processor rank | |
unsigned int | getNbEdgesToRecvOut (unsigned int rank) |
to get the number of edges to receive out to a precised processor rank | |
unsigned int * | getEdgesToRecv (unsigned int rank) |
to fill a table with indexes to receive to other processors | |
unsigned int * | getEdgesToRecvIn (unsigned int rank) |
to fill a table with indexes to receive in to other processors | |
unsigned int * | getEdgesToRecvOut (unsigned int rank) |
to fill a table with indexes to receive out to other processors | |
Protected Member Functions | |
bool | find_position (unsigned int *table, unsigned int size, unsigned int element, unsigned int &position) |
find position tool | |
bool | find_position (unsigned int *table, unsigned int size, unsigned int element) |
find position tool | |
bool | find_from (unsigned int *table, unsigned int position1, unsigned int position2, unsigned int element) |
find from tool | |
unsigned int | max (unsigned a, unsigned b, unsigned c) |
get maximum value tool | |
void | is_visited (unsigned int index, unsigned int *visited, unsigned int *degcum_block, unsigned int *linked_blocks) |
recursively increment the number of time a subtree has been visited | |
unsigned int | all_edges_under (unsigned int index, unsigned int *degcum_block, unsigned int *linked_blocks, unsigned int *edge_block) |
recursively count the number of edges in a subtree | |
void | takeall (unsigned int index, unsigned int *edge_block, unsigned int *degcum_block, unsigned int *linked_blocks, unsigned int *taken, unsigned int &count, unsigned int cur_proc) |
Take all the subtree for the same processor. | |
void | verif (unsigned int *index, unsigned int *edge_b_loc, unsigned int size, unsigned int *degcum_block, unsigned int *linked_blocks, unsigned int *taken, unsigned int &count) |
to verify that no isolated edges are stuck | |
bool | dist (unsigned int mean_edges, unsigned int &edges_r, unsigned int *index, unsigned int *edge_b_loc, unsigned int size, unsigned int ideal, unsigned int *edge_block, unsigned int *degcum_block, unsigned int *linked_blocks, unsigned int *taken, unsigned int *edges_subtree, unsigned int &count, int &cur_proc) |
recursive function for distribution when a root has been chosen or when a leaf has been reached (so an additionnal root is chosen) | |
void | read (const char *file, unsigned int &dim_node_g, unsigned int &dim_edge_g, unsigned int *&src_nodes_g, unsigned int *&dst_nodes_g) |
Read the input DAG file .dot. | |
void | findRootsLeafs (unsigned int dim_node_g, unsigned int dim_edge_g, unsigned int *src_nodes_g, unsigned int *dst_nodes_g, unsigned int &dim_roots_g, unsigned int &dim_leafs_g, unsigned int *&roots_g, unsigned int *&leafs_g) |
Find roots and leafs of the global DDAG_impl. | |
void | globalDS (unsigned int dim_edge_g, unsigned int dim_node_g, unsigned int *src_nodes_g, unsigned int *dst_nodes_g, unsigned int *°cum_in_g, unsigned int *°cum_out_g, unsigned int *&neigh_out_g, unsigned int *&neigh_in_g, unsigned int *&edges_g, unsigned int *&edge_block, unsigned int &mean_edges, unsigned int &max_edges, unsigned int &b) |
Construction of the global DAG data structure. | |
void | dataDistr (unsigned int b, unsigned int *edges_g, unsigned int *edge_block, unsigned int *dst_nodes_g, unsigned int *degcum_out_g, unsigned int *°cum_block, unsigned int *&linked_blocks, unsigned int *&edges_subtree) |
Prepare data for distribution. | |
void | localSrcDstNodes (unsigned int b, unsigned int *taken, unsigned int *edge_block, unsigned int *src_nodes_g, unsigned int *dst_nodes_g, unsigned int *edges_g, unsigned int dim_roots_g, unsigned int dim_leafs_g, unsigned int *roots_g, unsigned int *leafs_g) |
Fill src_nodes and dst_nodes and construct temporary pure local indexes. | |
void | fillLocalDS (unsigned int b, unsigned int dim_edge_g, unsigned int *dst_nodes_g, unsigned int *src_nodes_g, unsigned int *edge_block, unsigned int *taken, unsigned int *degcum_out_t, unsigned int *degcum_in_t, unsigned int *edges_t_out, unsigned int *edges_t_in, unsigned int *neigh_out_t, unsigned int *neigh_in_t, unsigned int *roots_g, unsigned int *leafs_g, unsigned int dim_roots_g, unsigned int dim_leafs_g) |
Fill the local data structure DDAG_impl. | |
void | distribute (const char *file) |
Distribution. | |
void | init (const char *file) |
Initialization of the DDAG_impl. | |
Protected Attributes | |
unsigned int | dim_roots |
unsigned int | dim_leafs |
number of roots elements in the local DDAG_impl (global notion of roots) | |
unsigned int | dim_loc |
number of leafs elements int the local DDAG_impl (global notion of leafs) | |
unsigned int | dim_comm |
number of internal nodes without any communication | |
unsigned int | dim_node |
number of internal nodes with communications | |
unsigned int * | degcum_in |
number of nodes | |
unsigned int * | degcum_out |
unsigned int * | neigh_in |
unsigned int * | neigh_out |
unsigned int * | edges_out |
unsigned int * | edges_in |
unsigned int | dim_edge |
unsigned int * | src_nodes |
number of edges | |
unsigned int * | dst_nodes |
source node of each edge | |
unsigned int | dim_ind_ed |
destination node of each edge | |
unsigned int | dim_ind_no |
unsigned int * | indexes_nodes |
number of indexes for nodes and edges (with additionnal communication indexes) | |
unsigned int * | indexes_edges |
unsigned int | dim_tor_out |
unsigned int | dim_tor_in |
unsigned int | dim_tos_out |
unsigned int | dim_tos_in |
unsigned int * | degcum_tos |
unsigned int * | degcum_tos_in |
unsigned int * | degcum_tos_out |
unsigned int * | degcum_tor |
unsigned int * | degcum_tor_in |
unsigned int * | degcum_tor_out |
unsigned int * | edges_tos_in |
unsigned int * | edges_tos_out |
unsigned int * | nodes_tos |
unsigned int * | edges_tor_in |
unsigned int * | edges_tor_out |
unsigned int * | nodes_tor |
First specialization of the DDAG_impl class.
This is the more complex case where both nodes and edges have to be computed
Definition at line 35 of file ddag_impl.hpp.
skelgis::DDAG_impl< true, true >::DDAG_impl | ( | const char * | file | ) | [inline] |
Constructor of the DDAG_impl.
path | to the input .dot file |
Definition at line 1907 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::all_edges_under | ( | unsigned int | index, |
unsigned int * | degcum_block, | ||
unsigned int * | linked_blocks, | ||
unsigned int * | edge_block | ||
) | [inline, protected] |
recursively count the number of edges in a subtree
Is used to modify is_visited error
index | is the index of the root element of the subtree |
degcum_block | is the cumulative degrees for links between blocks of sister edges (equivalent of degcum_out for blocks) |
linked_blocks | is the associated table to degcum_block, it is the list of neighbor blocks |
edge_block | is the cumulative degrees for the number of edges in each block of sister edges |
Definition at line 254 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::dataDistr | ( | unsigned int | b, |
unsigned int * | edges_g, | ||
unsigned int * | edge_block, | ||
unsigned int * | dst_nodes_g, | ||
unsigned int * | degcum_out_g, | ||
unsigned int *& | degcum_block, | ||
unsigned int *& | linked_blocks, | ||
unsigned int *& | edges_subtree | ||
) | [inline, protected] |
Prepare data for distribution.
b | is the number of blocks in the global DAG |
edges_g | equivalent of edges_out and edges_in for the global DAG (no distinction) |
edge_block | cumulative degrees of the number of edges per block |
dst_nodes_g | is the list of destination nodes for each edge in the global DDAG_impl |
degcum_out_g | equivalent of degcum_out for the global DAG_impl |
degcum_block | is the cumulative degrees for links between blocks of sister edges (equivalent of degcum_out for blocks) |
linked_blocks | is the associated table to degcum_block, it is the list of neighbor blocks |
edges_subtree |
Definition at line 576 of file ddag_impl.hpp.
bool skelgis::DDAG_impl< true, true >::dist | ( | unsigned int | mean_edges, |
unsigned int & | edges_r, | ||
unsigned int * | index, | ||
unsigned int * | edge_b_loc, | ||
unsigned int | size, | ||
unsigned int | ideal, | ||
unsigned int * | edge_block, | ||
unsigned int * | degcum_block, | ||
unsigned int * | linked_blocks, | ||
unsigned int * | taken, | ||
unsigned int * | edges_subtree, | ||
unsigned int & | count, | ||
int & | cur_proc | ||
) | [inline, protected] |
recursive function for distribution when a root has been chosen or when a leaf has been reached (so an additionnal root is chosen)
mean_edges | is the mean of the number of edges in blocks, it is used for an error on the ideal number of edges |
edges_r | |
index | is the index where to start the recursive distribution |
edge_b_loc | |
size | |
ideal | is the ideal number of edges per processor |
taken | is the table to note which block is assigned to which processor |
edges_subtree | |
count | is the number of edges taken by the current processor cur_proc is the current processor |
Definition at line 330 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::distribute | ( | const char * | file | ) | [inline, protected] |
Distribution.
Read the input file, construct the global data structure, make the distribution and fill the local data structure
file | is the path to the .dot input file |
Definition at line 1473 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::fillLocalDS | ( | unsigned int | b, |
unsigned int | dim_edge_g, | ||
unsigned int * | dst_nodes_g, | ||
unsigned int * | src_nodes_g, | ||
unsigned int * | edge_block, | ||
unsigned int * | taken, | ||
unsigned int * | degcum_out_t, | ||
unsigned int * | degcum_in_t, | ||
unsigned int * | edges_t_out, | ||
unsigned int * | edges_t_in, | ||
unsigned int * | neigh_out_t, | ||
unsigned int * | neigh_in_t, | ||
unsigned int * | roots_g, | ||
unsigned int * | leafs_g, | ||
unsigned int | dim_roots_g, | ||
unsigned int | dim_leafs_g | ||
) | [inline, protected] |
Fill the local data structure DDAG_impl.
b | is the number of blocks in the global DAG_impl |
dim_edge_g | number of edges in the global DAG_impl |
dst_nodes_g | is the list of destination nodes for each edge in the global DDAG_impl |
src_nodes_g | is the list of source nodes for each edge in the global DDAG_impl |
edge_block | is the cumulative degrees for the number of edges in each block of sister edges |
taken | is the table to note which block is assigned to which processor |
degcum_out_t | is a temporary equivalent of degcum_out to keep the pure local version |
degcum_in_t | is a temporary equivalent of degcum_in to keep the pure local version |
edges_t_out | is a temporary equivalent of edges_out to keep the pure local version |
edges_t_in | is a temporary equivalent of edges_in to keep the pure local version |
neigh_out_t | is a temporary equivalent of neigh_out to keep the pure local version |
neigh_in_t | is a temporary equivalent of neigh_in to keep the pure local version |
roots_g | is the list of roots in the global DAG_impl |
leafs_g | is the list of leafs in the global DAG_impl |
dim_roots_g | is the number of roots in the global DAG_impl |
dim_leafs_g | is the number of leafs in the global DAG_impl |
Definition at line 856 of file ddag_impl.hpp.
bool skelgis::DDAG_impl< true, true >::find_from | ( | unsigned int * | table, |
unsigned int | position1, | ||
unsigned int | position2, | ||
unsigned int | element | ||
) | [inline, protected] |
find from tool
Search an element in a table with two positions between which to search
table | is the pointer table in which the element has to be searched |
position1 | is the index value in the table where to start the search |
position2 | is the index value in the table where to end the search (included) |
element | is the element value to search in table |
Definition at line 199 of file ddag_impl.hpp.
bool skelgis::DDAG_impl< true, true >::find_position | ( | unsigned int * | table, |
unsigned int | size, | ||
unsigned int | element, | ||
unsigned int & | position | ||
) | [inline, protected] |
find position tool
Find the position of element in table
table | is the pointer table in which the element has to be searched |
size | is the size of the table |
element | is the element value to search |
position | is a reference to the position found |
Definition at line 155 of file ddag_impl.hpp.
bool skelgis::DDAG_impl< true, true >::find_position | ( | unsigned int * | table, |
unsigned int | size, | ||
unsigned int | element | ||
) | [inline, protected] |
find position tool
Find the position of element in table but do not get the position value
table | is the pointer table in which the element has to be searched |
size | is the size of the table |
element | is the element value to search |
Definition at line 178 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::findRootsLeafs | ( | unsigned int | dim_node_g, |
unsigned int | dim_edge_g, | ||
unsigned int * | src_nodes_g, | ||
unsigned int * | dst_nodes_g, | ||
unsigned int & | dim_roots_g, | ||
unsigned int & | dim_leafs_g, | ||
unsigned int *& | roots_g, | ||
unsigned int *& | leafs_g | ||
) | [inline, protected] |
Find roots and leafs of the global DDAG_impl.
dim_node_g | is the number of nodes in the global DDAG_impl |
dim_edge_g | is the number of edges in the global DDAG_impl |
src_nodes_g | is the list of source nodes for each edge in the global DDAG_impl |
dst_nodes_g | is the list of destination nodes for each edge in the global DDAG_impl |
dim_roots_g | is the reference to the global number of roots elements in the global DDAG_impl |
dim_leafs_g | is the reference to the global number of leafs elements in the global DDAG_impl |
Definition at line 458 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimComm | ( | ) | [inline] |
get the number of communication nodes
Definition at line 1999 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimEdge | ( | ) | [inline] |
get the number of edges
Definition at line 1985 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimLeafs | ( | ) | [inline] |
get the number of leafs nodes
Definition at line 2013 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimLoc | ( | ) | [inline] |
get the number of pure local nodes
Definition at line 1992 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimNode | ( | ) | [inline] |
get the number of nodes
Definition at line 1978 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimRoots | ( | ) | [inline] |
get the number of roots nodes
Definition at line 2006 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimTorIn | ( | ) | [inline] |
get the number of elements to receive in
Definition at line 2020 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDimTorOut | ( | ) | [inline] |
get the number of elements to receive out
Definition at line 2027 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getDstNode | ( | unsigned int | r | ) | [inline] |
to get the iterator rank on the destination node of the index edge
Definition at line 2055 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getEdgesToRecv | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to receive to other processors
rank | is the rank of the processor to receive data to |
Definition at line 2265 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getEdgesToRecvIn | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to receive in to other processors
rank | is the rank of the processor to receive in data to |
Definition at line 2283 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getEdgesToRecvOut | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to receive out to other processors
rank | is the rank of the processor to receive out data to |
Definition at line 2299 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getEdgesToSend | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to send to other processors, those edges go outside the processor rank
rank | is the rank of the processor to send data to |
Definition at line 2167 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getEdgesToSendIn | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to send in to other processors
rank | is the rank of the processor to send in data to |
Definition at line 2185 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getEdgesToSendOut | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to send out to other processors
rank | is the rank of the processor to send out data to |
Definition at line 2201 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getIndexEdge | ( | unsigned int | ind | ) | [inline] |
get the global index of a local edge
Definition at line 2041 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getIndexNode | ( | unsigned int | ind | ) | [inline] |
get the global index of a local node
Definition at line 2034 of file ddag_impl.hpp.
std::vector<iterator_dag> skelgis::DDAG_impl< true, true >::getInEdges | ( | unsigned int | r | ) | [inline] |
to get a vector of iterator on input edges for the node at rank r
r | is the rank of the node to get in edges |
Definition at line 2063 of file ddag_impl.hpp.
std::vector<iterator_dag> skelgis::DDAG_impl< true, true >::getInNodes | ( | unsigned int | r | ) | [inline] |
to get a vector of iterator on input nodes for the node at rank r
r | is the rank of the node to get in nodes |
Definition at line 2091 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbEdgesToRecv | ( | unsigned int | rank | ) | [inline] |
to get the number of edges to receive to a precised processor rank
rank | is the rank of the processor to receive edges to |
Definition at line 2241 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbEdgesToRecvIn | ( | unsigned int | rank | ) | [inline] |
to get the number of edges to receive in to a precised processor rank
rank | is the rank of the processor to receive edges to |
Definition at line 2249 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbEdgesToRecvOut | ( | unsigned int | rank | ) | [inline] |
to get the number of edges to receive out to a precised processor rank
rank | is the rank of the processor to receive edges to |
Definition at line 2257 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbEdgesToSend | ( | unsigned int | rank | ) | [inline] |
to get the number of edges to send to a precised processor rank
rank | is the rank of the processor to send edges to |
Definition at line 2143 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbEdgesToSendIn | ( | unsigned int | rank | ) | [inline] |
to get the number of edges to send in to a precised processor rank
rank | is the rank of the processor to send edges to |
Definition at line 2151 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbEdgesToSendOut | ( | unsigned int | rank | ) | [inline] |
to get the number of edges to send out to a precised processor rank, those edges go inside the processor rank
rank | is the rank of the processor to send edges to |
Definition at line 2159 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbNodesToRecv | ( | unsigned int | rank | ) | [inline] |
to get the number of elements to receive to a precised processor rank
rank | is the rank of the processor to receive elements to |
Definition at line 2217 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getNbNodesToSend | ( | unsigned int | rank | ) | [inline] |
to get the number of elements to send to a precised processor rank
rank | is the rank of the processor to send elements to |
Definition at line 2119 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getNodesToRecv | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to receive to other processors
rank | is the rank of the processor to receive data to |
Definition at line 2225 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::getNodesToSend | ( | unsigned int | rank | ) | [inline] |
to fill a table with indexes to send to other processors
rank | is the rank of the processor to send data to |
Definition at line 2127 of file ddag_impl.hpp.
std::vector<iterator_dag> skelgis::DDAG_impl< true, true >::getOutEdges | ( | unsigned int | r | ) | [inline] |
to get a vector of iterator on output edges for the node at rank r
r | is the rank of the node to get out edges |
Definition at line 2077 of file ddag_impl.hpp.
std::vector<iterator_dag> skelgis::DDAG_impl< true, true >::getOutNodes | ( | unsigned int | r | ) | [inline] |
to get a vector of iterator on output nodes for the node at rank r
r | is the rank of the node to get out nodes |
Definition at line 2105 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::getSrcNode | ( | unsigned int | r | ) | [inline] |
to get the iterator rank on the source node of the index edge
Definition at line 2048 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::globalDS | ( | unsigned int | dim_edge_g, |
unsigned int | dim_node_g, | ||
unsigned int * | src_nodes_g, | ||
unsigned int * | dst_nodes_g, | ||
unsigned int *& | degcum_in_g, | ||
unsigned int *& | degcum_out_g, | ||
unsigned int *& | neigh_out_g, | ||
unsigned int *& | neigh_in_g, | ||
unsigned int *& | edges_g, | ||
unsigned int *& | edge_block, | ||
unsigned int & | mean_edges, | ||
unsigned int & | max_edges, | ||
unsigned int & | b | ||
) | [inline, protected] |
Construction of the global DAG data structure.
dim_edge_g | is the number of edges in the global DDAG_impl |
dim_node_g | is the number of nodes in the global DDAG_impl |
src_nodes_g | is the list of source nodes for each edge in the global DDAG_impl |
dst_nodes_g | is the list of destination nodes for each edge in the global DDAG_impl |
degcum_in_g | equivalent of degcum_in for the global DAG_impl |
degcum_out_g | equivalent of degcum_out for the global DAG_impl |
neigh_out_g | equivalent of the neigh_out for the global DAG_impl |
neigh_in_g | equivalent of the neigh_in for the global DAG_impl |
edges_g | equivalent of edges_out and edges_in for the global DAG_impl (no distinction needed) |
edge_block | cumulative degrees of the number of edges per block |
Definition at line 502 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::init | ( | const char * | file | ) | [inline, protected] |
Initialization of the DDAG_impl.
file | is the path to the .dot input file |
Definition at line 1879 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::is_visited | ( | unsigned int | index, |
unsigned int * | visited, | ||
unsigned int * | degcum_block, | ||
unsigned int * | linked_blocks | ||
) | [inline, protected] |
recursively increment the number of time a subtree has been visited
Is used to count the number of total edges under a subtree
index | is the index of the root element of the subtree |
visited | is the table to increment for the subtree |
degcum_block | is the cumulative degrees for links between blocks of sister edges (equivalent of degcum_out for blocks) |
linked_blocks | is the associated table to degcum_block, it is the list of neighbor blocks |
Definition at line 235 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::localSrcDstNodes | ( | unsigned int | b, |
unsigned int * | taken, | ||
unsigned int * | edge_block, | ||
unsigned int * | src_nodes_g, | ||
unsigned int * | dst_nodes_g, | ||
unsigned int * | edges_g, | ||
unsigned int | dim_roots_g, | ||
unsigned int | dim_leafs_g, | ||
unsigned int * | roots_g, | ||
unsigned int * | leafs_g | ||
) | [inline, protected] |
Fill src_nodes and dst_nodes and construct temporary pure local indexes.
b | is the number of blocks in the global DAG |
taken | is the table to note which block is assigned to which processor |
edge_block | is the cumulative degrees for the number of edges in each block of sister edges |
src_nodes_g | is the list of source nodes for each edge in the global DDAG_impl |
dst_nodes_g | is the list of destination nodes for each edge in the global DDAG_impl |
edges_g | equivalent of edges_out and edges_in for the global DAG (no distinction) |
dim_roots_g | is the number of roots in the global DAG_impl |
dim_leafs_g | is the number of leafs in the global DAG_impl |
roots_g | is the list of roots in the global DAG_impl |
leafs_g | is the list of leafs in the global DAG_impl |
Definition at line 656 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::max | ( | unsigned | a, |
unsigned | b, | ||
unsigned | c | ||
) | [inline, protected] |
get maximum value tool
search the minimum value between three values
a | is the first value |
b | is the second value |
c | is the third value |
Definition at line 219 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::read | ( | const char * | file, |
unsigned int & | dim_node_g, | ||
unsigned int & | dim_edge_g, | ||
unsigned int *& | src_nodes_g, | ||
unsigned int *& | dst_nodes_g | ||
) | [inline, protected] |
Read the input DAG file .dot.
file | is the path to the file to read |
dim_node_g | is the number of nodes in the global DDAG_impl |
dim_edge_g | is the number of edges in the global DDAG_impl |
src_nodes_g | is the list of source nodes for each edge in the global DDAG_impl |
dst_nodes_g | is the list of destination nodes for each edge in the global DDAG_impl |
Definition at line 430 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::takeall | ( | unsigned int | index, |
unsigned int * | edge_block, | ||
unsigned int * | degcum_block, | ||
unsigned int * | linked_blocks, | ||
unsigned int * | taken, | ||
unsigned int & | count, | ||
unsigned int | cur_proc | ||
) | [inline, protected] |
Take all the subtree for the same processor.
Used in the distribution of the DDAG_impl, if the number of edges in the subtree < ideal take it entirely
index | is the index of the root element of the subtree |
edge_block | is the cumulative degrees for the number of edges in each block of sister edges |
degcum_block | is the cumulative degrees for links between blocks of sister edges (equivalent of degcum_out for blocks) |
linked_blocks | is the associated table to degcum_block, it is the list of neighbor blocks |
taken | is the table to note to which processor is assigned each block |
count | is the reference to the count of edges for the current processor |
cur_proc | is the current processor index |
Definition at line 277 of file ddag_impl.hpp.
void skelgis::DDAG_impl< true, true >::verif | ( | unsigned int * | index, |
unsigned int * | edge_b_loc, | ||
unsigned int | size, | ||
unsigned int * | degcum_block, | ||
unsigned int * | linked_blocks, | ||
unsigned int * | taken, | ||
unsigned int & | count | ||
) | [inline, protected] |
to verify that no isolated edges are stuck
When the ideal number of edges is reached, verify that no isolated edges are stuck in the subtree taken by the processor
index | is the index of the root element of the subtree |
edge_b_loc | |
degcum_block | is the cumulative degrees for links between blocks of sister edges (equivalent of degcum_out for blocks) |
linked_blocks | is the associated table to degcum_block, it is the list of neighbor blocks |
taken | is the table to note to which processor is assigned each block |
count | is the reference to the count of edges for the current processor |
Definition at line 301 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_in [protected] |
number of nodes
< cumulative degrees for inside neighbors nodes and edges foreach node you can get the number of inside nodes and inside edges (same) neighbors cumulative degrees for outside neighbors nodes and edges foreach node you can get the number of outside nodes and inside edges (same) neighbors
Definition at line 55 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_out [protected] |
associated table to degcum_in This table is the list of input neighbors nodes indexes for each node of the local DDAG_impl
Definition at line 58 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_tor [protected] |
For each processor of the current MPI execution, it represents the cumulative degrees of the number of input elements to receive for now difference between input and output is made for edges only. It is needed for DPMap_edges on pointers types
Definition at line 112 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_tor_in [protected] |
For each processor of the current MPI execution, it represents the cumulative degrees of the number of output elements to receive for now difference between input and output is made for edges only. It is needed for DPMap_edges on pointers types
Definition at line 115 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_tor_out [protected] |
associated table to degcum_tos for edges This table is the list of edges local indexes to send to each other processor
Definition at line 118 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_tos [protected] |
For each processor of the current MPI execution, it represents the cumulative degrees of the number of input elements to send for now difference between input and output is made for edges only. It is needed for DPMap_edges on pointers types
Definition at line 104 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_tos_in [protected] |
For each processor of the current MPI execution, it represents the cumulative degrees of the number of output elements to send for now difference between input and output is made for edges only. It is needed for DPMap_edges on pointers types
Definition at line 107 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::degcum_tos_out [protected] |
For each processor of the current MPI execution, it represents the cumulative degrees of the number of output and input elements to receive
Definition at line 110 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::dim_loc [protected] |
number of leafs elements int the local DDAG_impl (global notion of leafs)
< As distribution is not perfect, especially for huge DDAG_impl, it is important to make an overlap of communications by local computations For this reason pure local elements (except roots and leafs) are distinguished from elements that need communications
Definition at line 46 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::dim_roots [protected] |
< to manage physical border physical border in DDAG_impl for scientific simulations are leafs and roots of the global DDAG_impl
Definition at line 42 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::dim_tor_in [protected] |
Number of elements to send : outputs and inputs elements
Definition at line 99 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::dim_tor_out [protected] |
< Number of elements to receive : outputs and inputs elements
Definition at line 99 of file ddag_impl.hpp.
unsigned int skelgis::DDAG_impl< true, true >::dim_tos_in [protected] |
For each processor of the current MPI execution, it represents the cumulative degrees of the number of output and input elements to send
Definition at line 101 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::edges_out [protected] |
associated table to degcum_out This table is the list of output neighbors edges indexes for each node of the local DDAG_impl
Definition at line 67 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::edges_tor_in [protected] |
< associated table to degcum_tor_in for edges This table is the list of edges local indexes to receive in from each other processor associated table to degcum_tor_out for edges This table is the list of edges local indexes to receive out from each other processor
Definition at line 137 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::edges_tor_out [protected] |
associated table to degcum_tos for nodes This table is the list of nodes local indexes to receive to each other processor
Definition at line 140 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::edges_tos_in [protected] |
< associated table to degcum_tos_in for edges This table is the list of edges to send that goes in another processor, local indexes to send to each other processor associated table to degcum_tos_out for edges This table is the list of edges to send that goes out of another processor, local indexes to send to each other processor
Definition at line 125 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::edges_tos_out [protected] |
associated table to degcum_tos for nodes This table is the list of nodes local indexes to send to each other processor
Definition at line 128 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::indexes_nodes [protected] |
number of indexes for nodes and edges (with additionnal communication indexes)
< Associations between new local nodes indexes values and nodes indexes of the global DAG Order of the new nodes indexes are very important for a transparent iteration on local elements All local nodes tables use those new indexes (neighborhood etc) indexes are stored this way :
|| pure local elements | elements with communications | leafs | roots | comunicated elements from other processors IN then OUT || Associations between new local edges indexes values and edges indexes of the global DAG Edges are indexed following the nodes indexes output edges of Node 0 are indexed from 0 to degcum_out[0] output edges of Node k are indexed from degcum_out[k-1] to degcum_out[k]
Definition at line 89 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::neigh_in [protected] |
associated table to degcum_out This table is the list of output neighbors nodes indexes for each node of the local DDAG_impl
Definition at line 61 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::neigh_out [protected] |
associated table to degcum_in This table is the list of input neighbors edges indexes for each node of the local DDAG_impl
Definition at line 64 of file ddag_impl.hpp.
unsigned int* skelgis::DDAG_impl< true, true >::nodes_tos [protected] |
associated table to degcum_tor for edges This table is the list of edges local indexes to receive to each other processor
Definition at line 131 of file ddag_impl.hpp.