11#include <util/containers/ArrayIterator.h>
12#include <util/containers/ConstArrayIterator.h>
16#include <util/mpi/MpiTraits.h>
17#include <util/mpi/MpiStructBuilder.h>
45 template <
typename Data,
int Capacity>
128 template <
class Archive>
129 void serialize(Archive& ar,
const unsigned int version);
146 Data data_[Capacity];
153 template <
typename Data,
int Capacity>
162 template <
typename Data,
int Capacity>
165 for (
int i = 0; i < Capacity; ++i) {
166 data_[i] = other.data_[i];
179 template <
typename Data,
int Capacity>
185 if (
this == &other)
return *
this;
188 for (
int i = 0; i < Capacity; ++i) {
197 template <
typename Data,
int Capacity>
204 template <
typename Data,
int Capacity>
211 template <
typename Data,
int Capacity>
216 iterator.
setEnd(data_ + Capacity);
222 template <
typename Data,
int Capacity>
228 iterator.
setEnd(data_ + Capacity);
234 template <
typename Data,
int Capacity>
237 assert(i < Capacity);
245 template <
typename Data,
int Capacity>
248 assert(i < Capacity);
256 template <
typename Data,
int Capacity>
263 template <
typename Data,
int Capacity>
270 template <
class Data,
int Capacity>
271 template <
class Archive>
273 const unsigned int version)
275 for (
int i = 0; i < Capacity; ++i) {
283 template <
typename Data,
int Capacity>
285 {
return Capacity*
sizeof(Data); }
291 template <
typename Data,
int Capacity>
299 for (
int i = 0; i < Capacity; ++i) {
Forward iterator for an Array or a C array.
void setEnd(Data *ptr)
Set the value of the end pointer.
void setCurrent(Data *ptr)
Set the current pointer value.
Forward const iterator for an Array or a C array.
void setEnd(Data *ptr)
Set the value of the end pointer.
void setCurrent(Data *ptr)
Set the current pointer value.
A fixed size (static) contiguous array template.
FArray< Data, Capacity > & operator=(FArray< Data, Capacity > const &other)
Assignment, element by element.
void begin(ConstArrayIterator< Data > &iterator) const
Set a ConstArrayIterator to the beginning of this Array.
int packedSize()
Return packed size in a MemoryArchive, in bytes.
int capacity() const
Return number of elements in this FArray.
void serialize(Archive &ar, const unsigned int version)
Serialize a FArray to/from an Archive.
Data & operator[](int i)
Mimic C array subscripting.
Data * cArray()
Return pointer to underlying C array.
FArray(FArray< Data, Capacity > const &other)
Copy constructor.
int size() const
Return number of elements in this FArray.
Data const * cArray() const
Return pointer to const to underlying C array.
static void commitMpiType()
Commit associated MPI DataType.
void begin(ArrayIterator< Data > &iterator)
Set an ArrayIterator to the beginning of this Array.
A MpiStructBuilder objects is used to create an MPI Struct datatype.
void addMember(void *memberAddress, MPI::Datatype type, int count=1)
Add a new member variable to the type map.
void setBase(void *objectAddress)
Set address of an class instance.
void commit(MPI::Datatype &newType)
Build and commit a user-defined MPI Struct datatype.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.