Isorropia: Partitioning, Load Balancing and more Version 3.0
Functions
Isorropia::Utils Namespace Reference

Utils is the namespace within the Isorropia namespace that defines general definitions of utilities that may be of use to any specific partitioner. More...

Functions

void create_comm_plan (int myPID, const std::vector< int > &all_proc_old_offsets, const std::vector< int > &all_proc_new_offsets, std::vector< int > &send_info, std::vector< int > &recv_info)
 Internal Isorropia implementation utility.
double cpu_time ()
 Return CPU time.

Detailed Description

Utils is the namespace within the Isorropia namespace that defines general definitions of utilities that may be of use to any specific partitioner.


Function Documentation

void Isorropia::Utils::create_comm_plan ( int  myPID,
const std::vector< int > &  all_proc_old_offsets,
const std::vector< int > &  all_proc_new_offsets,
std::vector< int > &  send_info,
std::vector< int > &  recv_info 
)

Internal Isorropia implementation utility.

Given a vector that specifies all processors' old or current offsets into a global element list, and another vector that specifies all processors' new or desired offsets into a global element list, fill a send_info and recv_info vector with data that can be unpacked/interpreted as follows.

while(i<send_info.size()) { send_info[i] == proc to send data to send_info[i+1] == starting offset of local elements to be sent send_info[i+2] == number of elements to send i += 3; }

while(i<recv_info.size()) { recv_info[i] == proc to recv from recv_info[i+1] == offset at which incoming elements will be stored recv_info[i+2] == number of incoming elements }

double Isorropia::Utils::cpu_time ( )

Return CPU time.

To measure an elapsed time, take the difference between two returned values.