20#ifndef vtkMPIPixelView_h
21#define vtkMPIPixelView_h
35 MPI_Initialized(&mpiOk);
38 std::cerr <<
"This class requires the MPI runtime." << std::endl;
45 MPI_Datatype nativeType;
53 domain.
Size(domainDims);
59 decomp.
Size(decompDims);
67 unsigned long long nCells = decomp.
Size();
68 iErr = MPI_Type_contiguous((
int)nCells, nativeType, &view);
71 MPI_Type_free(&nativeType);
77 iErr = MPI_Type_create_subarray(
78 2, domainDims, decompDims, decompStart, MPI_ORDER_FORTRAN, nativeType, &view);
81 MPI_Type_free(&nativeType);
85 iErr = MPI_Type_commit(&view);
88 MPI_Type_free(&nativeType);
92 MPI_Type_free(&nativeType);
Representation of a cartesian pixel plane and common operations on it.
void GetStartIndex(int first[2]) const
Get the start/end index.
void Size(T nCells[2]) const
Get the number in each direction.
int vtkMPIPixelViewNew(const vtkPixelExtent &domain, const vtkPixelExtent &decomp, int nComps, MPI_Datatype &view)