5 #include "MPI_Object.h"
28 tBoolean mIsRegistered;
55 inline static CORE_UniquePointer<MPI_View>
New() {
56 CORE_UniquePointer<MPI_View> p(
new MPI_View(),
95 template<
int N,
typename T>
97 const std::array<int,N>& startElement,
98 const std::array<int,N>& subarraySize) {
99 mType=MPI_Type::GetPrimaryType<T>();
104 tBoolean ret=(MPI_Type_create_subarray(N,arraySize.data(),subarraySize.data(),startElement.data(),MPI_ORDER_C,mType,&mView)==MPI_SUCCESS);
128 const std::valarray<tMPICount>& elementSizes,
129 const std::valarray<tMPICount>& elementIndices) {
136 tBoolean ret=(MPI_Type::CreateVariableStepType<T>(nElements,elementSizes,elementIndices,mType)==MPI_SUCCESS);
141 MPI_Type::GetSize<T>(sizeofT);
152 mType=MPI_Type::GetPrimaryType<T>();
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class is a base class of E-MicromM core package.
Definition: MPI_Object.h:32
static tMPIError Unregister(tMPIType &type)
unregister the type
Definition: MPI_Type.h:598
static tMPIError Resize(const tMPIType dataType, const tMPIByte &lb, const tMPIByte &extent, tMPIType &newDataType)
resize the type
Definition: MPI_Type.h:578
static tMPIError Register(tMPIType &type)
register the type
Definition: MPI_Type.h:592
static tMPIError GetExtent(const tMPIType &mpiType, tMPIByte &start, tMPIByte &mpiSize)
get the mpi size (in octet) between the first element (in octet) and the last element of the mpi type...
Definition: MPI_Type.h:630
This class describes a view as follow:
Definition: MPI_View.h:20
virtual ~MPI_View(void)
destroy
Definition: MPI_View.h:43
const tMPIType & getType() const
get the type of the element of the view
Definition: MPI_View.h:75
MPI_View()
create a root environment
Definition: MPI_View.h:35
const tMPIIOIndex & getStartIndex() const
get the start index
Definition: MPI_View.h:70
static CORE_UniquePointer< MPI_View > New()
create a new instance of class within an unique pointer
Definition: MPI_View.h:55
const tMPIView & getMPIView() const
get the mpi view of the view
Definition: MPI_View.h:80
tBoolean createSubArrayView(const std::array< int, N > &arraySize, const std::array< int, N > &startElement, const std::array< int, N > &subarraySize)
create a sub array view of an array with N dimension
Definition: MPI_View.h:96
tBoolean createVariableStepView(const tMPICount &nElements, const std::valarray< tMPICount > &elementSizes, const std::valarray< tMPICount > &elementIndices)
create a variable step view
Definition: MPI_View.h:127