Brick Library 0.1
Performance-portable stencil datalayout & codegen
Loading...
Searching...
No Matches
Classes | Functions | Variables
array-mpi.h File Reference

Reference MPI communication with arrays. More...

#include "brick-mpi.h"
#include <mpi.h>
Include dependency graph for array-mpi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ArrExPack
 

Functions

void elemcpy (bElem *dst, const bElem *src, unsigned long size)
 
template<unsigned dim>
bElempack (bElem *arr, BitSet neighbor, bElem *buffer_out, const std::vector< unsigned long > &arrstride, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
template<>
bElempack< 1 > (bElem *arr, BitSet neighbor, bElem *buffer_out, const std::vector< unsigned long > &arrstride, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
template<unsigned dim>
bElemunpack (bElem *arr, BitSet neighbor, bElem *buffer_recv, const std::vector< unsigned long > &arrstride, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
template<>
bElemunpack< 1 > (bElem *arr, BitSet neighbor, bElem *buffer_recv, const std::vector< unsigned long > &arrstride, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
unsigned evalsize (BitSet region, const std::vector< long > &dimlist, const std::vector< long > &ghost, bool inner=true)
 
template<unsigned dim>
void exchangeArr (bElem *arr, const MPI_Comm &comm, std::unordered_map< uint64_t, int > &rank_map, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
MPI_Datatype pack_type (BitSet neighbor, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
MPI_Datatype unpack_type (BitSet neighbor, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
template<unsigned dim>
void exchangeArrPrepareTypes (std::unordered_map< uint64_t, MPI_Datatype > &stypemap, std::unordered_map< uint64_t, MPI_Datatype > &rtypemap, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 
template<unsigned dim>
void exchangeArrTypes (bElem *arr, const MPI_Comm &comm, std::unordered_map< uint64_t, int > &rank_map, std::unordered_map< uint64_t, MPI_Datatype > &stypemap, std::unordered_map< uint64_t, MPI_Datatype > &rtypemap)
 
template<unsigned dim>
void exchangeArrAll (std::vector< ArrExPack > arr, const MPI_Comm &comm, const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost)
 

Variables

std::vector< bElem * > arr_buffers_out
 
std::vector< bElem * > arr_buffers_recv
 

Detailed Description

Reference MPI communication with arrays.

This includes packing/unpacking and communication with MPI_Types

Function Documentation

◆ elemcpy()

void elemcpy ( bElem dst,
const bElem src,
unsigned long  size 
)
inline

OpenMP-enabled copy kernel

Parameters
dstdestination
srcsource
sizein number of bElem

◆ evalsize()

unsigned evalsize ( BitSet  region,
const std::vector< long > &  dimlist,
const std::vector< long > &  ghost,
bool  inner = true 
)
inline
Here is the call graph for this function:

◆ exchangeArr()

template<unsigned dim>
void exchangeArr ( bElem arr,
const MPI_Comm &  comm,
std::unordered_map< uint64_t, int > &  rank_map,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
Here is the call graph for this function:

◆ exchangeArrAll()

template<unsigned dim>
void exchangeArrAll ( std::vector< ArrExPack arr,
const MPI_Comm &  comm,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
Here is the call graph for this function:

◆ exchangeArrPrepareTypes()

template<unsigned dim>
void exchangeArrPrepareTypes ( std::unordered_map< uint64_t, MPI_Datatype > &  stypemap,
std::unordered_map< uint64_t, MPI_Datatype > &  rtypemap,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
Here is the call graph for this function:

◆ exchangeArrTypes()

template<unsigned dim>
void exchangeArrTypes ( bElem arr,
const MPI_Comm &  comm,
std::unordered_map< uint64_t, int > &  rank_map,
std::unordered_map< uint64_t, MPI_Datatype > &  stypemap,
std::unordered_map< uint64_t, MPI_Datatype > &  rtypemap 
)
Here is the call graph for this function:

◆ pack()

template<unsigned dim>
bElem * pack ( bElem arr,
BitSet  neighbor,
bElem buffer_out,
const std::vector< unsigned long > &  arrstride,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
inline
Here is the call graph for this function:

◆ pack< 1 >()

template<>
bElem * pack< 1 > ( bElem arr,
BitSet  neighbor,
bElem buffer_out,
const std::vector< unsigned long > &  arrstride,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
inline
Here is the call graph for this function:

◆ pack_type()

MPI_Datatype pack_type ( BitSet  neighbor,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
inline
Here is the call graph for this function:

◆ unpack()

template<unsigned dim>
bElem * unpack ( bElem arr,
BitSet  neighbor,
bElem buffer_recv,
const std::vector< unsigned long > &  arrstride,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
inline
Here is the call graph for this function:

◆ unpack< 1 >()

template<>
bElem * unpack< 1 > ( bElem arr,
BitSet  neighbor,
bElem buffer_recv,
const std::vector< unsigned long > &  arrstride,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
inline
Here is the call graph for this function:

◆ unpack_type()

MPI_Datatype unpack_type ( BitSet  neighbor,
const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost 
)
inline
Here is the call graph for this function:

Variable Documentation

◆ arr_buffers_out

std::vector<bElem *> arr_buffers_out
extern

◆ arr_buffers_recv

std::vector<bElem *> arr_buffers_recv
extern