cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
cuda::array::dimensions_t< 2 > Struct Template Reference

Dimensions for 2D CUDA arrays. More...

#include <types.hpp>

Public Member Functions

constexpr __host__ __device__ dimensions_t (dimension_t width_, dimension_t height_)
 
constexpr __host__ __device__ dimensions_t (const dimensions_t &other)
 
constexpr __host__ __device__ dimensions_t (dimensions_t &&other)
 
constexpr __host__ __device__ dimensions_t (dimension_t linear_size)
 
CPP14_CONSTEXPR __host__ __device__ dimensions_toperator= (const dimensions_t &other)
 
CPP14_CONSTEXPR __host__ __device__ dimensions_toperator= (dimensions_t &&other)
 
constexpr __host__ __device__ size_t area () const
 The total number of elements in a 2D entity with these dimensions.
 
constexpr __host__ __device__ size_t size () const
 The total number of elements in a 2D entity with these dimensions. More...
 
constexpr __host__ __device__ dimensionality_t dimensionality () const
 The number of non-trivial dimensions in this object (axes in which an object with these dimensions is not "flat")
 

Static Public Member Functions

static constexpr __host__ __device__ dimensions_t square (dimension_t x)
 Named constructor idiom: Dimensions for an equi-lateral cube.
 
static constexpr __host__ __device__ dimensions_t zero ()
 Named constructor idiom: Dimensions for a one-element object: "Flat" in all individual.
 

Public Attributes

dimension_t width
 The two constituent individual dimensions, named; no "depth" for the 2D case.
 
dimension_t height
 

Detailed Description

template<>
struct cuda::array::dimensions_t< 2 >

Dimensions for 2D CUDA arrays.

Member Function Documentation

◆ size()

constexpr __host__ __device__ size_t cuda::array::dimensions_t< 2 >::size ( ) const
inline

The total number of elements in a 2D entity with these dimensions.


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