cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
cuda::grid::overall_dimensions_t Struct Reference

Dimensions of a grid in threads, i.e. More...

#include <types.hpp>

Public Types

using dimension_type = overall_dimension_t
 

Public Member Functions

constexpr __host__ __device__ overall_dimensions_t (dimension_type width_, dimension_type height_, dimension_type depth_) noexcept
 
constexpr __host__ __device__ overall_dimensions_t (const dim3 &dims) noexcept
 
constexpr __host__ __device__ overall_dimensions_t (dim3 &&dims) noexcept
 
constexpr __host__ __device__ overall_dimensions_t (const overall_dimensions_t &other) noexcept
 
constexpr __host__ __device__ overall_dimensions_t (overall_dimensions_t &&other) noexcept
 
constexpr __host__ __device__ overall_dimensions_t (dimensions_t dims) noexcept
 
CPP14_CONSTEXPR overall_dimensions_toperator= (const overall_dimensions_t &other) noexcept=default
 
CPP14_CONSTEXPR overall_dimensions_toperator= (overall_dimensions_t &&other) noexcept=default
 
constexpr __host__ __device__ size_t volume () const noexcept
 
constexpr __host__ __device__ size_t size () const noexcept
 
constexpr __host__ __device__ dimensionality_t dimensionality () const noexcept
 
constexpr dimension_type operator[] (int i) const noexcept
 Provides array-like access to the dimensions in different axes. More...
 
CPP14_CONSTEXPR dimension_type & operator[] (int i) noexcept
 

Public Attributes

dimension_type x
 
dimension_type y
 
dimension_type z
 

Detailed Description

Dimensions of a grid in threads, i.e.

the axis-wise multiplication of block and grid dimensions of a grid.

Member Function Documentation

◆ operator[]()

constexpr dimension_type cuda::grid::overall_dimensions_t::operator[] ( int  i) const
inlinenoexcept

Provides array-like access to the dimensions in different axes.

Note
Behavior only defined for i between 0 and 2

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