shards Version of the Day
Loading...
Searching...
No Matches
shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void > Class Template Reference

The multi-dimensional Array interface with runtime user-defined dimension ordinates. Typically used when runtime-polymorphic arrays are passed to functions. More...

#include <Shards_Array.hpp>

Public Member Functions

template<class Tag1 , class Tag2 , class Tag3 , class Tag4 , class Tag5 , class Tag6 , class Tag7 , class Tag8 >
Arrayassign (value_type *ptr, size_type n1, size_type n2, size_type n3, size_type n4, size_type n5, size_type n6, size_type n7, size_type n8)
 
template<class Tag1 , class Tag2 , class Tag3 , class Tag4 , class Tag5 , class Tag6 , class Tag7 >
Arrayassign (value_type *ptr, size_type n1, size_type n2, size_type n3, size_type n4, size_type n5, size_type n6, size_type n7)
 
template<class Tag1 , class Tag2 , class Tag3 , class Tag4 , class Tag5 , class Tag6 >
Arrayassign (value_type *ptr, size_type n1, size_type n2, size_type n3, size_type n4, size_type n5, size_type n6)
 
template<class Tag1 , class Tag2 , class Tag3 , class Tag4 , class Tag5 >
Arrayassign (value_type *ptr, size_type n1, size_type n2, size_type n3, size_type n4, size_type n5)
 
template<class Tag1 , class Tag2 , class Tag3 , class Tag4 >
Arrayassign (value_type *ptr, size_type n1, size_type n2, size_type n3, size_type n4)
 
template<class Tag1 , class Tag2 , class Tag3 >
Arrayassign (value_type *ptr, size_type n1, size_type n2, size_type n3)
 
template<class Tag1 , class Tag2 >
Arrayassign (value_type *ptr, size_type n1, size_type n2)
 
template<class Tag1 >
Arrayassign (value_type *ptr, size_type n1)
 

Friends

template<typename , ArrayOrder , class , class , class , class , class , class , class , class >
class shards::Array
 

Array Attributes

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 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 (size_type ord) const
 Access the dimension tag-singleton for a given ordinate.
 
size_type dimension (size_type ord) const
 Dimension of the given ordinate.
 
template<typename iType >
void dimensions (std::vector< iType > &n)
 Dimension of all ordinate.
 
size_type size () const
 Total number of data items.
 

Constructors and Assignment Operators

typedef array_traits::Helper< Scalar, array_order, void, void, void, void, void, void, void, void >::reverse ReverseType
 
 Array (const Array &rhs)
 
Arrayoperator= (const Array &rhs)
 
 Array (const ReverseType &rhs)
 Copy constructor for reverse type.
 
Arrayoperator= (const ReverseType &rhs)
 Assignment operator for reverse type.
 
 Array (value_type *ptr, const size_type input_rank, const size_type *const dims, const tag_type *const tags)
 

Member data access operators

template<typename iType >
Array 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 full ordering of members.
 
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 via Rank 8 multi-index.
 
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
 
template<typename iType >
value_typeoperator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4, const iType &i5, const iType &i6) const
 
template<typename iType >
value_typeoperator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4, const iType &i5) const
 
template<typename iType >
value_typeoperator() (const iType &i1, const iType &i2, const iType &i3, const iType &i4) const
 
template<typename iType >
value_typeoperator() (const iType &i1, const iType &i2, const iType &i3) const
 
template<typename iType >
value_typeoperator() (const iType &i1, const iType &i2) const
 
template<typename iType >
value_typeoperator() (const iType &i1) const
 

Detailed Description

template<typename Scalar, ArrayOrder array_order>
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.

Parameters
ScalarThe "plain old data" type of the array's member data.
array_orderAn ArrayOrder value that specifies whether to use Natural (a.k.a. C-language) or Fortran ordering for the multi-dimensions and multi-indices.

Definition at line 3194 of file Shards_Array.hpp.

Member Typedef Documentation

◆ value_type

Type of member data.

Definition at line 3204 of file Shards_Array.hpp.

◆ size_type

template<typename Scalar , ArrayOrder array_order>
typedef array_traits::int_t shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::size_type

Type for sizes.

Definition at line 3207 of file Shards_Array.hpp.

◆ tag_type

Type of runtime dimension tags.

Definition at line 3210 of file Shards_Array.hpp.

◆ ReverseType

Definition at line 3368 of file Shards_Array.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<typename Scalar , ArrayOrder array_order>
anonymous enum

If the multidimension follows the natural ordering.

Definition at line 3215 of file Shards_Array.hpp.

◆ anonymous enum

template<typename Scalar , ArrayOrder array_order>
anonymous enum

If the multidimension follows the reverse (Fortran) ordering.

Definition at line 3218 of file Shards_Array.hpp.

◆ anonymous enum

template<typename Scalar , ArrayOrder array_order>
anonymous enum

If the member data storage is contiguous.

Definition at line 3221 of file Shards_Array.hpp.

Constructor & Destructor Documentation

◆ Array() [1/4]

template<typename Scalar , ArrayOrder array_order>
shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::Array ( )
inline

Definition at line 3372 of file Shards_Array.hpp.

◆ Array() [2/4]

template<typename Scalar , ArrayOrder array_order>
shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::Array ( const Array< Scalar, array_order, void, void, void, void, void, void, void, void > & rhs)
inline

Definition at line 3379 of file Shards_Array.hpp.

◆ Array() [3/4]

template<typename Scalar , ArrayOrder array_order>
shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::Array ( const ReverseType & rhs)
inline

Copy constructor for reverse type.

Definition at line 3396 of file Shards_Array.hpp.

◆ Array() [4/4]

template<typename Scalar , ArrayOrder array_order>
shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::Array ( value_type * ptr,
const size_type input_rank,
const size_type *const dims,
const tag_type *const tags )
inline

Definition at line 3416 of file Shards_Array.hpp.

Member Function Documentation

◆ rank()

template<typename Scalar , ArrayOrder array_order>
size_type shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::rank ( ) const
inline

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

Definition at line 3224 of file Shards_Array.hpp.

◆ natural()

template<typename Scalar , ArrayOrder array_order>
bool shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::natural ( ) const
inline

If the multidimension follows the natural ordering.

Definition at line 3227 of file Shards_Array.hpp.

◆ reverse()

template<typename Scalar , ArrayOrder array_order>
bool shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::reverse ( ) const
inline

If the multidimension follows the reverse (Fortran) ordering.

Definition at line 3230 of file Shards_Array.hpp.

◆ contiguous()

template<typename Scalar , ArrayOrder array_order>
bool shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::contiguous ( ) const
inline

If the member data storage is contiguous.

Definition at line 3233 of file Shards_Array.hpp.

◆ tag()

template<typename Scalar , ArrayOrder array_order>
tag_type shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::tag ( size_type ord) const
inline

Access the dimension tag-singleton for a given ordinate.

Definition at line 3238 of file Shards_Array.hpp.

◆ dimension()

template<typename Scalar , ArrayOrder array_order>
size_type shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::dimension ( size_type ord) const
inline

Dimension of the given ordinate.

Definition at line 3248 of file Shards_Array.hpp.

◆ dimensions()

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
void shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::dimensions ( std::vector< iType > & n)
inline

Dimension of all ordinate.

Definition at line 3257 of file Shards_Array.hpp.

◆ size()

template<typename Scalar , ArrayOrder array_order>
size_type shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::size ( ) const
inline

Total number of data items.

Definition at line 3264 of file Shards_Array.hpp.

◆ truncate()

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
Array shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::truncate ( const iType & i) const
inline

Generate a subarray view of the array with the slowest striding ordinate offset by i and removed.

Definition at line 3276 of file Shards_Array.hpp.

◆ contiguous_data()

template<typename Scalar , ArrayOrder array_order>
value_type * shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::contiguous_data ( ) const
inline

Pointer to contiguous block of member data.

Definition at line 3280 of file Shards_Array.hpp.

◆ operator[]()

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator[] ( const iType & i) const
inline

Access member via full ordering of members.

Definition at line 3284 of file Shards_Array.hpp.

◆ operator()() [1/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::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
inline

Access member via Rank 8 multi-index.

Definition at line 3293 of file Shards_Array.hpp.

◆ operator()() [2/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator() ( const iType & i1,
const iType & i2,
const iType & i3,
const iType & i4,
const iType & i5,
const iType & i6,
const iType & i7 ) const
inline

Definition at line 3303 of file Shards_Array.hpp.

◆ operator()() [3/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator() ( const iType & i1,
const iType & i2,
const iType & i3,
const iType & i4,
const iType & i5,
const iType & i6 ) const
inline

Definition at line 3313 of file Shards_Array.hpp.

◆ operator()() [4/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator() ( const iType & i1,
const iType & i2,
const iType & i3,
const iType & i4,
const iType & i5 ) const
inline

Definition at line 3322 of file Shards_Array.hpp.

◆ operator()() [5/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator() ( const iType & i1,
const iType & i2,
const iType & i3,
const iType & i4 ) const
inline

Definition at line 3331 of file Shards_Array.hpp.

◆ operator()() [6/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator() ( const iType & i1,
const iType & i2,
const iType & i3 ) const
inline

Definition at line 3339 of file Shards_Array.hpp.

◆ operator()() [7/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator() ( const iType & i1,
const iType & i2 ) const
inline

Definition at line 3347 of file Shards_Array.hpp.

◆ operator()() [8/8]

template<typename Scalar , ArrayOrder array_order>
template<typename iType >
value_type & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator() ( const iType & i1) const
inline

Definition at line 3354 of file Shards_Array.hpp.

◆ operator=() [1/2]

template<typename Scalar , ArrayOrder array_order>
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator= ( const Array< Scalar, array_order, void, void, void, void, void, void, void, void > & rhs)
inline

Definition at line 3386 of file Shards_Array.hpp.

◆ operator=() [2/2]

template<typename Scalar , ArrayOrder array_order>
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::operator= ( const ReverseType & rhs)
inline

Assignment operator for reverse type.

Definition at line 3404 of file Shards_Array.hpp.

◆ assign() [1/8]

Definition at line 3430 of file Shards_Array.hpp.

◆ assign() [2/8]

template<typename Scalar , ArrayOrder array_order>
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::assign ( value_type * ptr,
size_type n1,
size_type n2,
size_type n3,
size_type n4,
size_type n5,
size_type n6,
size_type n7 )
inline

Definition at line 3447 of file Shards_Array.hpp.

◆ assign() [3/8]

template<typename Scalar , ArrayOrder array_order>
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::assign ( value_type * ptr,
size_type n1,
size_type n2,
size_type n3,
size_type n4,
size_type n5,
size_type n6 )
inline

Definition at line 3463 of file Shards_Array.hpp.

◆ assign() [4/8]

template<typename Scalar , ArrayOrder array_order>
template<class Tag1 , class Tag2 , class Tag3 , class Tag4 , class Tag5 >
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::assign ( value_type * ptr,
size_type n1,
size_type n2,
size_type n3,
size_type n4,
size_type n5 )
inline

Definition at line 3480 of file Shards_Array.hpp.

◆ assign() [5/8]

template<typename Scalar , ArrayOrder array_order>
template<class Tag1 , class Tag2 , class Tag3 , class Tag4 >
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::assign ( value_type * ptr,
size_type n1,
size_type n2,
size_type n3,
size_type n4 )
inline

Definition at line 3496 of file Shards_Array.hpp.

◆ assign() [6/8]

template<typename Scalar , ArrayOrder array_order>
template<class Tag1 , class Tag2 , class Tag3 >
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::assign ( value_type * ptr,
size_type n1,
size_type n2,
size_type n3 )
inline

Definition at line 3511 of file Shards_Array.hpp.

◆ assign() [7/8]

template<typename Scalar , ArrayOrder array_order>
template<class Tag1 , class Tag2 >
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::assign ( value_type * ptr,
size_type n1,
size_type n2 )
inline

Definition at line 3526 of file Shards_Array.hpp.

◆ assign() [8/8]

template<typename Scalar , ArrayOrder array_order>
template<class Tag1 >
Array & shards::Array< Scalar, array_order, void, void, void, void, void, void, void, void >::assign ( value_type * ptr,
size_type n1 )
inline

Definition at line 3541 of file Shards_Array.hpp.

Friends And Related Symbol Documentation

◆ shards::Array

template<typename Scalar , ArrayOrder array_order>
template<typename , ArrayOrder , class , class , class , class , class , class , class , class >
friend class shards::Array
friend

Definition at line 3590 of file Shards_Array.hpp.


The documentation for this class was generated from the following file: