openPMD-api
 
Loading...
Searching...
No Matches
openPMD::auxiliary::BlockSlicer Class Referenceabstract

Abstract class to associate a thread with its local cuboid in the total cuboid. More...

#include <BlockSlicer.hpp>

Inheritance diagram for openPMD::auxiliary::BlockSlicer:
openPMD::auxiliary::OneDimensionalBlockSlicer

Public Member Functions

virtual std::pair< Offset, Extent > sliceBlock (Extent &totalExtent, int size, int rank)=0
 Associate the current thread with its cuboid.
 
virtual std::unique_ptr< BlockSlicerclone () const =0
 
virtual ~BlockSlicer ()=default
 This class will be derived from.
 

Detailed Description

Abstract class to associate a thread with its local cuboid in the total cuboid.

Member Function Documentation

◆ sliceBlock()

virtual std::pair< Offset, Extent > openPMD::auxiliary::BlockSlicer::sliceBlock ( Extent & totalExtent,
int size,
int rank )
pure virtual

Associate the current thread with its cuboid.

Parameters
totalExtentThe total extent of the cuboid.
sizeThe number of threads to be used (not greater than MPI size).
rankThe MPI rank.
Returns
A pair of the cuboid's offset and extent.

Implemented in openPMD::auxiliary::OneDimensionalBlockSlicer, and openPMD::OneDimensionalBlockSlicer.


The documentation for this class was generated from the following file: