|
Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
|
Struct to determine the optimal number of blocks and threads per block to use when launching a kernel. The member variables are threadsPerBlock and numBlocks which are chosen with the occupancy API.
More...
#include <cuda_utilities.h>
Public Member Functions | |
| AutomaticLaunchParams (T &kernel, size_t numElements=0) | |
Construct a new AutomaticLaunchParams object. By default it generates values of numBlocks and threadsPerBlock suitable for a kernel with a grid-stride loop. For a kernel with one thread per element set the optional numElements argument to the number of elements. | |
| ~AutomaticLaunchParams ()=default | |
| Defaulted Destructor. | |
| int | get_threadsPerBlock () const |
| Getter for threadsPerBlock. | |
| int | get_numBlocks () const |
| Getter for numBlocks. | |
Struct to determine the optimal number of blocks and threads per block to use when launching a kernel. The member variables are threadsPerBlock and numBlocks which are chosen with the occupancy API.
|
inline |
Construct a new AutomaticLaunchParams object. By default it generates values of numBlocks and threadsPerBlock suitable for a kernel with a grid-stride loop. For a kernel with one thread per element set the optional numElements argument to the number of elements.
| [in] | kernel | The kernel to determine the launch parameters for |
| [in] | numElements | The number of elements in the array that the kernel operates on |