cuda::experimental::stf::cyclic_shape

Defined in include/cuda/experimental/__stf/places/cyclic_shape.cuh

template<size_t dimensions = 1>
class cyclic_shape

An cyclic shape is a shape or rank ‘dimensions’ where the bounds are explicit in each dimension, and where we jump between elements with a specific stride.

Template Parameters

dimensions – the rank of the shape

Constructors

inline explicit cyclic_shape(const ::std::array<::std::tuple<size_t, size_t, size_t>, dimensions> &list)

Construct and explicit shape from a list of lower and upper bounds.

inline cyclic_shape(const ::std::array<size_t, dimensions> &begins_, const ::std::array<size_t, dimensions> &ends_, const ::std::array<size_t, dimensions> &strides_)

Construct and explicit shape from a list of lower and upper bounds.

inline void print() const

Construct and explicit shape from a list of lower and upper bounds.

Public Functions

inline ::std::ptrdiff_t size() const

Get the total number of elements in this explicit shape.

inline bool operator==(const cyclic_shape &other) const
inline size_t get_rank() const

get the dimensionnality of the explicit shape

inline iterator begin()
inline iterator end()
class iterator

Public Functions

inline iterator(cyclic_shape &s, size_t idx = 0)
inline auto &operator*()
inline iterator &operator++()
inline bool operator==(const iterator &other) const
inline bool operator!=(const iterator &other) const