YAKL
Public Member Functions | List of all members
yakl::Bnds Class Reference

This class holds Fortran-style dimensions for using in creating yakl::Array objects. More...

#include <YAKL_Array.h>

Public Member Functions

YAKL_INLINE Bnds ()
 
YAKL_INLINE Bnds (Bnd b0)
 Construct an 1-D Dims object) More...
 
YAKL_INLINE Bnds (Bnd b0, Bnd b1)
 Construct an 2-D Dims object) More...
 
YAKL_INLINE Bnds (Bnd b0, Bnd b1, Bnd b2)
 Construct an 3-D Dims object) More...
 
YAKL_INLINE Bnds (Bnd b0, Bnd b1, Bnd b2, Bnd b3)
 Construct an 4-D Dims object) More...
 
YAKL_INLINE Bnds (Bnd b0, Bnd b1, Bnd b2, Bnd b3, Bnd b4)
 Construct an 5-D Dims object) More...
 
YAKL_INLINE Bnds (Bnd b0, Bnd b1, Bnd b2, Bnd b3, Bnd b4, Bnd b5)
 Construct an 6-D Dims object) More...
 
YAKL_INLINE Bnds (Bnd b0, Bnd b1, Bnd b2, Bnd b3, Bnd b4, Bnd b5, Bnd b6)
 Construct an 7-D Dims object) More...
 
YAKL_INLINE Bnds (Bnd b0, Bnd b1, Bnd b2, Bnd b3, Bnd b4, Bnd b5, Bnd b6, Bnd b7)
 Construct an 8-D Dims object) More...
 
YAKL_INLINE Bnds (Bnds &&bnds)
 
YAKL_INLINE Bnds (Bnds const &bnds)
 
template<class INT , unsigned int RANK, typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
 Bnds (CSArray< INT, 1, RANK > const dims)
 Allows CSArray object to be converted to a yakl::Bnds object if default lower bounds of 1 are desired for all dimensions. More...
 
template<class INT , int LOWER, int UPPER, typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
 Bnds (FSArray< INT, 1, SB< LOWER, UPPER >> const dims)
 Allows FSArray object to be converted to a yakl::Bnds object if default lower bounds of 1 are desired for all dimensions. More...
 
template<class INT , int LOWER1, int UPPER1, int LOWER2, int UPPER2, typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
 Bnds (FSArray< INT, 1, SB< LOWER1, UPPER1 >> const lbounds, FSArray< INT, 1, SB< LOWER2, UPPER2 >> const ubounds)
 Allows two FSArray objects (one for lower bounds, one for upper bounds) to be converted to a yakl::Bnds object. More...
 
 Bnds (std::vector< Bnd > const bnds)
 Allows an initializer list or std::vector to be converted to a yakl::Bnds object. More...
 
template<class INT , typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
 Bnds (std::vector< INT > const bnds)
 Allows an initializer list or std::vector to be converted to a yakl::Bnds object. More...
 
YAKL_INLINE Bndsoperator= (Bnds &&bnds)
 
YAKL_INLINE Bndsoperator= (Bnds const &bnds)
 
YAKL_INLINE Bnd operator[] (int i) const
 These objects are always indexed with square bracket notation like a std::vector or std::array. More...
 
YAKL_INLINE int size () const
 Get the number of dimensions. More...
 

Detailed Description

This class holds Fortran-style dimensions for using in creating yakl::Array objects.

You can pass an initializer list {...} or std::vector as a parameter to this type, and it can be converted to a yakl::Bnds object. Each Bnd element you pass can be an integer upper bound value (lower bound defaults to one) or a pair ({lower,upper}), since Fortran-style allows arbitrary lower bounds.

Constructor & Destructor Documentation

◆ Bnds() [1/16]

YAKL_INLINE yakl::Bnds::Bnds ( )
inline

◆ Bnds() [2/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0)
inline

Construct an 1-D Dims object)

◆ Bnds() [3/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0,
Bnd  b1 
)
inline

Construct an 2-D Dims object)

◆ Bnds() [4/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0,
Bnd  b1,
Bnd  b2 
)
inline

Construct an 3-D Dims object)

◆ Bnds() [5/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0,
Bnd  b1,
Bnd  b2,
Bnd  b3 
)
inline

Construct an 4-D Dims object)

◆ Bnds() [6/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0,
Bnd  b1,
Bnd  b2,
Bnd  b3,
Bnd  b4 
)
inline

Construct an 5-D Dims object)

◆ Bnds() [7/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0,
Bnd  b1,
Bnd  b2,
Bnd  b3,
Bnd  b4,
Bnd  b5 
)
inline

Construct an 6-D Dims object)

◆ Bnds() [8/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0,
Bnd  b1,
Bnd  b2,
Bnd  b3,
Bnd  b4,
Bnd  b5,
Bnd  b6 
)
inline

Construct an 7-D Dims object)

◆ Bnds() [9/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnd  b0,
Bnd  b1,
Bnd  b2,
Bnd  b3,
Bnd  b4,
Bnd  b5,
Bnd  b6,
Bnd  b7 
)
inline

Construct an 8-D Dims object)

◆ Bnds() [10/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnds const &  bnds)
inline

◆ Bnds() [11/16]

YAKL_INLINE yakl::Bnds::Bnds ( Bnds &&  bnds)
inline

◆ Bnds() [12/16]

yakl::Bnds::Bnds ( std::vector< Bnd > const  bnds)
inline

Allows an initializer list or std::vector to be converted to a yakl::Bnds object.

◆ Bnds() [13/16]

template<class INT , typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
yakl::Bnds::Bnds ( std::vector< INT > const  bnds)
inline

Allows an initializer list or std::vector to be converted to a yakl::Bnds object.

◆ Bnds() [14/16]

template<class INT , unsigned int RANK, typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
yakl::Bnds::Bnds ( CSArray< INT, 1, RANK > const  dims)
inline

Allows CSArray object to be converted to a yakl::Bnds object if default lower bounds of 1 are desired for all dimensions.

◆ Bnds() [15/16]

template<class INT , int LOWER, int UPPER, typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
yakl::Bnds::Bnds ( FSArray< INT, 1, SB< LOWER, UPPER >> const  dims)
inline

Allows FSArray object to be converted to a yakl::Bnds object if default lower bounds of 1 are desired for all dimensions.

◆ Bnds() [16/16]

template<class INT , int LOWER1, int UPPER1, int LOWER2, int UPPER2, typename std::enable_if< std::is_integral< INT >::value, bool >::type = false>
yakl::Bnds::Bnds ( FSArray< INT, 1, SB< LOWER1, UPPER1 >> const  lbounds,
FSArray< INT, 1, SB< LOWER2, UPPER2 >> const  ubounds 
)
inline

Allows two FSArray objects (one for lower bounds, one for upper bounds) to be converted to a yakl::Bnds object.

Member Function Documentation

◆ operator=() [1/2]

YAKL_INLINE Bnds& yakl::Bnds::operator= ( Bnds &&  bnds)
inline

◆ operator=() [2/2]

YAKL_INLINE Bnds& yakl::Bnds::operator= ( Bnds const &  bnds)
inline

◆ operator[]()

YAKL_INLINE Bnd yakl::Bnds::operator[] ( int  i) const
inline

These objects are always indexed with square bracket notation like a std::vector or std::array.

◆ size()

YAKL_INLINE int yakl::Bnds::size ( ) const
inline

Get the number of dimensions.


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