openPMD-api
Public Member Functions | List of all members
openPMD::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::BlockSlicer:
Inheritance graph
[legend]

Public Member Functions

virtual std::pair< Offset, Extent > sliceBlock (Extent &totalExtent, int size, int rank)=0
 Associate the current thread with its cuboid. More...
 
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::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::OneDimensionalBlockSlicer.


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