NVIDIA Holoscan SDK v2.9.0

Class ExecutionContext

Derived Type

class ExecutionContext

Class to hold the execution context.

This class provides the execution context for the operator.

Subclassed by holoscan::gxf::GXFExecutionContext

Public Functions

ExecutionContext() = default

Construct a new Execution Context object.

virtual ~ExecutionContext() = default
inline InputContext *input() const

Get the input context.

Returns

The pointer to the input context.

inline OutputContext *output() const

Get the output context.

Returns

The pointer to the output context.

inline void *context() const

Get the context.

Returns

The pointer to the context.

virtual expected<cudaStream_t, RuntimeError> allocate_cuda_stream(const std::string &stream_name = "") = 0

allocate a new GXF CudaStream object and return the contained cudaStream_t

virtual void synchronize_streams(const std::vector<std::optional<cudaStream_t>> &cuda_streams, cudaStream_t target_cuda_stream) = 0

synchronize all of the streams in cuda_streams with target_cuda_stream

virtual expected<int, RuntimeError> device_from_stream(cudaStream_t stream) = 0

determine the CUDA device corresponding to the given stream

Protected Attributes

InputContext *input_context_ = nullptr

The input context.

OutputContext *output_context_ = nullptr

The output context.

void *context_ = nullptr

The context.

Previous Class EventBasedScheduler
Next Class Executor
© Copyright 2022-2024, NVIDIA. Last updated on Mar 12, 2025.