51 bool modificationRequired;
58 size_t modifiedExtent;
63 int* modifiedBlockOffsets;
76 nTypes = other->nTypes;
77 blockLengths =
new int [nTypes];
78 blockOffsets =
new int [nTypes];
81 if(
nullptr != other->modifiedBlockOffsets) {
82 modifiedBlockOffsets =
new int [nTypes];
85 for(
int i = 0; i < nTypes; ++i) {
86 blockLengths[i] = other->blockLengths[i];
87 blockOffsets[i] = other->blockOffsets[i];
88 types[i] = other->types[i]->
clone();
90 if(
nullptr != modifiedBlockOffsets) {
91 modifiedBlockOffsets[i] = other->modifiedBlockOffsets[i];
102 adInterface = other->adInterface;
103 typeExtent = other->typeExtent;
104 typeOffset = other->typeOffset;
105 modifiedExtent = other->modifiedExtent;
107 cloneInternal(other);
110 MPI_Datatype modType;
126 adInterface = other->adInterface;
129 if(
nullptr != modifiedBlockOffsets) {
130 modifiedExtent = other->modifiedExtent;
132 modifiedExtent = extent;
135 cloneInternal(other);
138 MPI_Datatype modType;
140 MPI_Type_create_resized(this->
getMpiType(), offset, extent, &type);
154 MPI_Datatype*
mpiTypes =
new MPI_Datatype[count];
156 MPI_Datatype newMpiType;
157 MPI_Datatype newModMpiType;
160 blockLengths =
new int[count];
161 blockOffsets =
new int[count];
165 modificationRequired =
false;
166 valuesPerElement = 0;
167 adInterface = &array_of_types[0]->
getADTool();
168 for(
int i = 0; i < count; ++i) {
170 if(array_of_types[i]->
getADTool().isActiveType()) {
171 adInterface = &array_of_types[i]->
getADTool();
176 blockLengths[i] = array_of_blocklengths[i];
177 blockOffsets[i] = array_of_displacements[i];
179 types[i] = array_of_types[i]->
clone();
182 MPI_Type_create_struct(count, array_of_blocklengths, array_of_displacements,
mpiTypes, &newMpiType);
184 if(modificationRequired) {
185 MPI_Aint* modifiedDisplacements =
new MPI_Aint[count + 1];
186 MPI_Datatype* modifiedMpiTypes =
new MPI_Datatype[count + 1];
187 int* modifiedArrayLength =
new int[count + 1];
189 modifiedBlockOffsets =
new int[count];
191 MPI_Aint totalDisplacement = 0;
192 for(
int i = 0; i < count; ++i) {
193 MPI_Aint curLowerBound;
198#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_2_0
199 MPI_Type_lb(modifiedMpiTypes[i], &curLowerBound);
200 MPI_Type_extent(modifiedMpiTypes[i], &curExtent);
202 MPI_Type_get_extent(modifiedMpiTypes[i], &curLowerBound, &curExtent);
206 modifiedDisplacements[i] = totalDisplacement;
207 modifiedBlockOffsets[i] = totalDisplacement;
208 modifiedArrayLength[i] = array_of_blocklengths[i];
209 totalDisplacement += curExtent * array_of_blocklengths[i];
214 size_t paddingBytes = totalDisplacement %
sizeof(double);
215 int numberOfTypes = count;
216 if(paddingBytes != 0) {
220 if(modifiedMpiTypes[count - 1] == MPI_BYTE) {
221 totalDisplacement -= array_of_blocklengths[count - 1];
222 paddingBytes = totalDisplacement %
sizeof(double);
224 if(paddingBytes != 0) {
226 modifiedArrayLength[count - 1] = paddingBytes;
227 totalDisplacement += paddingBytes;
230 modifiedArrayLength[count - 1] = 0;
234 blockLengths[count - 1] = 0;
237 modifiedMpiTypes[count] = MPI_BYTE;
238 modifiedDisplacements[count] = totalDisplacement;
239 modifiedArrayLength[count] = paddingBytes;
240 totalDisplacement += paddingBytes;
246 MPI_Type_create_struct(numberOfTypes, modifiedArrayLength, modifiedDisplacements, modifiedMpiTypes, &newModMpiType);
248 delete [] modifiedMpiTypes;
249 delete [] modifiedDisplacements;
250 delete [] modifiedArrayLength;
253 modifiedBlockOffsets =
new int[count];
254 for(
int i = 0; i < count; ++i) {
255 modifiedBlockOffsets[i] = blockOffsets[i];
257 newModMpiType = newMpiType;
262#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_2_0
263 MPI_Type_lb(newMpiType, &lb);
264 MPI_Type_extent(newMpiType, &ext);
266 MPI_Type_get_extent(newMpiType, &lb, &ext);
271#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_2_0
272 MPI_Type_lb(newModMpiType, &lb);
273 MPI_Type_extent(newModMpiType, &ext);
275 MPI_Type_get_extent(newModMpiType, &lb, &ext);
277 modifiedExtent = ext;
289 MPI_Type_free(&temp);
292 MPI_Type_free(&temp);
294 for(
int i = 0; i < nTypes; ++i) {
298 if(
nullptr != modifiedBlockOffsets) {
299 delete [] modifiedBlockOffsets;
301 delete [] blockOffsets;
302 delete [] blockLengths;
307 return (
int)(element * typeExtent);
311 return (
int)(element * modifiedExtent);
315 return (
const void*)((
const char*) buf + offset);
319 return (
void*)((
char*) buf + offset);
323 return modificationRequired;
327 return count * valuesPerElement;
336 for(
int i = 0; i < elements; ++i) {
340 for(
int curType = 0; curType < nTypes; ++curType) {
347 for(
int i = 0; i < elements; ++i) {
352 for(
int curType = 0; curType < nTypes; ++curType) {
358 void getIndices(
const void* buf,
size_t bufOffset,
void* indices,
size_t bufModOffset,
int elements)
const {
361 for(
int i = 0; i < elements; ++i) {
364 for(
int curType = 0; curType < nTypes; ++curType) {
365 types[curType]->
getIndices(
computeBufferPointer(buf, totalBufOffset + blockOffsets[curType]), 0, indices, totalIndexOffset, blockLengths[curType]);
371 void registerValue(
void* buf,
size_t bufOffset,
void* indices,
void* oldPrimals,
size_t bufModOffset,
int elements)
const {
374 for(
int i = 0; i < elements; ++i) {
377 for(
int curType = 0; curType < nTypes; ++curType) {
378 types[curType]->
registerValue(
computeBufferPointer(buf, totalBufOffset + blockOffsets[curType]), 0, indices, oldPrimals, totalIndexOffset, blockLengths[curType]);
385 for(
int i = 0; i < elements; ++i) {
388 for(
int curType = 0; curType < nTypes; ++curType) {
394 void createIndices(
void* buf,
size_t bufOffset,
void* indices,
size_t bufModOffset,
int elements)
const {
397 for(
int i = 0; i < elements; ++i) {
400 for(
int curType = 0; curType < nTypes; ++curType) {
407 void getValues(
const void* buf,
size_t bufOffset,
void* primals,
size_t bufModOffset,
int elements)
const {
409 for(
int i = 0; i < elements; ++i) {
412 for(
int curType = 0; curType < nTypes; ++curType) {
413 types[curType]->
getValues(
computeBufferPointer(buf, totalBufOffset + blockOffsets[curType]), 0, primals, totalPrimalsOffset, blockLengths[curType]);
420 for(
int j = 1; j < ranks; ++j) {
427 copy(buf, 0, target, 0, count);
431 void copy(
void* from,
size_t fromOffset,
void* to,
size_t toOffset,
int count)
const {
432 for(
int i = 0; i < count; ++i) {
436 for(
int curType = 0; curType < nTypes; ++curType) {
443 for(
int i = 0; i < elements; ++i) {
446 for(
int curType = 0; curType < nTypes; ++curType) {
452 void freeType(
void* buf,
size_t bufOffset,
int elements)
const {
453 for(
int i = 0; i < elements; ++i) {
456 for(
int curType = 0; curType < nTypes; ++curType) {
463 char* b = (
char*)calloc(size, typeExtent);
471 buf = calloc(size, modifiedExtent);
478 char* b = (
char*)buf;
496 int* array_of_blocklengths =
new int [typeCount];
497 MPI_Aint* array_of_displacements =
new MPI_Aint [typeCount];
500 array_of_blocklengths[0] = count;
501 array_of_displacements[0] = 0;
502 array_of_types[0] = oldtype;
504 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements, array_of_types);
506 delete [] array_of_blocklengths;
507 delete [] array_of_displacements;
508 delete [] array_of_types;
514 int typeCount = count;
515 int* array_of_blocklengths =
new int [typeCount];
516 MPI_Aint* array_of_displacements =
new MPI_Aint [typeCount];
519#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_2_0
521 MPI_Type_extent(oldtype->
getMpiType(), &extent);
524 MPI_Type_get_extent(oldtype->
getMpiType(), &lb, &extent);
527 for(
int i = 0; i < count; ++i) {
528 array_of_blocklengths[i] = blocklength;
529 array_of_displacements[i] = stride * extent * i;
530 array_of_types[i] = oldtype;
533 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements, array_of_types);
535 delete [] array_of_blocklengths;
536 delete [] array_of_displacements;
537 delete [] array_of_types;
543 int typeCount = count;
544 int* array_of_blocklengths =
new int [typeCount];
545 MPI_Aint* array_of_displacements =
new MPI_Aint [typeCount];
548 for(
int i = 0; i < count; ++i) {
549 array_of_blocklengths[i] = blocklength;
550 array_of_displacements[i] = stride * i;
551 array_of_types[i] = oldtype;
554 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements, array_of_types);
556 delete [] array_of_blocklengths;
557 delete [] array_of_displacements;
558 delete [] array_of_types;
563#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_4_0
564 inline int AMPI_Type_hvector(
int count,
int blocklength, MPI_Aint stride, MpiTypeInterface* oldtype, MpiTypeInterface** newtype) {
570 int typeCount = count;
571 MPI_Aint* array_of_displacements_byte =
new MPI_Aint [typeCount];
574#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_2_0
576 MPI_Type_extent(oldtype->
getMpiType(), &extent);
579 MPI_Type_get_extent(oldtype->
getMpiType(), &lb, &extent);
582 for(
int i = 0; i < count; ++i) {
583 array_of_displacements_byte[i] = array_of_displacements[i] * extent * i;
584 array_of_types[i] = oldtype;
587 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements_byte, array_of_types);
589 delete [] array_of_displacements;
590 delete [] array_of_types;
596 int typeCount = count;
599 for(
int i = 0; i < count; ++i) {
600 array_of_types[i] = oldtype;
603 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements, array_of_types);
605 delete [] array_of_types;
610#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_4_0
611 inline int AMPI_Type_hindexed(
int count,
int* array_of_blocklength, MPI_Aint* array_of_displacements, MpiTypeInterface* oldtype, MpiTypeInterface** newtype) {
617 int typeCount = count;
618 int* array_of_blocklengths =
new int [typeCount];
619 MPI_Aint* array_of_displacements_byte =
new MPI_Aint [typeCount];
622#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_2_0
624 MPI_Type_extent(oldtype->
getMpiType(), &extent);
627 MPI_Type_get_extent(oldtype->
getMpiType(), &lb, &extent);
630 for(
int i = 0; i < count; ++i) {
631 array_of_blocklengths[i] = blocklength;
632 array_of_displacements_byte[i] = array_of_displacements[i] * extent * i;
633 array_of_types[i] = oldtype;
636 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements_byte, array_of_types);
638 delete [] array_of_blocklengths;
639 delete [] array_of_displacements;
640 delete [] array_of_types;
646 int typeCount = count;
647 int* array_of_blocklengths =
new int [typeCount];
650 for(
int i = 0; i < count; ++i) {
651 array_of_blocklengths[i] = blocklength;
652 array_of_types[i] = oldtype;
655 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements, array_of_types);
657 delete [] array_of_blocklengths;
658 delete [] array_of_types;
664 return dim * dimStep + dimBase;
671 const int* array_of_subsizes,
672 const int* array_of_starts,
674 const MPI_Aint* extents,
675 MPI_Aint dimDisplacement,
676 MPI_Aint* array_of_displacements) {
678 if(ndims == curDim + 1) {
680 array_of_displacements[arrayPos] = dimDisplacement + extents[orderDim] * array_of_starts[orderDim];
684 for(
int pos = 0; pos < array_of_subsizes[orderDim]; ++pos) {
685 MPI_Aint curDimDisplacement = dimDisplacement + (array_of_starts[orderDim] + pos) * extents[orderDim];
686 add_subarray(curDim + 1, dimBase, dimStep, ndims, array_of_subsizes, array_of_starts, arrayPos, extents,
687 curDimDisplacement, array_of_displacements);
693 const int* array_of_sizes,
694 const int* array_of_subsizes,
695 const int* array_of_starts,
703 if(order == MPI_ORDER_FORTRAN) {
707 }
else if(order == MPI_ORDER_C) {
716#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_2_0
718 MPI_Type_extent(oldtype->
getMpiType(), &extent);
721 MPI_Type_get_extent(oldtype->
getMpiType(), &lb, &extent);
723 MPI_Aint* extents =
new MPI_Aint [ndims];
724 MPI_Aint curExtent = extent;
725 for(
int i = ndims - 1; i >= 0; --i) {
727 extents[orderDim] = curExtent;
728 curExtent *= array_of_sizes[orderDim];
733 for(
int i = 0; i < ndims - 1; ++i) {
734 typeCount *= array_of_subsizes[
dimToOrderDim(i, dimBase, dimStep)];
737 int* array_of_blocklengths =
new int [typeCount];
738 MPI_Aint* array_of_displacements =
new MPI_Aint [typeCount];
742 add_subarray(0, dimBase, dimStep, ndims, array_of_subsizes, array_of_starts, arrayPos, extents, 0,
743 array_of_displacements);
746 for(
int i = 0; i < typeCount; ++i) {
747 array_of_blocklengths[i] = array_of_subsizes[
dimToOrderDim(ndims - 1, dimBase, dimStep)];
748 array_of_types[i] = oldtype;
751 *newtype =
new MpiStructType(typeCount, array_of_blocklengths, array_of_displacements, array_of_types);
753 delete [] array_of_blocklengths;
754 delete [] array_of_displacements;
755 delete [] array_of_types;
765 int* array_of_blocklengths =
new int [typeCount];
766 MPI_Aint* array_of_displacements =
new MPI_Aint [typeCount];
769 array_of_blocklengths[0] = 1;
770 array_of_displacements[0] = 0;
771 array_of_types[0] = oldtype;
779 delete [] array_of_blocklengths;
780 delete [] array_of_displacements;
781 delete [] array_of_types;
789 *newtype =
new MpiStructType(count, array_of_blocklengths, array_of_displacements, array_of_types);
794#if MEDI_MPI_TARGET < MEDI_MPI_VERSION_4_0
795 inline int AMPI_Type_struct(
int count,
MEDI_OPTIONAL_CONST int* array_of_blocklengths,
MEDI_OPTIONAL_CONST MPI_Aint* array_of_displacements, MpiTypeInterface*
const* array_of_types, MpiTypeInterface** newtype) {
805 MPI_Type_commit(&modType);
809 return MPI_Type_commit(&type);
823 *newtype = oldtype->
clone();
Handling for costum MPI_Datatypes crated by the user.
Definition constructedDatatypes.hpp:48
void PrimalType
Definition constructedDatatypes.hpp:71
void initializeType(void *buf, size_t bufOffset, int elements) const
Initialize the types in the buffer.
Definition constructedDatatypes.hpp:442
void registerValue(void *buf, size_t bufOffset, void *indices, void *oldPrimals, size_t bufModOffset, int elements) const
Register all the AD values on the new machine.
Definition constructedDatatypes.hpp:371
MpiStructType(const MpiStructType *other, size_t offset, size_t extent)
Definition constructedDatatypes.hpp:123
MpiStructType(int count, const int *array_of_blocklengths, const MPI_Aint *array_of_displacements, MpiTypeInterface *const *array_of_types)
Definition constructedDatatypes.hpp:151
void freeType(void *buf, size_t bufOffset, int elements) const
Destroy the types in the buffer.
Definition constructedDatatypes.hpp:452
void copyFromModifiedBuffer(void *buf, size_t bufOffset, const void *bufMod, size_t bufModOffset, int elements) const
Copy all data from the modified buffer and perform the special handling for the AD type.
Definition constructedDatatypes.hpp:346
void AdjointType
Definition constructedDatatypes.hpp:70
void * computeBufferPointer(void *buf, size_t offset) const
Definition constructedDatatypes.hpp:318
MpiStructType(const MpiStructType *other)
Definition constructedDatatypes.hpp:99
void copyIntoModifiedBuffer(const void *buf, size_t bufOffset, void *bufMod, size_t bufModOffset, int elements) const
Copy all data into the modified buffer and perform the special handling for the AD type.
Definition constructedDatatypes.hpp:335
const void * computeBufferPointer(const void *buf, size_t offset) const
Definition constructedDatatypes.hpp:314
void deleteTypeBuffer(void *&buf, size_t size) const
Delete the temporary buffer.
Definition constructedDatatypes.hpp:475
void IndexType
Definition constructedDatatypes.hpp:72
MpiStructType * clone() const
Creates a clone of the mpi type also calling MPI_Type_dub.
Definition constructedDatatypes.hpp:489
bool isModifiedBufferRequired() const
Tell the functions if the underlying AD tool requires new send/recv buffers or if the original buffer...
Definition constructedDatatypes.hpp:322
int computeBufOffset(size_t element) const
Definition constructedDatatypes.hpp:306
void copy(void *from, size_t fromOffset, void *to, size_t toOffset, int count) const
Copy the elements of one buffer into the other.
Definition constructedDatatypes.hpp:431
void createTypeBuffer(void *&buf, size_t size) const
Create a temporary buffer of the type that this interface represents.
Definition constructedDatatypes.hpp:462
int computeActiveElements(const int count) const
Get the number of active elements that are contained in count versions of the type.
Definition constructedDatatypes.hpp:326
void ModifiedType
Definition constructedDatatypes.hpp:69
void performReduce(void *buf, void *target, int count, AMPI_Op op, int ranks) const
Perform a local reduce operation.
Definition constructedDatatypes.hpp:419
int computeModOffset(size_t element) const
Definition constructedDatatypes.hpp:310
void Type
Definition constructedDatatypes.hpp:68
void getValues(const void *buf, size_t bufOffset, void *primals, size_t bufModOffset, int elements) const
Get the primal values from the AD types.
Definition constructedDatatypes.hpp:407
void createIndices(void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const
Create indices for a reciving buffer if necessary.
Definition constructedDatatypes.hpp:394
void createModifiedTypeBuffer(void *&buf, size_t size) const
Create a temporary buffer of the modified type that this interface represents.
Definition constructedDatatypes.hpp:470
void getIndices(const void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const
Get all the AD identifiers from all AD types in the buffer.
Definition constructedDatatypes.hpp:358
const ADToolInterface & getADTool() const
Get the AD tool that handled the AD specifics.
Definition constructedDatatypes.hpp:331
void deleteModifiedTypeBuffer(void *&buf) const
Delete the temporary buffer for the modified types.
Definition constructedDatatypes.hpp:484
~MpiStructType()
Definition constructedDatatypes.hpp:284
void clearIndices(void *buf, size_t bufOffset, int elements) const
Clear the AD types in the buffer such that they can be overwritten.
Definition constructedDatatypes.hpp:384
Wrapper interface for MPI types in communications.
Definition typeInterface.hpp:63
virtual void getIndices(const void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const =0
Get all the AD identifiers from all AD types in the buffer.
virtual void copyFromModifiedBuffer(void *buf, size_t bufOffset, const void *bufMod, size_t bufModOffset, int elements) const =0
Copy all data from the modified buffer and perform the special handling for the AD type.
virtual void freeType(Type *buf, size_t bufOffset, int elements) const =0
Destroy the types in the buffer.
virtual void copy(void *from, size_t fromOffset, void *to, size_t toOffset, int count) const =0
Copy the elements of one buffer into the other.
virtual void getValues(const void *buf, size_t bufOffset, void *primals, size_t bufModOffset, int elements) const =0
Get the primal values from the AD types.
virtual bool isModifiedBufferRequired() const =0
Tell the functions if the underlying AD tool requires new send/recv buffers or if the original buffer...
MPI_Datatype getMpiType() const
Return the MPI type for the data that this interface represents.
Definition typeInterface.hpp:127
MPI_Datatype getModifiedMpiType() const
Return the MPI type for the modified data.
Definition typeInterface.hpp:135
virtual const ADToolInterface & getADTool() const =0
Get the AD tool that handled the AD specifics.
virtual MpiTypeInterface * clone() const =0
Creates a clone of the mpi type also calling MPI_Type_dub.
virtual void registerValue(void *buf, size_t bufOffset, void *indices, void *oldPrimals, size_t bufModOffset, int elements) const =0
Register all the AD values on the new machine.
void setMpiTypes(MPI_Datatype mpiType, MPI_Datatype modifiedMpiType)
Helper method for extending classes to set the types after the initial construction.
Definition typeInterface.hpp:116
virtual void initializeType(Type *buf, size_t bufOffset, int elements) const =0
Initialize the types in the buffer.
virtual void createIndices(void *buf, size_t bufOffset, void *indices, size_t bufModOffset, int elements) const =0
Create indices for a reciving buffer if necessary.
virtual int computeActiveElements(const int count) const =0
Get the number of active elements that are contained in count versions of the type.
virtual void copyIntoModifiedBuffer(const void *buf, size_t bufOffset, void *bufMod, size_t bufModOffset, int elements) const =0
Copy all data into the modified buffer and perform the special handling for the AD type.
virtual void clearIndices(void *buf, size_t bufOffset, int elements) const =0
Clear the AD types in the buffer such that they can be overwritten.
#define MEDI_EXCEPTION(...)
Generates an exception.
Definition exceptions.hpp:44
MpiTypes * mpiTypes
Definition helloWorld.cpp:42
#define MEDI_OPTIONAL_CONST
Definition macros.h:70
#define mediAssert(x)
The assert function for MeDiPack it can be enabled with the preprocessor macro MEDI_EnableAssert=true...
Definition macros.h:91
Global namespace for MeDiPack - Message Differentiation Package.
Definition adjointInterface.hpp:37
int AMPI_Type_create_hindexed(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:595
int AMPI_Type_free(MpiTypeInterface **d)
Definition constructedDatatypes.hpp:812
int AMPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:542
int AMPI_Type_dup(MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:821
int AMPI_Type_create_subarray(int ndims, const int *array_of_sizes, const int *array_of_subsizes, const int *array_of_starts, int order, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:692
int AMPI_Type_create_resized(MpiTypeInterface *oldtype, MPI_Aint lb, MPI_Aint extent, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:762
int AMPI_Type_commit(MpiTypeInterface **d)
Definition constructedDatatypes.hpp:800
int dimToOrderDim(int dim, const int dimBase, const int dimStep)
Definition constructedDatatypes.hpp:663
void add_subarray(const int curDim, const int dimBase, const int dimStep, const int ndims, const int *array_of_subsizes, const int *array_of_starts, int &arrayPos, const MPI_Aint *extents, MPI_Aint dimDisplacement, MPI_Aint *array_of_displacements)
Definition constructedDatatypes.hpp:667
int AMPI_Type_create_contiguous(int count, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:494
int AMPI_Type_create_struct(int count, const int *array_of_blocklengths, const MPI_Aint *array_of_displacements, MpiTypeInterface *const *array_of_types, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:787
int AMPI_Type_create_hindexed_block(int count, int blocklength, MPI_Aint *array_of_displacements, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:645
int AMPI_Type_indexed_block(int count, int blocklength, int *array_of_displacements, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:616
int AMPI_Type_indexed(int count, int *array_of_blocklengths, int *array_of_displacements, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:569
int AMPI_Type_vector(int count, int blocklength, int stride, MpiTypeInterface *oldtype, MpiTypeInterface **newtype)
Definition constructedDatatypes.hpp:513
Structure for the special handling of the MPI_Op structure.
Definition op.hpp:50
MPI_Op primalFunction
The mpi operator for the unmodified AD types. The AD tool needs to record all operations that are eva...
Definition op.hpp:69