Taskflow  3.2.0-Master-Branch
Loading...
Searching...
No Matches
tf::cudaExecutionPolicy< NT, VT > Class Template Reference

class to define execution policy for CUDA standard algorithms More...

#include <cuda_execution_policy.hpp>

Public Member Functions

 cudaExecutionPolicy ()=default
 constructs an execution policy object with default stream
 
 cudaExecutionPolicy (cudaStream_t s)
 constructs an execution policy object with the given stream
 
cudaStream_t stream () noexcept
 queries the associated stream
 
void stream (cudaStream_t stream) noexcept
 assigns a stream
 

Static Public Attributes

static const unsigned nt = NT
 static constant for getting the number of threads per block
 
static const unsigned vt = VT
 static constant for getting the number of work units per thread
 
static const unsigned nv = NT*VT
 static constant for getting the number of elements to process per block
 

Detailed Description

template<unsigned NT, unsigned VT>
class tf::cudaExecutionPolicy< NT, VT >

class to define execution policy for CUDA standard algorithms

Template Parameters
NTnumber of threads per block
VTnumber of work units per thread

Execution policy configures the kernel execution parameters in CUDA algorithms. The first template argument, NT, the number of threads per block should always be a power-of-two number. The second template argument, VT, the number of work units per thread is recommended to be an odd number to avoid bank conflict.

Details can be referred to Execution Policy.


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