holoscan::CudaFunctionLauncher

Beta
View as Markdown

This class is used to compile the provided CUDA source code and call kernel functions defined by that code.

#include <holoscan/cuda_rtc.hpp>

Constructors

CudaFunctionLauncher

holoscan::CudaFunctionLauncher::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
const char *

Pointer to source code

functions
const std::vector<std::string> &

List of functions defined by the source code.

options
const std::vector<std::string> &Defaults to std::vector< std::string >()

Options to pass to the compiler

Destructor

~CudaFunctionLauncher


Methods

launch

template <class... TYPES>
void holoscan::CudaFunctionLauncher::launch(
const std::string &name,
const dim3 &grid,
CUstream stream,
TYPES... args
) const

Launch a kernel on a grid.

Parameters

grid
const dim3 &

[in] grid size

stream
CUstream

[in] stream

args
TYPES...

[in] kernel arguments (optional)

launch_internal

void holoscan::CudaFunctionLauncher::launch_internal(
const std::string &name,
const dim3 &grid,
const dim3 *block,
CUstream stream,
void **args
) const

Member variables

NameTypeDescription
module_CUmodule
functions_std::unordered_map< std::string, LaunchParams >

Inner classes

LaunchParams

struct holoscan::CudaFunctionLauncher::LaunchParams
NameTypeDescription
block_dim_dim3
function_CUfunction