holoscan::utils::get_data_per_model_cached

Beta
View as Markdown
gxf_result_t holoscan::utils::get_data_per_model_cached(
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,
cudaStream_t &cuda_stream_out,
TensorExtractCache &cache
)

Cached variant of get_data_per_model.

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

cuda_stream_out
cudaStream_t &

Any stream used from the input port will be stored here.

cache
TensorExtractCache &

Cache for the input-side counterpart of TensorTransmitCache.