101 for(
int i = 0; i < elements; ++i) {
102 bufMod[bufModOffset + i] = buf[bufOffset + i];
107 for(
int i = 0; i < elements; ++i) {
108 buf[bufOffset + i] = bufMod[bufModOffset + i];
159 inline void copy(
Type* from,
size_t fromOffset,
Type* to,
size_t toOffset,
int count)
const {
160 for(
int i = 0; i < count; ++i) {
161 to[toOffset + i] = from[fromOffset + i];
166 for(
int i = 0; i < elements; ++i) {
167 new(&buf[bufOffset + i])
Type;
172 for(
int i = 0; i < elements; ++i) {
173 buf[bufOffset + elements].~Type();
178 buf =
new Type[size];
Definition typeInterface.hpp:324
MPI_Datatype getMpiType() const
Return the MPI type for the data that this interface represents.
Definition typeInterface.hpp:127
Definition typePassive.hpp:52
void getIndices(const Type *buf, size_t bufOffset, IndexType *indices, size_t bufModOffset, int elements) const
Definition typePassive.hpp:112
void registerValue(Type *buf, size_t bufOffset, IndexType *indices, PrimalType *oldPrimals, size_t bufModOffset, int elements) const
Definition typePassive.hpp:120
void getValues(const Type *buf, size_t bufOffset, PrimalType *primals, size_t bufModOffset, int elements) const
Definition typePassive.hpp:143
MpiTypePassive(MPI_Datatype type)
Definition typePassive.hpp:67
ADToolPassive Tool
Definition typePassive.hpp:61
void deleteTypeBuffer(Type *&buf, size_t size) const
Definition typePassive.hpp:185
void performReduce(Type *buf, Type *target, int count, AMPI_Op op, int ranks) const
Definition typePassive.hpp:151
void createModifiedTypeBuffer(ModifiedType *&buf, size_t size) const
Definition typePassive.hpp:181
void copyIntoModifiedBuffer(const Type *buf, size_t bufOffset, ModifiedType *bufMod, size_t bufModOffset, int elements) const
Definition typePassive.hpp:100
void PrimalType
Definition typePassive.hpp:58
bool isModifiedBufferRequired() const
Tell the functions if the underlying AD tool requires new send/recv buffers or if the original buffer...
Definition typePassive.hpp:96
T ModifiedType
Definition typePassive.hpp:57
void createTypeBuffer(Type *&buf, size_t size) const
Definition typePassive.hpp:177
void createIndices(Type *buf, size_t bufOffset, IndexType *indices, size_t bufModOffset, int elements) const
Definition typePassive.hpp:135
MpiTypePassive * clone() const
Creates a clone of the mpi type also calling MPI_Type_dub.
Definition typePassive.hpp:199
bool isClone
Definition typePassive.hpp:63
const Tool & getADTool() const
Get the AD tool that handled the AD specifics.
Definition typePassive.hpp:86
void deleteModifiedTypeBuffer(ModifiedType *&buf) const
Definition typePassive.hpp:192
Tool adTool
Definition typePassive.hpp:65
T Type
Definition typePassive.hpp:56
void freeType(Type *buf, size_t bufOffset, int elements) const
Definition typePassive.hpp:171
void clearIndices(Type *buf, size_t bufOffset, int elements) const
Definition typePassive.hpp:129
void initializeType(Type *buf, size_t bufOffset, int elements) const
Definition typePassive.hpp:165
int computeActiveElements(const int count) const
Get the number of active elements that are contained in count versions of the type.
Definition typePassive.hpp:90
void IndexType
Definition typePassive.hpp:59
void copy(Type *from, size_t fromOffset, Type *to, size_t toOffset, int count) const
Definition typePassive.hpp:159
~MpiTypePassive()
Definition typePassive.hpp:79
void copyFromModifiedBuffer(Type *buf, size_t bufOffset, const ModifiedType *bufMod, size_t bufModOffset, int elements) const
Definition typePassive.hpp:106
#define MEDI_UNUSED(name)
Definition macros.h:108
Global namespace for MeDiPack - Message Differentiation Package.
Definition adjointInterface.hpp:37
Structure for the special handling of the MPI_Op structure.
Definition op.hpp:50