shards Version of the Day
|
The preferred multi-dimensional Array interface with compile-time user-defined dimension ordinates. More...
#include <Shards_Array.hpp>
Protected Member Functions | |
Array (const Array< Scalar, array_order > &rhs, size_type i) | |
Protected Attributes | |
Array< value_type, array_order > | m_array |
Friends | |
template<typename , ArrayOrder , class , class , class , class , class , class , class , class > | |
class | shards::Array |
Array Attributes | |
enum | { Rank = helper::Rank } |
Rank of the array is the number of non-void dimension tags. More... | |
enum | { Natural = NaturalOrder == array_order } |
If the multidimension follows the natural ordering. More... | |
enum | { Reverse = FortranOrder == array_order } |
If the multidimension follows the reverse (Fortran) ordering. More... | |
enum | { Contiguous = true } |
If the member data storage is contiguous. More... | |
typedef Scalar | value_type |
Type of member data. | |
typedef array_traits::int_t | size_type |
Type for sizes. | |
typedef const ArrayDimTag * | tag_type |
Type of runtime dimension tags. | |
size_type | rank () const |
Rank of the array is the number of non-void dimension tags. | |
bool | natural () const |
If the multidimension follows the natural ordering. | |
bool | reverse () const |
If the multidimension follows the reverse (Fortran) ordering. | |
bool | contiguous () const |
If the member data storage is contiguous. | |
tag_type | tag (const size_type ordinate) const |
Access the dimension tag-singleton for a given ordinate. | |
template<size_type ordinate> | |
size_type | dimension () const |
Dimension of the given ordinate. | |
size_type | dimension (const size_type ordinate) const |
Dimension of the given ordinate. | |
template<typename iType > | |
void | dimensions (std::vector< iType > &n) |
Dimensions of all ordinates. | |
size_type | size () const |
Total number of member data items. | |
Member data access operators | |
typedef helper::truncate | TruncateType |
Subarray type that removes the slowest striding dimension (first natural or last fortran ordinate). | |
template<typename iType > | |
TruncateType | truncate (const iType &i) const |
Generate a subarray view of the array with the slowest striding ordinate offset by i and removed. | |
value_type * | contiguous_data () const |
Pointer to contiguous block of member data. | |
template<typename iType > | |
value_type & | operator[] (const iType &i) const |
Access member via offset into contiguous block. | |
template<typename iType > | |
value_type & | operator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4, const iType &i5, const iType &i6, const iType &i7, const iType &i8) const |
Access member of a Rank 8 array. | |
template<typename iType > | |
value_type & | operator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4, const iType &i5, const iType &i6, const iType &i7) const |
Access member of a Rank 7 array. | |
template<typename iType > | |
value_type & | operator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4, const iType &i5, const iType &i6) const |
Access member of a Rank 6 array. | |
template<typename iType > | |
value_type & | operator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4, const iType &i5) const |
Access member of a Rank 5 array. | |
template<typename iType > | |
value_type & | operator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4) const |
Access member of a Rank 4 array. | |
template<typename iType > | |
value_type & | operator() (const iType &i1, const iType &i2, const iType &i3) const |
Access member of a Rank 3 array. | |
template<typename iType > | |
value_type & | operator() (const iType &i1, const iType &i2) const |
Access member of a Rank 2 array. | |
template<typename iType > | |
value_type & | operator() (const iType &i1) const |
Access member of a Rank 1 array. | |
Constructors and Assignment Operators | |
typedef helper::reverse | ReverseType |
The compatible multidimensional array with reversed multi-index ordering and dimension tags. | |
Array () | |
Default constructor. | |
Array (const Array &rhs) | |
Copy constructor. | |
Array & | operator= (const Array &rhs) |
Assignment operator. | |
Array (const ReverseType &rhs) | |
Copy constructor for compatible reverse type. | |
Array & | operator= (const ReverseType &rhs) |
Assignment operator for compatible reverse type. | |
Array & | assign (value_type *arg_ptr, const size_type *const dims) |
Assign pointer and dimensions. | |
Array (value_type *arg_ptr, const size_type *const dims) | |
Construct with array of dimensions. | |
Array & | assign (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5, const size_type n6, const size_type n7, const size_type n8) |
Construct a Rank 8 array. | |
Array (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5, const size_type n6, const size_type n7, const size_type n8) | |
Construct a Rank 8 array. | |
Array & | assign (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5, const size_type n6, const size_type n7) |
Construct a Rank 7..8 array; use Tag#::Size for defaults. The input dimensions are the 7 slowest strides. | |
Array (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5, const size_type n6, const size_type n7) | |
Construct a Rank 7..8 array; use Tag#::Size for defaults. The input dimensions are the 7 slowest strides. | |
Array & | assign (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5, const size_type n6) |
Construct a Rank 6..8 array; use Tag#::Size for defaults. The input dimensions are the 6 slowest strides. | |
Array (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5, const size_type n6) | |
Construct a Rank 6..8 array; use Tag#::Size for defaults. The input dimensions are the 6 slowest strides. | |
Array & | assign (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5) |
Construct a Rank 5..8 array; use Tag#::Size for defaults. The input dimensions are the 5 slowest strides. | |
Array (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4, const size_type n5) | |
Construct a Rank 5..8 array; use Tag#::Size for defaults. The input dimensions are the 5 slowest strides. | |
Array & | assign (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4) |
Construct a Rank 4..8 array; use Tag#::Size for defaults. The input dimensions are the 4 slowest strides. | |
Array (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3, const size_type n4) | |
Construct a Rank 4..8 array; use Tag#::Size for defaults. The input dimensions are the 4 slowest strides. | |
Array & | assign (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3) |
Construct a Rank 3..8 array; use Tag#::Size for defaults. The input dimensions are the 3 slowest strides. | |
Array (value_type *arg_ptr, const size_type n1, const size_type n2, const size_type n3) | |
Construct a Rank 3..8 array; use Tag#::Size for defaults. The input dimensions are the 3 slowest strides. | |
Array & | assign (value_type *arg_ptr, const size_type n1, const size_type n2) |
Construct a Rank 2..8 array; use Tag#::Size for defaults. The input dimensions are the 2 slowest strides. | |
Array (value_type *arg_ptr, const size_type n1, const size_type n2) | |
Construct a Rank 2..8 array; use Tag#::Size for defaults. The input dimensions are the 2 slowest strides. | |
Array & | assign (value_type *arg_ptr, const size_type n1) |
Construct a Rank 1..8 array; use Tag#::Size for defaults. The input dimension is the slowest stride. | |
Array (value_type *arg_ptr, const size_type n1) | |
Construct a Rank 1..8 array; use Tag#::Size for defaults. The input dimension is the slowest stride. | |
Array & | assign (value_type *arg_ptr) |
Construct a Rank 1..8 array; use Tag#::Size for defaults. | |
Array (value_type *arg_ptr) | |
Construct a Rank 1..8 array; use Tag#::Size for defaults. | |
Array (const Array< Scalar, array_order > &rhs) | |
Construct compile-time array from run-time array. | |
operator const Array< Scalar, array_order > & () const | |
Return internal runtime implementation of the array. | |
operator typename Array< Scalar, array_order >::ReverseType () const | |
Return constructed reversed-ordering array. | |
void | assign_stride (value_type *arg_ptr, const size_type *arg_stride) |
Assign stride and pointer. | |
void | assign_stride (value_type *arg_ptr, const size_type *arg_stride, size_type arg_final_dim) |
Assign stride and pointer. | |
The preferred multi-dimensional Array interface with compile-time user-defined dimension ordinates.
Scalar | The "plain old data" type of the array's member data. |
array_order | An ArrayOrder value that specifies whether to use Natural (a.k.a. C-language) or Fortran ordering for the multi-dimensions and multi-indices. |
Tag:: | The Tag# template parameters document the user-defiend purpose of each dimension ordinate. The Rank of the array (i.e. the number of dimensions) is the number of user-defined dimension tags, up to eight. A user-defined dimension Tag# must be derived from the ArrayDimTag template class. |
Definition at line 3615 of file Shards_Array.hpp.
typedef Scalar shards::Array< Scalar, array_order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 >::value_type |
Type of member data.
Definition at line 3632 of file Shards_Array.hpp.
typedef array_traits::int_t shards::Array< Scalar, array_order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 >::size_type |
Type for sizes.
Definition at line 3635 of file Shards_Array.hpp.
typedef const ArrayDimTag* shards::Array< Scalar, array_order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 >::tag_type |
Type of runtime dimension tags.
Definition at line 3638 of file Shards_Array.hpp.
typedef helper::truncate shards::Array< Scalar, array_order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 >::TruncateType |
Subarray type that removes the slowest striding dimension (first natural or last fortran ordinate).
Definition at line 3712 of file Shards_Array.hpp.
typedef helper::reverse shards::Array< Scalar, array_order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 >::ReverseType |
The compatible multidimensional array with reversed multi-index ordering and dimension tags.
Definition at line 3816 of file Shards_Array.hpp.
anonymous enum |
Rank of the array is the number of non-void dimension tags.
Definition at line 3643 of file Shards_Array.hpp.
anonymous enum |
If the multidimension follows the natural ordering.
Definition at line 3646 of file Shards_Array.hpp.
anonymous enum |
If the multidimension follows the reverse (Fortran) ordering.
Definition at line 3649 of file Shards_Array.hpp.
anonymous enum |
If the member data storage is contiguous.
Definition at line 3652 of file Shards_Array.hpp.
|
inline |
Default constructor.
Definition at line 3819 of file Shards_Array.hpp.
|
inline |
Copy constructor.
Definition at line 3823 of file Shards_Array.hpp.
|
inline |
Copy constructor for compatible reverse type.
Definition at line 3830 of file Shards_Array.hpp.
|
inline |
Construct with array of dimensions.
Definition at line 3845 of file Shards_Array.hpp.
|
inline |
Construct a Rank 8 array.
Definition at line 3867 of file Shards_Array.hpp.
|
inline |
Construct a Rank 7..8 array; use Tag#::Size for defaults. The input dimensions are the 7 slowest strides.
Definition at line 3897 of file Shards_Array.hpp.
|
inline |
Construct a Rank 6..8 array; use Tag#::Size for defaults. The input dimensions are the 6 slowest strides.
Definition at line 3926 of file Shards_Array.hpp.
|
inline |
Construct a Rank 5..8 array; use Tag#::Size for defaults. The input dimensions are the 5 slowest strides.
Definition at line 3954 of file Shards_Array.hpp.
|
inline |
Construct a Rank 4..8 array; use Tag#::Size for defaults. The input dimensions are the 4 slowest strides.
Definition at line 3981 of file Shards_Array.hpp.
|
inline |
Construct a Rank 3..8 array; use Tag#::Size for defaults. The input dimensions are the 3 slowest strides.
Definition at line 4007 of file Shards_Array.hpp.
|
inline |
Construct a Rank 2..8 array; use Tag#::Size for defaults. The input dimensions are the 2 slowest strides.
Definition at line 4032 of file Shards_Array.hpp.
|
inline |
Construct a Rank 1..8 array; use Tag#::Size for defaults. The input dimension is the slowest stride.
Definition at line 4054 of file Shards_Array.hpp.
|
inline |
Construct a Rank 1..8 array; use Tag#::Size for defaults.
Definition at line 4071 of file Shards_Array.hpp.
|
inline |
Construct compile-time array from run-time array.
Definition at line 4080 of file Shards_Array.hpp.
|
inlineprotected |
Definition at line 4121 of file Shards_Array.hpp.
|
inline |
Rank of the array is the number of non-void dimension tags.
Definition at line 3655 of file Shards_Array.hpp.
|
inline |
If the multidimension follows the natural ordering.
Definition at line 3658 of file Shards_Array.hpp.
|
inline |
If the multidimension follows the reverse (Fortran) ordering.
Definition at line 3661 of file Shards_Array.hpp.
|
inline |
If the member data storage is contiguous.
Definition at line 3664 of file Shards_Array.hpp.
|
inline |
Access the dimension tag-singleton for a given ordinate.
Definition at line 3677 of file Shards_Array.hpp.
|
inline |
Dimension of the given ordinate.
Definition at line 3682 of file Shards_Array.hpp.
|
inline |
Dimension of the given ordinate.
Definition at line 3689 of file Shards_Array.hpp.
|
inline |
Dimensions of all ordinates.
Definition at line 3697 of file Shards_Array.hpp.
|
inline |
Total number of member data items.
Definition at line 3701 of file Shards_Array.hpp.
|
inline |
Generate a subarray view of the array with the slowest striding ordinate offset by i and removed.
Definition at line 3719 of file Shards_Array.hpp.
|
inline |
Pointer to contiguous block of member data.
Definition at line 3724 of file Shards_Array.hpp.
|
inline |
Access member via offset into contiguous block.
Definition at line 3728 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 8 array.
Definition at line 3733 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 7 array.
Definition at line 3744 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 6 array.
Definition at line 3755 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 5 array.
Definition at line 3765 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 4 array.
Definition at line 3775 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 3 array.
Definition at line 3784 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 2 array.
Definition at line 3793 of file Shards_Array.hpp.
|
inline |
Access member of a Rank 1 array.
Definition at line 3801 of file Shards_Array.hpp.
|
inline |
Assignment operator.
Definition at line 3826 of file Shards_Array.hpp.
|
inline |
Assignment operator for compatible reverse type.
Definition at line 3833 of file Shards_Array.hpp.
|
inline |
Assign pointer and dimensions.
Definition at line 3837 of file Shards_Array.hpp.
|
inline |
Construct a Rank 8 array.
Definition at line 3854 of file Shards_Array.hpp.
|
inline |
Construct a Rank 7..8 array; use Tag#::Size for defaults. The input dimensions are the 7 slowest strides.
Definition at line 3882 of file Shards_Array.hpp.
|
inline |
Construct a Rank 6..8 array; use Tag#::Size for defaults. The input dimensions are the 6 slowest strides.
Definition at line 3912 of file Shards_Array.hpp.
|
inline |
Construct a Rank 5..8 array; use Tag#::Size for defaults. The input dimensions are the 5 slowest strides.
Definition at line 3940 of file Shards_Array.hpp.
|
inline |
Construct a Rank 4..8 array; use Tag#::Size for defaults. The input dimensions are the 4 slowest strides.
Definition at line 3968 of file Shards_Array.hpp.
|
inline |
Construct a Rank 3..8 array; use Tag#::Size for defaults. The input dimensions are the 3 slowest strides.
Definition at line 3994 of file Shards_Array.hpp.
|
inline |
Construct a Rank 2..8 array; use Tag#::Size for defaults. The input dimensions are the 2 slowest strides.
Definition at line 4020 of file Shards_Array.hpp.
|
inline |
Construct a Rank 1..8 array; use Tag#::Size for defaults. The input dimension is the slowest stride.
Definition at line 4043 of file Shards_Array.hpp.
|
inline |
Construct a Rank 1..8 array; use Tag#::Size for defaults.
Definition at line 4063 of file Shards_Array.hpp.
|
inline |
Return internal runtime implementation of the array.
Definition at line 4092 of file Shards_Array.hpp.
|
inline |
Return constructed reversed-ordering array.
Definition at line 4095 of file Shards_Array.hpp.
|
inline |
Assign stride and pointer.
Definition at line 4099 of file Shards_Array.hpp.
|
inline |
Assign stride and pointer.
Definition at line 4108 of file Shards_Array.hpp.
|
friend |
Definition at line 4137 of file Shards_Array.hpp.
|
protected |
Definition at line 4132 of file Shards_Array.hpp.