Synchronizer for DistributedNDArray.
More...
#include <TNL/Containers/DistributedNDArraySynchronizer.h>
|
enum class | AsyncPolicy { synchronous
, deferred
, threadpool
, async
} |
|
using | RequestsVector = std::vector< MPI_Request > |
|
|
void | allocateHelper () |
|
void | copyHelper (bool to_buffer, SyncDirection mask) |
|
|
static int | countDimensionsWithOverlap (const DistributedNDArrayView &array_view) |
|
template<std::size_t order> |
static int | getDimensionWithOverlap (const DistributedNDArrayView &array_view) |
|
static void | setCudaStream (Backend::LaunchConfiguration &launch_config, Backend::stream_t stream) |
|
template<typename LaunchConfiguration > |
static void | setCudaStream (LaunchConfiguration &launch_config, Backend::stream_t stream) |
|
template<typename
DistributedNDArray>
class TNL::Containers::DistributedNDArraySynchronizer< DistributedNDArray >
Synchronizer for DistributedNDArray.
◆ setBufferOffsets()
Sets the send and receive offsets for all buffer objects.
This is primarily an internal function, but applications that require special communication patterns (e.g. the A-A pattern in LBM) can use it to adjust the behavior.
- Parameters
-
shift | determines by how many cells the offsets are shifted in the direction configured for the buffer. |
◆ setSynchronizationPattern()
Set the communication pattern between neighbors during data synchronization.
- Template Parameters
-
Q | is the number of elements in pattern. |
- Parameters
-
pattern | is the synchronization pattern (array of directions in which the data will be sent). It must be consistent with the partitioning of the distributed array. |
◆ synchronize() [1/2]
Synchronizes data in array distributed among MPI ranks.
This method is not thread-safe - only the thread which created and "owns" the instance of this object can call this method.
Also note that this method must not be called again until the previous asynchronous operation has finished.
- Parameters
-
policy | determines the async policy used by the synchronizer. |
array | is the distributed array to be synchronized. |
mask | can be used to suppress specific directions from the pattern set with setSynchronizationPattern (useful e.g. for the lattice Boltzmann method). |
◆ synchronize() [2/2]
Synchronizes data in array distributed among MPI ranks.
- Parameters
-
array | is the distributed array to be synchronized. |
mask | can be used to suppress specific directions from the pattern set with setSynchronizationPattern (useful e.g. for the lattice Boltzmann method). |
The documentation for this class was generated from the following file:
- src/TNL/Containers/DistributedNDArraySynchronizer.h