TiledArray  0.7.0
TiledArray::TiledRange Class Reference

Range data of a tiled array. More...

#include <tiled_range.h>

Public Types

typedef TiledRange TiledRange_
 
typedef Range range_type
 
typedef std::size_t size_type
 
typedef range_type::index index
 
typedef range_type::size_array size_array
 
typedef std::vector< TiledRange1Ranges
 

Public Member Functions

 TiledRange ()
 Default constructor. More...
 
template<typename InIter >
 TiledRange (InIter first, InIter last)
 Constructed with a set of ranges pointed to by [ first, last ). More...
 
 TiledRange (const std::initializer_list< std::initializer_list< size_type > > &list)
 Constructed with a set of ranges pointed to by [ first, last ). More...
 
 TiledRange (const std::initializer_list< TiledRange1 > &list)
 Constructed with an initializer_list of TiledRange1's. More...
 
 TiledRange (const TiledRange_ &other)
 Copy constructor. More...
 
TiledRange_operator= (const TiledRange_ &other)
 TiledRange assignment operator. More...
 
TiledRange_operator*= (const Permutation &p)
 In place permutation of this range. More...
 
const range_typetiles_range () const
 Access the tile range. More...
 
DEPRECATED const range_typetiles () const
 Access the tile range. More...
 
const range_typeelements_range () const
 Access the element range. More...
 
DEPRECATED const range_typeelements () const
 Access the element range. More...
 
range_type tile (const size_type &i) const
 Constructs a range for the tile indexed by the given ordinal index. More...
 
range_type make_tile_range (const size_type &i) const
 Construct a range for the tile indexed by the given ordinal index. More...
 
template<typename Index >
std::enable_if<!std::is_integral< Index >::value, range_type >::type tile (const Index &index) const
 Construct a range for the tile indexed by the given index. More...
 
template<typename Index >
std::enable_if<! std::is_integral< Index >::value, range_type >::type make_tile_range (const Index &index) const
 Construct a range for the tile indexed by the given index. More...
 
template<typename Integer >
range_type tile (const std::initializer_list< Integer > &index) const
 Construct a range for the tile indexed by the given index. More...
 
template<typename Integer >
range_type make_tile_range (const std::initializer_list< Integer > &index) const
 Construct a range for the tile indexed by the given index. More...
 
template<typename Index >
std::enable_if<! std::is_integral< Index >::value, typename range_type::index >::type element_to_tile (const Index &index) const
 Convert an element index to a tile index. More...
 
std::size_t rank () const
 The rank accessor. More...
 
const TiledRange1dim (std::size_t d) const
 Accessor of the tiled range for one of the dimensions. More...
 
const Rangesdata () const
 Tile dimension boundary array accessor. More...
 
void swap (TiledRange_ &other)
 

Detailed Description

Range data of a tiled array.

TiledRange is a direct (Cartesian) product of 1-dimensional tiled ranges (TiledRange1)

Definition at line 31 of file tiled_range.h.

Member Typedef Documentation

◆ index

Definition at line 66 of file tiled_range.h.

◆ range_type

Definition at line 64 of file tiled_range.h.

◆ Ranges

Definition at line 68 of file tiled_range.h.

◆ size_array

◆ size_type

typedef std::size_t TiledArray::TiledRange::size_type

Definition at line 65 of file tiled_range.h.

◆ TiledRange_

Definition at line 63 of file tiled_range.h.

Constructor & Destructor Documentation

◆ TiledRange() [1/5]

TiledArray::TiledRange::TiledRange ( )
inline

Default constructor.

Definition at line 71 of file tiled_range.h.

Here is the caller graph for this function:

◆ TiledRange() [2/5]

template<typename InIter >
TiledArray::TiledRange::TiledRange ( InIter  first,
InIter  last 
)
inline

Constructed with a set of ranges pointed to by [ first, last ).

Definition at line 75 of file tiled_range.h.

◆ TiledRange() [3/5]

TiledArray::TiledRange::TiledRange ( const std::initializer_list< std::initializer_list< size_type > > &  list)
inline

Constructed with a set of ranges pointed to by [ first, last ).

Definition at line 82 of file tiled_range.h.

◆ TiledRange() [4/5]

TiledArray::TiledRange::TiledRange ( const std::initializer_list< TiledRange1 > &  list)
inline

Constructed with an initializer_list of TiledRange1's.

Definition at line 89 of file tiled_range.h.

◆ TiledRange() [5/5]

TiledArray::TiledRange::TiledRange ( const TiledRange_ other)
inline

Copy constructor.

Definition at line 96 of file tiled_range.h.

Member Function Documentation

◆ data()

const Ranges& TiledArray::TiledRange::data ( ) const
inline

Tile dimension boundary array accessor.

Returns
A reference to the array of Range1 objects.
Exceptions
nothing

Definition at line 268 of file tiled_range.h.

Here is the caller graph for this function:

◆ dim()

const TiledRange1& TiledArray::TiledRange::dim ( std::size_t  d) const
inline

Accessor of the tiled range for one of the dimensions.

Parameters
dthe dimension index, a nonnegative integer less than rank()
Returns
TIledRange1 object for dimension d

Definition at line 259 of file tiled_range.h.

Here is the call graph for this function:

◆ element_to_tile()

template<typename Index >
std::enable_if<! std::is_integral<Index>::value, typename range_type::index>::type TiledArray::TiledRange::element_to_tile ( const Index &  index) const
inline

Convert an element index to a tile index.

Template Parameters
Indexthe index type
Parameters
indexThe element index to convert
Returns
The tile index that corresponds to the given element index

Definition at line 240 of file tiled_range.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ elements()

DEPRECATED const range_type& TiledArray::TiledRange::elements ( ) const
inline

Access the element range.

Returns
A const reference to the element range object
Deprecated:
use TiledRange::elements_range() instead

Definition at line 145 of file tiled_range.h.

Here is the call graph for this function:

◆ elements_range()

const range_type& TiledArray::TiledRange::elements_range ( ) const
inline

Access the element range.

Returns
A const reference to the element range object

Definition at line 137 of file tiled_range.h.

Here is the caller graph for this function:

◆ make_tile_range() [1/3]

range_type TiledArray::TiledRange::make_tile_range ( const size_type i) const
inline

Construct a range for the tile indexed by the given ordinal index.

Parameters
iThe ordinal index of the tile range to be constructed
Exceptions
std::runtime_errorThrows if i is not included in the range
Returns
The constructed range object

Definition at line 165 of file tiled_range.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_tile_range() [2/3]

template<typename Index >
std::enable_if<! std::is_integral<Index>::value, range_type>::type TiledArray::TiledRange::make_tile_range ( const Index &  index) const
inline

Construct a range for the tile indexed by the given index.

Parameters
indexThe index of the tile range to be constructed
Exceptions
std::runtime_errorThrows if i is not included in the range
Returns
The constructed range object

Definition at line 191 of file tiled_range.h.

Here is the call graph for this function:

◆ make_tile_range() [3/3]

template<typename Integer >
range_type TiledArray::TiledRange::make_tile_range ( const std::initializer_list< Integer > &  index) const
inline

Construct a range for the tile indexed by the given index.

Parameters
indexThe tile index, given as a std::initializer_list
Exceptions
std::runtime_errorThrows if i is not included in the range
Returns
The constructed range object

Definition at line 229 of file tiled_range.h.

◆ operator*=()

TiledRange_& TiledArray::TiledRange::operator*= ( const Permutation p)
inline

In place permutation of this range.

Returns
A reference to this object

Definition at line 112 of file tiled_range.h.

Here is the call graph for this function:

◆ operator=()

TiledRange_& TiledArray::TiledRange::operator= ( const TiledRange_ other)
inline

TiledRange assignment operator.

Returns
A reference to this object

Definition at line 103 of file tiled_range.h.

Here is the call graph for this function:

◆ rank()

std::size_t TiledArray::TiledRange::rank ( ) const
inline

The rank accessor.

Returns
the rank (=number of dimensions) of this object

Definition at line 253 of file tiled_range.h.

Here is the caller graph for this function:

◆ swap()

void TiledArray::TiledRange::swap ( TiledRange_ other)
inline

Definition at line 271 of file tiled_range.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tile() [1/3]

range_type TiledArray::TiledRange::tile ( const size_type i) const
inline

Constructs a range for the tile indexed by the given ordinal index.

Parameters
iThe ordinal index of the tile range to be constructed
Exceptions
std::runtime_errorThrows if i is not included in the range
Returns
The constructed range object
Note
alias to TiledRange::make_tile_range() , introduced for consitency with TiledRange1::tile()

Definition at line 156 of file tiled_range.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tile() [2/3]

template<typename Index >
std::enable_if<!std::is_integral<Index>::value, range_type>::type TiledArray::TiledRange::tile ( const Index &  index) const
inline

Construct a range for the tile indexed by the given index.

Parameters
indexThe index of the tile range to be constructed
Exceptions
std::runtime_errorThrows if i is not included in the range
Returns
The constructed range object
Note
alias to TiledRange::make_tile_range() , introduced for consitency with TiledRange1::tile()

Definition at line 180 of file tiled_range.h.

Here is the call graph for this function:

◆ tile() [3/3]

template<typename Integer >
range_type TiledArray::TiledRange::tile ( const std::initializer_list< Integer > &  index) const
inline

Construct a range for the tile indexed by the given index.

Parameters
indexThe tile index, given as a std::initializer_list
Exceptions
std::runtime_errorThrows if i is not included in the range
Returns
The constructed range object
Note
alias to TiledRange::make_tile_range() , introduced for consitency with TiledRange1::tile()

Definition at line 218 of file tiled_range.h.

Here is the call graph for this function:

◆ tiles()

DEPRECATED const range_type& TiledArray::TiledRange::tiles ( ) const
inline

Access the tile range.

Returns
A const reference to the tile range object
Deprecated:
use TiledRange::tiles_range() instead

Definition at line 130 of file tiled_range.h.

Here is the call graph for this function:

◆ tiles_range()

const range_type& TiledArray::TiledRange::tiles_range ( ) const
inline

Access the tile range.

Returns
A const reference to the tile range object

Definition at line 122 of file tiled_range.h.

Here is the caller graph for this function:

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