openPMD-api
 
Loading...
Searching...
No Matches
PyStrategy Struct Reference
Inheritance diagram for PyStrategy:
openPMD::chunk_assignment::Strategy ClonableTrampoline< chunk_assignment::Strategy, PyStrategy >

Public Member Functions

chunk_assignment::Assignment assign (chunk_assignment::PartialAssignment assignment, chunk_assignment::RankMeta const &in, chunk_assignment::RankMeta const &out, size_t my_rank, size_t num_ranks) override
 Assign chunks to be loaded to reading processes.
 
std::unique_ptr< Strategy > clone () const override
 
- Public Member Functions inherited from openPMD::chunk_assignment::Strategy
Assignment assign (ChunkTable chunkTable, RankMeta const &in, RankMeta const &out, size_t my_rank, size_t num_ranks)
 Assign chunks to be loaded to reading processes.
 
- Public Member Functions inherited from ClonableTrampoline< chunk_assignment::Strategy, PyStrategy >
py::object get_python_handle () const
 
Res call_virtual (std::string const &nameOfPythonMethod, Args &&...args)
 
std::unique_ptr< chunk_assignment::Strategyclone_impl () const
 

Additional Inherited Members

- Public Attributes inherited from ClonableTrampoline< chunk_assignment::Strategy, PyStrategy >
std::shared_ptr< py::object > m_originalInstance
 

Member Function Documentation

◆ assign()

chunk_assignment::Assignment PyStrategy::assign ( chunk_assignment::PartialAssignment partialAssignment,
chunk_assignment::RankMeta const & in,
chunk_assignment::RankMeta const & out,
size_t my_rank,
size_t num_ranks )
inlineoverridevirtual

Assign chunks to be loaded to reading processes.

To be defined by implementors.

Parameters
partialAssignmentTwo chunktables, one of unassigned chunks and one of chunks that might have already been assigned previously. Merge the unassigned chunks into the partially assigned table.
inMeta information on writing processes, e.g. hostnames.
outMeta information on reading processes, e.g. hostnames.
my_rankRank identifier for the current process. Will be considered by some distribution strategies that may be called for only a subselection of the data space (e.g. for distributing data within processes on the same compute node in a cluster).
num_ranksNumber of processes among which chunks are to be distributed. Will be considered by some distribution strategies that may be called for only a subselection of the data space (e.g. for distributing data within processes on the same compute node in a cluster).
Returns
A table that assigns chunks to reading processes. Chunks are sorted by the destination process ID (MPI rank). Distribution strategies will in general only need to fill the chunks for the current (calling) process ID, but some (such as RoundRobin) will fill the information for other processes as well.

Implements openPMD::chunk_assignment::Strategy.

◆ clone()

std::unique_ptr< Strategy > PyStrategy::clone ( ) const
inlinenodiscardoverridevirtual

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