VTK  9.3.20240327
Public Member Functions | List of all members
vtkPPixelTransfer Class Reference

class to handle inter-process communication of pixel data from non-contiguous regions of a shared index space. More...

#include <vtkPPixelTransfer.h>

Inheritance diagram for vtkPPixelTransfer:
[legend]
Collaboration diagram for vtkPPixelTransfer:
[legend]

Public Member Functions

 vtkPPixelTransfer ()
 
 vtkPPixelTransfer (int srcRank, const vtkPixelExtent &srcWholeExt, const vtkPixelExtent &srcExt, int destRank, const vtkPixelExtent &destWholeExt, const vtkPixelExtent &destExt, int id=0)
 Initialize a transaction from sub extent of source to sub extent of dest, where the subsets are different. More...
 
 vtkPPixelTransfer (int srcRank, const vtkPixelExtent &srcWholeExt, const vtkPixelExtent &targetExt, int destRank, const vtkPixelExtent &destWholeExt, int id)
 Initialize a transaction from sub extent of source to sub extent of dest, where the subsets are the same. More...
 
 vtkPPixelTransfer (int srcRank, int destRank, const vtkPixelExtent &wholeExt, const vtkPixelExtent &targetExt, int id=0)
 Initialize a transaction from sub extent of source to sub extent of dest, both the whole and the subsets are the same. More...
 
 vtkPPixelTransfer (int srcRank, int destRank, const vtkPixelExtent &ext, int id=0)
 Initialize a transaction from sub extent of source to sub extent of dest, both the whole and the subsets are the same. More...
 
 vtkPPixelTransfer (int srcRank, const vtkPixelExtent &srcWholeExt, int destRank, const vtkPixelExtent &destWholeExt, int id=0)
 Initialize a transaction from whole extent of source to whole extent of dest, where source and destination have different whole extents. More...
 
 vtkPPixelTransfer (const vtkPixelExtent &srcWholeExt, const vtkPixelExtent &srcExt, const vtkPixelExtent &destWholeExt, const vtkPixelExtent &destExt)
 Initialize a transaction from sub extent of source to sub extent of dest, where the subsets are different. More...
 
 ~vtkPPixelTransfer ()=default
 
void SetSourceRank (int rank)
 Set/Get the MPI rank of source and destination processes. More...
 
int GetSourceRank () const
 
void SetDestinationRank (int rank)
 
int GetDestinationRank () const
 
bool Sender (int rank) const
 Tests to determine a given rank's role in this transaction. More...
 
bool Receiver (int rank) const
 
bool Local (int rank) const
 
void SetSourceWholeExtent (vtkPixelExtent &srcExt)
 Set/Get the source extent. More...
 
vtkPixelExtentGetSourceWholeExtent ()
 
const vtkPixelExtentGetSourceWholeExtent () const
 
void SetSourceExtent (vtkPixelExtent &srcExt)
 Set/Get the source extent. More...
 
vtkPixelExtentGetSourceExtent ()
 
const vtkPixelExtentGetSourceExtent () const
 
void SetDestinationWholeExtent (vtkPixelExtent &destExt)
 Set/get the destination extent. More...
 
vtkPixelExtentGetDestinationWholeExtent ()
 
const vtkPixelExtentGetDestinationWholeExtent () const
 
void SetDestinationExtent (vtkPixelExtent &destExt)
 Set/get the destination extent. More...
 
vtkPixelExtentGetDestinationExtent ()
 
const vtkPixelExtentGetDestinationExtent () const
 
void SetTransactionId (int id)
 Set/get the transaction id. More...
 
int GetTransactionId () const
 
void SetUseBlockingSend (int val)
 Enable/diasable non-blocking communication. More...
 
int GetUseBlockingSend () const
 
void SetUseBlockingRecv (int val)
 
int GetUseBlockingRecv () const
 
template<typename SOURCE_TYPE , typename DEST_TYPE >
int Execute (MPI_Comm comm, int rank, int nComps, SOURCE_TYPE *srcData, DEST_TYPE *destData, std::vector< MPI_Request > &reqs, std::deque< MPI_Datatype > &types, int tag)
 Transfer data from source to destination. More...
 
int Execute (MPI_Comm comm, int rank, int nComps, int srcType, void *srcData, int destType, void *destData, std::vector< MPI_Request > &reqs, std::deque< MPI_Datatype > &types, int tag)
 Transfer data from source to destination. More...
 
int Blit (int nComps, int srcType, void *srcData, int destType, void *destData)
 Block transfer for local memory to memory transfers, without using mpi. More...
 
- Public Member Functions inherited from vtkPixelTransfer
 vtkPixelTransfer ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from vtkPixelTransfer
static int Blit (const vtkPixelExtent &ext, int nComps, int srcType, void *srcData, int destType, void *destData)
 for memory to memory transfers. More...
 
static int Blit (const vtkPixelExtent &srcWhole, const vtkPixelExtent &srcSubset, const vtkPixelExtent &destWhole, const vtkPixelExtent &destSubset, int nSrcComps, int srcType, void *srcData, int nDestComps, int destType, void *destData)
 for memory to memory transfers. More...
 
template<typename SOURCE_TYPE , typename DEST_TYPE >
static int Blit (const vtkPixelExtent &srcWhole, const vtkPixelExtent &srcSubset, const vtkPixelExtent &destWhole, const vtkPixelExtent &destSubset, int nSrcComps, SOURCE_TYPE *srcData, int nDestComps, DEST_TYPE *destData)
 for local memory to memory transfers More...
 

Detailed Description

class to handle inter-process communication of pixel data from non-contiguous regions of a shared index space.

For example copying a subset of one image to a subset of another. The class can be used for purely local(no MPI) non-contigious data transfers by setting the source and destination ranks to the same id. In that case memcpy is used.

See also
vtkPixelExtent

Definition at line 36 of file vtkPPixelTransfer.h.

Constructor & Destructor Documentation

◆ vtkPPixelTransfer() [1/7]

vtkPPixelTransfer::vtkPPixelTransfer ( )
inline

Definition at line 39 of file vtkPPixelTransfer.h.

◆ vtkPPixelTransfer() [2/7]

vtkPPixelTransfer::vtkPPixelTransfer ( int  srcRank,
const vtkPixelExtent srcWholeExt,
const vtkPixelExtent srcExt,
int  destRank,
const vtkPixelExtent destWholeExt,
const vtkPixelExtent destExt,
int  id = 0 
)
inline

Initialize a transaction from sub extent of source to sub extent of dest, where the subsets are different.

Definition at line 51 of file vtkPPixelTransfer.h.

◆ vtkPPixelTransfer() [3/7]

vtkPPixelTransfer::vtkPPixelTransfer ( int  srcRank,
const vtkPixelExtent srcWholeExt,
const vtkPixelExtent targetExt,
int  destRank,
const vtkPixelExtent destWholeExt,
int  id 
)
inline

Initialize a transaction from sub extent of source to sub extent of dest, where the subsets are the same.

Definition at line 69 of file vtkPPixelTransfer.h.

◆ vtkPPixelTransfer() [4/7]

vtkPPixelTransfer::vtkPPixelTransfer ( int  srcRank,
int  destRank,
const vtkPixelExtent wholeExt,
const vtkPixelExtent targetExt,
int  id = 0 
)
inline

Initialize a transaction from sub extent of source to sub extent of dest, both the whole and the subsets are the same.

Definition at line 87 of file vtkPPixelTransfer.h.

◆ vtkPPixelTransfer() [5/7]

vtkPPixelTransfer::vtkPPixelTransfer ( int  srcRank,
int  destRank,
const vtkPixelExtent ext,
int  id = 0 
)
inline

Initialize a transaction from sub extent of source to sub extent of dest, both the whole and the subsets are the same.

Definition at line 105 of file vtkPPixelTransfer.h.

◆ vtkPPixelTransfer() [6/7]

vtkPPixelTransfer::vtkPPixelTransfer ( int  srcRank,
const vtkPixelExtent srcWholeExt,
int  destRank,
const vtkPixelExtent destWholeExt,
int  id = 0 
)
inline

Initialize a transaction from whole extent of source to whole extent of dest, where source and destination have different whole extents.

Definition at line 122 of file vtkPPixelTransfer.h.

◆ vtkPPixelTransfer() [7/7]

vtkPPixelTransfer::vtkPPixelTransfer ( const vtkPixelExtent srcWholeExt,
const vtkPixelExtent srcExt,
const vtkPixelExtent destWholeExt,
const vtkPixelExtent destExt 
)
inline

Initialize a transaction from sub extent of source to sub extent of dest, where the subsets are different.

This is a local operation there will be no communication.

Definition at line 141 of file vtkPPixelTransfer.h.

◆ ~vtkPPixelTransfer()

vtkPPixelTransfer::~vtkPPixelTransfer ( )
default

Member Function Documentation

◆ SetSourceRank()

void vtkPPixelTransfer::SetSourceRank ( int  rank)
inline

Set/Get the MPI rank of source and destination processes.

Definition at line 161 of file vtkPPixelTransfer.h.

◆ GetSourceRank()

int vtkPPixelTransfer::GetSourceRank ( ) const
inline

Definition at line 163 of file vtkPPixelTransfer.h.

◆ SetDestinationRank()

void vtkPPixelTransfer::SetDestinationRank ( int  rank)
inline

Definition at line 165 of file vtkPPixelTransfer.h.

◆ GetDestinationRank()

int vtkPPixelTransfer::GetDestinationRank ( ) const
inline

Definition at line 167 of file vtkPPixelTransfer.h.

◆ Sender()

bool vtkPPixelTransfer::Sender ( int  rank) const
inline

Tests to determine a given rank's role in this transaction.

If both Sender and Receiver are true then the operation is local and no mpi calls are made.

Definition at line 174 of file vtkPPixelTransfer.h.

◆ Receiver()

bool vtkPPixelTransfer::Receiver ( int  rank) const
inline

Definition at line 175 of file vtkPPixelTransfer.h.

◆ Local()

bool vtkPPixelTransfer::Local ( int  rank) const
inline

Definition at line 176 of file vtkPPixelTransfer.h.

◆ SetSourceWholeExtent()

void vtkPPixelTransfer::SetSourceWholeExtent ( vtkPixelExtent srcExt)
inline

Set/Get the source extent.

This is the extent of the array that data will be copied from.

Definition at line 182 of file vtkPPixelTransfer.h.

◆ GetSourceWholeExtent() [1/2]

vtkPixelExtent& vtkPPixelTransfer::GetSourceWholeExtent ( )
inline

Definition at line 184 of file vtkPPixelTransfer.h.

◆ GetSourceWholeExtent() [2/2]

const vtkPixelExtent& vtkPPixelTransfer::GetSourceWholeExtent ( ) const
inline

Definition at line 186 of file vtkPPixelTransfer.h.

◆ SetSourceExtent()

void vtkPPixelTransfer::SetSourceExtent ( vtkPixelExtent srcExt)
inline

Set/Get the source extent.

This is the subset extent in the array that data will be copied from.

Definition at line 192 of file vtkPPixelTransfer.h.

◆ GetSourceExtent() [1/2]

vtkPixelExtent& vtkPPixelTransfer::GetSourceExtent ( )
inline

Definition at line 194 of file vtkPPixelTransfer.h.

◆ GetSourceExtent() [2/2]

const vtkPixelExtent& vtkPPixelTransfer::GetSourceExtent ( ) const
inline

Definition at line 196 of file vtkPPixelTransfer.h.

◆ SetDestinationWholeExtent()

void vtkPPixelTransfer::SetDestinationWholeExtent ( vtkPixelExtent destExt)
inline

Set/get the destination extent.

This is the extent of array that will recveive the data.

Definition at line 202 of file vtkPPixelTransfer.h.

◆ GetDestinationWholeExtent() [1/2]

vtkPixelExtent& vtkPPixelTransfer::GetDestinationWholeExtent ( )
inline

Definition at line 204 of file vtkPPixelTransfer.h.

◆ GetDestinationWholeExtent() [2/2]

const vtkPixelExtent& vtkPPixelTransfer::GetDestinationWholeExtent ( ) const
inline

Definition at line 206 of file vtkPPixelTransfer.h.

◆ SetDestinationExtent()

void vtkPPixelTransfer::SetDestinationExtent ( vtkPixelExtent destExt)
inline

Set/get the destination extent.

This is the subset extent in the array that will recveive the data.

Definition at line 212 of file vtkPPixelTransfer.h.

◆ GetDestinationExtent() [1/2]

vtkPixelExtent& vtkPPixelTransfer::GetDestinationExtent ( )
inline

Definition at line 214 of file vtkPPixelTransfer.h.

◆ GetDestinationExtent() [2/2]

const vtkPixelExtent& vtkPPixelTransfer::GetDestinationExtent ( ) const
inline

Definition at line 216 of file vtkPPixelTransfer.h.

◆ SetTransactionId()

void vtkPPixelTransfer::SetTransactionId ( int  id)
inline

Set/get the transaction id.

Definition at line 221 of file vtkPPixelTransfer.h.

◆ GetTransactionId()

int vtkPPixelTransfer::GetTransactionId ( ) const
inline

Definition at line 223 of file vtkPPixelTransfer.h.

◆ SetUseBlockingSend()

void vtkPPixelTransfer::SetUseBlockingSend ( int  val)
inline

Enable/diasable non-blocking communication.

Definition at line 228 of file vtkPPixelTransfer.h.

◆ GetUseBlockingSend()

int vtkPPixelTransfer::GetUseBlockingSend ( ) const
inline

Definition at line 230 of file vtkPPixelTransfer.h.

◆ SetUseBlockingRecv()

void vtkPPixelTransfer::SetUseBlockingRecv ( int  val)
inline

Definition at line 232 of file vtkPPixelTransfer.h.

◆ GetUseBlockingRecv()

int vtkPPixelTransfer::GetUseBlockingRecv ( ) const
inline

Definition at line 234 of file vtkPPixelTransfer.h.

◆ Execute() [1/2]

template<typename SOURCE_TYPE , typename DEST_TYPE >
int vtkPPixelTransfer::Execute ( MPI_Comm  comm,
int  rank,
int  nComps,
SOURCE_TYPE *  srcData,
DEST_TYPE *  destData,
std::vector< MPI_Request > &  reqs,
std::deque< MPI_Datatype > &  types,
int  tag 
)

Transfer data from source to destination.

Definition at line 289 of file vtkPPixelTransfer.h.

◆ Execute() [2/2]

int vtkPPixelTransfer::Execute ( MPI_Comm  comm,
int  rank,
int  nComps,
int  srcType,
void *  srcData,
int  destType,
void *  destData,
std::vector< MPI_Request > &  reqs,
std::deque< MPI_Datatype > &  types,
int  tag 
)

Transfer data from source to destination.

convenience for working with vtk data type enum rather than c types.

◆ Blit()

int vtkPPixelTransfer::Blit ( int  nComps,
int  srcType,
void *  srcData,
int  destType,
void *  destData 
)

Block transfer for local memory to memory transfers, without using mpi.


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