cuda::experimental::stf::dim4#

class dim4 : public cuda::experimental::stf::pos4#

dim4 class defining the size of a multidimensional object (default value 1 in each axis)

Public Functions

dim4() = default#
inline explicit constexpr dim4(int x, int y = 1, int z = 1, int t = 1)#

Create a dim4 from its extents.

inline constexpr size_t size() const#

Get the total size (multiply all dimensions)

inline constexpr size_t get_index(const pos4 &p) const#

Get the 1D index of a coordinate defined by a pos4 class within a dim4 class.

inline constexpr size_t get_rank() const#

Get the maximum dimension that is not 1.

inline constexpr int get(size_t axis_id) const#

Get the position along a specific axis.

inline constexpr int operator()(int axis_id) const#

Get the position along a specific axis.

inline constexpr bool operator<(const pos4 &rhs) const#

Comparison of two pos4 in lexicographical order.

inline constexpr bool operator==(const pos4 &rhs) const#

Equality test between two pos4.

inline ::std::string to_string() const#

Convert the pos4 to a string.

Public Members

int x = 0#
int y = 0#
int z = 0#
int t = 0#

Public Static Functions

static inline constexpr dim4 min(const dim4 &a, const dim4 &b)#

Compute the dim4 class obtained by taking the minimum of two dim4 along each axis.