TiledArray::TiledRange Class Reference

Documentation

Range data of a tiled array.

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

Definition at line 32 of file tiled_range.h.

Public Types

typedef TiledRange TiledRange_
 
typedef Range range_type
 
typedef range_type::index_type index_type
 
typedef range_type::ordinal_type ordinal_type
 
typedef range_type::index1_type index1_type
 
typedef container::svector< TiledRange1Ranges
 

Public Member Functions

 TiledRange ()
 Default constructor. More...
 
template<typename InIter >
 TiledRange (InIter first, InIter last)
 
template<typename TRange1Range , typename = std::enable_if_t< detail::is_range_v<TRange1Range> && std::is_same_v<detail::value_t<TRange1Range>, TiledRange1>>>
 TiledRange (const TRange1Range &range_of_trange1s)
 
template<typename Integer , typename = std::enable_if_t<std::is_integral_v<Integer>>>
 TiledRange (const std::initializer_list< std::initializer_list< Integer >> &list)
 Constructs using a list of lists convertible to TiledRange1. 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...
 
const range_typetiles () const
 Access the tile range. More...
 
const range_typeelements_range () const
 Access the element range. More...
 
const range_typeelements () const
 Access the element range. More...
 
range_type tile (const index1_type &i) const
 Constructs a range for the tile indexed by the given ordinal index. More...
 
range_type make_tile_range (const index1_type &i) const
 Construct a range for the tile indexed by the given ordinal index. More...
 
template<typename Index >
std::enable_if_t< detail::is_integral_range_v< Index >, range_typetile (const Index &index) const
 Construct a range for the tile indexed by the given index. More...
 
template<typename Index >
std::enable_if_t< detail::is_integral_range_v< Index >, range_typemake_tile_range (const Index &index) const
 Construct a range for the tile indexed by the given index. More...
 
template<typename Integer , typename = std::enable_if_t<std::is_integral_v<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 , typename = std::enable_if_t<std::is_integral_v<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_t< detail::is_integral_range_v< Index >, typename range_type::indexelement_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)
 
template<typename Archive , typename std::enable_if< madness::archive::is_input_archive< Archive >::value >::type * = nullptr>
void serialize (const Archive &ar)
 
template<typename Archive , typename std::enable_if< madness::archive::is_output_archive< Archive >::value >::type * = nullptr>
void serialize (const Archive &ar) const
 

Member Typedef Documentation

◆ index1_type

◆ index_type

◆ ordinal_type

◆ range_type

Definition at line 65 of file tiled_range.h.

◆ Ranges

◆ TiledRange_

Definition at line 64 of file tiled_range.h.

Constructor & Destructor Documentation

◆ TiledRange() [1/6]

TiledArray::TiledRange::TiledRange ( )
inline

Default constructor.

Definition at line 73 of file tiled_range.h.

Here is the caller graph for this function:

◆ TiledRange() [2/6]

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

Constructs using a range of TiledRange1 objects

Parameters
firstthe iterator pointing to the front of the range
lastthe iterator pointing past the back of the range

Definition at line 79 of file tiled_range.h.

◆ TiledRange() [3/6]

template<typename TRange1Range , typename = std::enable_if_t< detail::is_range_v<TRange1Range> && std::is_same_v<detail::value_t<TRange1Range>, TiledRange1>>>
TiledArray::TiledRange::TiledRange ( const TRange1Range &  range_of_trange1s)
inlineexplicit

Constructs using a range of TiledRange1 objects

Parameters
range_of_trange1sa range of TiledRange1 objects

Definition at line 90 of file tiled_range.h.

◆ TiledRange() [4/6]

template<typename Integer , typename = std::enable_if_t<std::is_integral_v<Integer>>>
TiledArray::TiledRange::TiledRange ( const std::initializer_list< std::initializer_list< Integer >> &  list)
inlineexplicit

Constructs using a list of lists convertible to TiledRange1.

Template Parameters
IntegerAn integral type
Parameters
lista list of lists of integers that can be converted to TiledRange1

Definition at line 104 of file tiled_range.h.

◆ TiledRange() [5/6]

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

Constructed with an initializer_list of TiledRange1's.

Definition at line 115 of file tiled_range.h.

◆ TiledRange() [6/6]

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

Copy constructor.

Definition at line 121 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 292 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 283 of file tiled_range.h.

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

◆ element_to_tile()

template<typename Index >
std::enable_if_t<detail::is_integral_range_v<Index>, typename range_type::index> TiledArray::TiledRange::element_to_tile ( const Index &  index) const
inline

Convert an element index to a tile index.

Template Parameters
IndexAn integral range type
Parameters
indexThe element index to convert
Returns
The tile index that corresponds to the given element index

Definition at line 259 of file tiled_range.h.

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

◆ elements()

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 164 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 158 of file tiled_range.h.

Here is the caller graph for this function:

◆ make_tile_range() [1/3]

template<typename Index >
std::enable_if_t<detail::is_integral_range_v<Index>, range_type> TiledArray::TiledRange::make_tile_range ( const Index &  index) const
inline

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

Template Parameters
IndexAn integral range type
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 207 of file tiled_range.h.

Here is the call graph for this function:

◆ make_tile_range() [2/3]

range_type TiledArray::TiledRange::make_tile_range ( const index1_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 180 of file tiled_range.h.

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

◆ make_tile_range() [3/3]

template<typename Integer , typename = std::enable_if_t<std::is_integral_v<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.

Template Parameters
IntegerAn integral type
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 246 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 137 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 129 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 277 of file tiled_range.h.

Here is the caller graph for this function:

◆ serialize() [1/2]

template<typename Archive , typename std::enable_if< madness::archive::is_input_archive< Archive >::value >::type * = nullptr>
void TiledArray::TiledRange::serialize ( const Archive &  ar)
inline

Definition at line 303 of file tiled_range.h.

◆ serialize() [2/2]

template<typename Archive , typename std::enable_if< madness::archive::is_output_archive< Archive >::value >::type * = nullptr>
void TiledArray::TiledRange::serialize ( const Archive &  ar) const
inline

Definition at line 310 of file tiled_range.h.

◆ swap()

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

Definition at line 294 of file tiled_range.h.

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

◆ tile() [1/3]

template<typename Index >
std::enable_if_t<detail::is_integral_range_v<Index>, range_type> TiledArray::TiledRange::tile ( const Index &  index) const
inline

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

Template Parameters
IndexAn integral range type
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 195 of file tiled_range.h.

Here is the call graph for this function:

◆ tile() [2/3]

range_type TiledArray::TiledRange::tile ( const index1_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 173 of file tiled_range.h.

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

◆ tile() [3/3]

template<typename Integer , typename = std::enable_if_t<std::is_integral_v<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.

Template Parameters
IntegerAn integral type
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 234 of file tiled_range.h.

Here is the call graph for this function:

◆ tiles()

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 153 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 147 of file tiled_range.h.

Here is the caller graph for this function:

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