holoscan::utils::get_data_per_model

Beta
View as Markdown
gxf_result_t holoscan::utils::get_data_per_model(
InputContext &op_input,
const std::vector<std::string> &in_tensors,
HoloInfer::DataMap &data_per_input_tensor,
std::map<std::string, std::vector<int>> &dims_per_tensor,
bool cuda_buffer_out,
const std::string &module,
gxf_context_t &context,
CudaStreamHandler &cuda_stream_handler
)

Extracts data from GXF Receivers.

This version of get_data_per_model uses the legacy CudaStreamHandler utility. Use the variant without a cuda_stream_handler argument to use the built-in CudaObjectHandler instead.

Returns: GXF result code

Parameters

op_input
InputContext &

Input context

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

Input tensor names

data_per_input_tensor
HoloInfer::DataMap &

Map is updated with output tensor name as key mapped to data buffer

dims_per_tensor
std::map<std::string, std::vector<int>> &

Map is updated with tensor name as key mapped to dimension of input tensor

cuda_buffer_out
bool

Flag defining the location of output memory (Device or Host)

module
const std::string &

Module that called for data extraction

context
gxf_context_t &

GXF execution context

cuda_stream_handler
CudaStreamHandler &

Cuda stream handler