data - 3.0 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2023-02-24
Version
3.0 English
Get the data address of the index and the size of the data available for use.

Prototype

std::pair<std::uint64_t, std::size_t> data(const std::vector<std::int32_t> idx = {});

Parameters

The following table lists the data function arguments.
Table 1. data Arguments
Type Name Description
const std::vector<std::int32_t> idx The index of the data to be accessed, its dimension same to the Tensor shape

Returns

A pair of the data address of the index and the size of the data available for use in byte unit.

Usage

vart::TensorBuffer* tb;
std::tie(data_addr, tensor_size) = tb->data({0,0,0,0});