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>
122 const Data*
cArray()
const;
130 template <
class Archive>
131 void serialize(Archive& ar,
const unsigned int version);
148 Data data_[Capacity];
155 template <
typename Data,
int Capacity>
164 template <
typename Data,
int Capacity>
167 for (
int i = 0; i < Capacity; ++i) {
168 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) {
199 template <
typename Data,
int Capacity>
206 template <
typename Data,
int Capacity>
213 template <
typename Data,
int Capacity>
217 iterator.
setEnd(data_ + Capacity);
223 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) {
void addMember(void *memberAddress, MPI::Datatype type, int count=1)
Add a new member variable to the type map.
void setCurrent(Data *ptr)
Set the current pointer value.
File containing preprocessor macros for error handling.
void setBase(void *objectAddress)
Set address of an class instance.
void commit(MPI::Datatype &newType)
Build and commit a user-defined MPI Struct datatype.
Forward const iterator for an Array or a C array.
void serialize(Archive &ar, const unsigned int version)
Serialize a FArray to/from an Archive.
void setEnd(Data *ptr)
Set the value of the end pointer.
Utility classes for scientific computation.
static void commitMpiType()
Commit associated MPI DataType.
int size() const
Return number of elements in this FArray.
Forward iterator for an Array or a C array.
A fixed size (static) contiguous array template.
int capacity() const
Return number of elements in this FArray.
A MpiStructBuilder objects is used to create an MPI Struct datatype.
Data & operator[](int i)
Mimic C array subscripting.
void setEnd(Data *ptr)
Set the value of the end pointer.
int packedSize()
Return packed size in a MemoryArchive, in bytes.
void setCurrent(Data *ptr)
Set the current pointer value.
Data * cArray()
Return pointer to underlying C array.
void begin(ArrayIterator< Data > &iterator)
Set an ArrayIterator to the beginning of this Array.
FArray< Data, Capacity > & operator=(const FArray< Data, Capacity > &other)
Assignment, element by element.