GetBuffer

Function Usage

Obtains the tensor pointer.

Prototype

1
void* TensorBase::GetBuffer() const;
1
APP_ERROR TensorBase::GetBuffer(void *&ptr, const std::vector<uint32_t> &indices) const;
1
2
template<typename T, typename... Ix>
APP_ERROR TensorBase::GetBuffer(T* &value, Ix... index) const;

Parameters

Parameter

Input/Output

Description

ptr

Output

Obtained buffer pointer.

indices

Input

Input index list and the source memory to be copied.

value

Output

Obtained buffer.

index

Input

Input index value.

Response Parameters

Data Structure

Description

void*

Start address of the pointer, that is, the buffer pointer.

APP_ERROR

For details about the returned error codes, see APP_ERROR Description.