cuda::experimental::stf::box#

template<size_t dimensions>
class box#

An explicit shape is a shape or rank ‘dimensions’ where the bounds are explicit in each dimension.

Template Parameters:

dimensions – the rank of the shape

Constructors

Construct an explicit shape from its lower and upper bounds (inclusive lower bounds, exclusive upper bounds)

using coords_t = array_tuple<size_t, dimensions>#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

template<typename Int1, typename Int2>
inline box(
const ::std::array<::std::pair<Int1, Int2>, dimensions> &s,
)#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

template<typename Int>
inline box(
const ::std::array<Int, dimensions> &sizes,
)#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

template<typename ...Int>
inline box(Int... args)#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

template<typename ...E>
inline box(
::std::initializer_list<E>... args,
)#

Construct an explicit shape from its lower and upper bounds (inclusive lower bounds, exclusive upper bounds)

inline void print()#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

inline ::std::ptrdiff_t get_extent(size_t dim) const#

Get the number of elements along a dimension.

inline ::std::ptrdiff_t get_begin(size_t dim) const#

Get the first coordinate (included) in a specific dimension.

inline ::std::ptrdiff_t get_end(size_t dim) const#

Get the last coordinate (excluded) in a specific dimension.

inline ::std::ptrdiff_t size() const#

Get the total number of elements in this explicit shape.

inline constexpr size_t get_rank() const#

get the dimensionnality of the explicit shape

inline iterator begin()#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

inline iterator end()#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

inline bool operator==(const box &rhs) const#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

inline bool operator!=(const box &rhs) const#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

inline coords_t index_to_coords(size_t index) const#

Construct an explicit shape from its upper bounds (exclusive upper bounds)

class iterator#

Public Functions

inline iterator(const box &b, bool at_end = false)#
inline auto &operator*()#
inline iterator &operator++()#
inline bool operator==(const iterator &rhs) const#
inline bool operator!=(const iterator &other) const#