Class CudaFunctionLauncher
Defined in File cuda_rtc.hpp
-
class CudaFunctionLauncher
This class is used to compile the provided CUDA source code and call kernel functions defined by that code.
Public Functions
-
CudaFunctionLauncher(const char *source, const std::vector<std::string> &functions, const std::vector<std::string> &options = std::vector<std::string>())
Construct a new CudaFunctionLauncher object
- Parameters
source – pointer to source code
functions – list of functions defined by the source code.
options – options to pass to the compiler
-
~CudaFunctionLauncher()
-
template<class ...TYPES>
inline void launch(const std::string &name, const dim3 &grid, CUstream stream, TYPES... args) const Launch a kernel on a grid.
- Parameters
grid – [in] grid size
stream – [in] stream
args – [in] kernel arguments (optional)
-
template<class ...TYPES>
inline void launch(const std::string &name, const dim3 &grid, const dim3 &block, CUstream stream, TYPES... args) const Launch a kernel with block size on a grid.
- Parameters
grid – [in] grid size
block – [in] block size
stream – [in] stream
args – [in] kernel arguments (optional)
-
CudaFunctionLauncher(const char *source, const std::vector<std::string> &functions, const std::vector<std::string> &options = std::vector<std::string>())