Skip to navigation

holoscan::copy_dl_tensor_with_owned_metadata

Beta
View as Markdown
HOLOSCAN_CORE_EXPORT void holoscan::copy_dl_tensor_with_owned_metadata(
const DLTensor &source,
DLTensor &destination,
std::vector<int64_t> &owned_shape,
std::vector<int64_t> &owned_strides,
)

Copy a DLTensor while pointing the destination shape/stride arrays at owned storage.

Parameters

source
const DLTensor &

The DLTensor to copy.

destination
DLTensor &

[out] The DLTensor to populate (shape/strides point into the owned vectors).

owned_shape
std::vector<int64_t> &

[out] Owned shape storage.

owned_strides
std::vector<int64_t> &

[out] Owned stride storage (in elements).

options
DLPackMetadataCopyOptionsDefaults to {}

Copy options (e.g. materialize implicit strides).