cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
|
A richer (kind-of-a-)wrapper for CUDA's dim3
class, used to specify dimensions for blocks (in terms of threads) and of grids(in terms of blocks, or overall).
More...
#include <types.hpp>
Public Member Functions | |
constexpr __host__ __device__ | dimensions_t (dimension_t x_=1, dimension_t y_=1, dimension_t z_=1) |
constexpr __host__ __device__ | dimensions_t (const uint3 &v) |
constexpr __host__ __device__ | dimensions_t (const dim3 &dims) |
constexpr __host__ __device__ | dimensions_t (dim3 &&dims) |
constexpr __host__ __device__ | operator uint3 (void) const |
__host__ __device__ | operator dim3 (void) const |
constexpr __host__ __device__ size_t | volume () const |
constexpr __host__ __device__ dimensionality_t | dimensionality () const |
Static Public Member Functions | |
static constexpr __host__ __device__ dimensions_t | cube (dimension_t x) |
static constexpr __host__ __device__ dimensions_t | square (dimension_t x) |
static constexpr __host__ __device__ dimensions_t | line (dimension_t x) |
static constexpr __host__ __device__ dimensions_t | point () |
Public Attributes | |
dimension_t | x |
dimension_t | y |
dimension_t | z |
A richer (kind-of-a-)wrapper for CUDA's dim3
class, used to specify dimensions for blocks (in terms of threads) and of grids(in terms of blocks, or overall).
dim3
does not have constexpr methods - preventing us from having constexpr methods here.