shards::Array< Scalar, array_order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 > Class Template Reference
[Multidimensional Array with Tagged Dimensions]

The preferred multi-dimensional Array interface with compile-time user-defined dimension ordinates. More...

#include <Shards_Array.hpp>

List of all members.

Protected Member Functions

 Array (const Array< Scalar, array_order > &rhs, size_type i)

Protected Attributes

Array< value_type, array_order > m_array

Friends

class shards::Array

Array Attributes



enum  { Rank = helper::Rank }
 

Rank of the array is the number of non-void dimension tags.


enum  { Natural = NaturalOrder == array_order }
 

If the multidimension follows the natural ordering.


enum  { Reverse = FortranOrder == array_order }
 

If the multidimension follows the reverse (Fortran) ordering.


enum  { Contiguous = true }
 

If the member data storage is contiguous.


typedef Scalar value_type
 Type of member data.
typedef array_traits::int_t size_type
 Type for sizes.
typedef const ArrayDimTagtag_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_typecontiguous_data () const
 Pointer to contiguous block of member data.
template<typename iType >
value_typeoperator[] (const iType &i) const
 Access member via offset into contiguous block.
template<typename iType >
value_typeoperator() (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_typeoperator() (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_typeoperator() (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_typeoperator() (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_typeoperator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4) const
 Access member of a Rank 4 array.
template<typename iType >
value_typeoperator() (const iType &i1, const iType &i2, const iType &i3) const
 Access member of a Rank 3 array.
template<typename iType >
value_typeoperator() (const iType &i1, const iType &i2) const
 Access member of a Rank 2 array.
template<typename iType >
value_typeoperator() (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.
Arrayoperator= (const Array &rhs)
 Assignment operator.
 Array (const ReverseType &rhs)
 Copy constructor for compatible reverse type.
Arrayoperator= (const ReverseType &rhs)
 Assignment operator for compatible reverse type.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.
Arrayassign (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.

Detailed Description

template<typename Scalar, ArrayOrder array_order, class Tag1, class Tag2, class Tag3, class Tag4, class Tag5, class Tag6, class Tag7, class Tag8>
class shards::Array< Scalar, array_order, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 >

The preferred multi-dimensional Array interface with compile-time user-defined dimension ordinates.

Template Parameters:
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.
See also:
ArrayDimTag ArrayOrder

Definition at line 3465 of file Shards_Array.hpp.


The documentation for this class was generated from the following file:
Generated on Wed Mar 31 15:02:54 2010 for shards by  doxygen 1.6.3