DistDir
Functions
Exchange

Functions

t_exchangernew_exchanger (t_map *map, MPI_Datatype type, distdir_hardware hw)
 Create a new t_exchanger structure. More...
 
void exchanger_go (t_exchanger *exchanger, void *src_data, void *dst_data)
 Arbitrary exchange given a map. More...
 
void exchanger_go_with_transform (t_exchanger *exchanger, void *src_data, void *dst_data, int *transform_src, int *transform_dst)
 Arbitrary exchange given a map with transformation of memory layout. More...
 
void delete_exchanger (t_exchanger *exchanger)
 Clean memory of a t_exchanger structure. More...
 

Detailed Description

User interface for the exchange between MPI ranks based on a provided t_map object and an MPI_Datatype

Function Documentation

◆ delete_exchanger()

void delete_exchanger ( t_exchanger exchanger)

Clean memory of a t_exchanger structure.

Free all the memory of a t_exchanger structure

Parameters
[in]exchangerpointer to t_exchanger structure

◆ exchanger_go()

void exchanger_go ( t_exchanger exchanger,
void *  src_data,
void *  dst_data 
)

Arbitrary exchange given a map.

Execute the MPI exchange given a previously generated exchanger. The source and destination buffers contain the data before and after the exchange

Parameters
[in]exchangerpointer to a t_exchanger structure
[in]src_datapointer to the data to be sent
[in]dst_datapointer to the data to be received

◆ exchanger_go_with_transform()

void exchanger_go_with_transform ( t_exchanger exchanger,
void *  src_data,
void *  dst_data,
int *  transform_src,
int *  transform_dst 
)

Arbitrary exchange given a map with transformation of memory layout.

Execute the MPI exchange given a previously generated exchanger. The source and destination buffers contain the data before and after the exchange. A transformation array can be provided for source and destination.

Parameters
[in]exchangerpointer to a t_exchanger structure
[in]src_datapointer to the data to be sent
[in]dst_datapointer to the data to be received
[in]transform_srcarray of indices to define a memory layout transformation of the src_data
[in]transform_dstarray of indices to define a memory layout transformation of the dst_data

◆ new_exchanger()

t_exchanger* new_exchanger ( t_map map,
MPI_Datatype  type,
distdir_hardware  hw 
)

Create a new t_exchanger structure.

Create an exchanger given a map object and a datatype

Parameters
[in]mappointer to a t_map structure
[in]typetype of the data in the form of MPI datatype
[in]hwhardware location of the data on the MPI process