shards
Version of the Day
|
Multi-dimensional array view of a contiguous block of member data with the array dimension ordinates documented by "tags". More...
Classes | |
class | shards::Array< Scalar, Order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 > |
The preferred multi-dimensional Array interface with compile-time user-defined dimension ordinates. More... | |
class | shards::ArrayDimTag |
Abstract base class for array dimension tags supplied to the Array template class. More... | |
class | shards::ArrayDimension |
An anonymous array dimension tag, which is NOT the recommended usage. More... | |
class | shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void > |
The multi-dimensional Array interface with runtime user-defined dimension ordinates. Typically used when runtime-polymorphic arrays are passed to functions. More... | |
class | shards::Array< Scalar, RankZero, void, void, void, void, void, void, void, void > |
Specialization for an array with Rank = 0. More... | |
Macros | |
#define | SHARDS_ARRAY_DIM_TAG_SIMPLE_DECLARATION(ADT) |
Macro for declaration of a simple ArrayDimTag. More... | |
#define | SHARDS_ARRAY_DIM_TAG_SIMPLE_IMPLEMENTATION(ADT) |
Macro for implementing the body of a simple ArrayDimTag. More... | |
Enumerations | |
enum | shards::ArrayOrder { shards::NaturalOrder, shards::FortranOrder, shards::RankZero } |
Define Natural (C-language) or Fortran ordering of array dimensions. A RankZero array does not have an ordering. More... | |
Multi-dimensional array view of a contiguous block of member data with the array dimension ordinates documented by "tags".
Trivial Example of a Function accepting a 2D Array
Given the user-defined array dimension tags Cartesian3D and Points define a function to find the centroid of an array of points.
Example of User-defined Array Dimension Tags
Example of Creating an Array
Given a block of memory for the collection of points, wrap it in an Array.
The points array has dimension<0> set to Cartesian3D::Size and dimension<1> set to npoints. If the npoints argument where omitted then a compilation error would be generated due to the missing Points::Size enumeration.
#define SHARDS_ARRAY_DIM_TAG_SIMPLE_DECLARATION | ( | ADT | ) |
Macro for declaration of a simple ArrayDimTag.
ADT | name of the tag. |
Definition at line 186 of file Shards_Array.hpp.
#define SHARDS_ARRAY_DIM_TAG_SIMPLE_IMPLEMENTATION | ( | ADT | ) |
Macro for implementing the body of a simple ArrayDimTag.
ADT | name of the tag. |
Definition at line 201 of file Shards_Array.hpp.
enum shards::ArrayOrder |
Define Natural (C-language) or Fortran ordering of array dimensions. A RankZero array does not have an ordering.
Definition at line 82 of file Shards_Array.hpp.