openPMD-api
 
Loading...
Searching...
No Matches
openPMD::auxiliary::OneDimensionalBlockSlicer Class Reference
Inheritance diagram for openPMD::auxiliary::OneDimensionalBlockSlicer:
openPMD::auxiliary::BlockSlicer

Public Member Functions

 OneDimensionalBlockSlicer (Extent::value_type dim=0)
 
std::pair< Offset, Extent > sliceBlock (Extent &totalExtent, int size, int rank) override
 Associate the current thread with its cuboid.
 
virtual std::unique_ptr< BlockSlicerclone () const override
 
- Public Member Functions inherited from openPMD::auxiliary::BlockSlicer
virtual ~BlockSlicer ()=default
 This class will be derived from.
 

Static Public Member Functions

static std::pair< size_t, size_t > n_th_block_inside (size_t length, size_t rank, size_t size)
 

Public Attributes

Extent::value_type m_dim
 

Member Function Documentation

◆ clone()

std::unique_ptr< BlockSlicer > openPMD::auxiliary::OneDimensionalBlockSlicer::clone ( ) const
overridevirtual

◆ sliceBlock()

std::pair< Offset, Extent > openPMD::auxiliary::OneDimensionalBlockSlicer::sliceBlock ( Extent & totalExtent,
int size,
int rank )
overridevirtual

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.

Implements openPMD::auxiliary::BlockSlicer.


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