milupHPC documentation
Public Member Functions | Public Attributes | List of all members
ExecutionPolicy Class Reference

Execution policy/instruction for CUDA kernel execution. More...

+ Collaboration diagram for ExecutionPolicy:
Collaboration graph

Public Member Functions

 ExecutionPolicy ()
 
template<typename... Arguments>
 ExecutionPolicy (int n, void(*f)(Arguments...), Arguments ...args)
 Automatically calculate best execution policy. More...
 
 ExecutionPolicy (dim3 _gridSize, dim3 _blockSize, size_t _sharedMemBytes)
 Constructor for manually setting grid and block size as well as shared memory bytes. More...
 
 ExecutionPolicy (dim3 _gridSize, dim3 _blockSize)
 Constructor for manually setting grid and block size as well as shared memory bytes. More...
 

Public Attributes

dim3 gridSize
 grid size More...
 
dim3 blockSize
 block size More...
 
size_t sharedMemBytes
 shared memory (bytes) More...
 

Detailed Description

Execution policy/instruction for CUDA kernel execution.

Definition at line 33 of file cuda_launcher.cuh.

Constructor & Destructor Documentation

◆ ExecutionPolicy() [1/4]

ExecutionPolicy::ExecutionPolicy ( )

Definition at line 4 of file cuda_launcher.cu.

◆ ExecutionPolicy() [2/4]

template<typename... Arguments>
ExecutionPolicy::ExecutionPolicy ( int  n,
void(*)(Arguments...)  f,
Arguments ...  args 
)
inline

Automatically calculate best execution policy.

Calculate best execution policy in means of maximizing occupancy.

Warning
Currently test version!
Template Parameters
ArgumentsCUDA kernel arguments
Parameters
nParticle number to be iterated or more general outer SIMD iteration number.
fCUDA kernel (function pointer)
argsArguments of CUDA kernel

Definition at line 62 of file cuda_launcher.cuh.

◆ ExecutionPolicy() [3/4]

ExecutionPolicy::ExecutionPolicy ( dim3  _gridSize,
dim3  _blockSize,
size_t  _sharedMemBytes 
)

Constructor for manually setting grid and block size as well as shared memory bytes.

Parameters
_gridSizegrid size
_blockSizeblock size
_sharedMemBytesshared memory bytes

Definition at line 6 of file cuda_launcher.cu.

◆ ExecutionPolicy() [4/4]

ExecutionPolicy::ExecutionPolicy ( dim3  _gridSize,
dim3  _blockSize 
)

Constructor for manually setting grid and block size as well as shared memory bytes.

Parameters
_gridSizegrid size
_blockSizeblock size

Definition at line 9 of file cuda_launcher.cu.

Member Data Documentation

◆ blockSize

dim3 ExecutionPolicy::blockSize

block size

Definition at line 42 of file cuda_launcher.cuh.

◆ gridSize

dim3 ExecutionPolicy::gridSize

grid size

Definition at line 40 of file cuda_launcher.cuh.

◆ sharedMemBytes

size_t ExecutionPolicy::sharedMemBytes

shared memory (bytes)

Definition at line 44 of file cuda_launcher.cuh.


The documentation for this class was generated from the following files:
  • include/cuda_utils/cuda_launcher.cuh
  • src/cuda_utils/cuda_launcher.cu

milupHPC - ExecutionPolicy Class Reference
Generated on Wed Aug 31 2022 12:16:53 by Doxygen 1.9.3