GetBuffer

Function Usage

Obtains the tensor pointer.

Prototype 1

void* GetBuffer() const;

Return Parameter Description 1

Data Structure

Description

void*

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

Prototype 2

APP_ERROR GetBuffer(void *&ptr, const std::vector<uint32_t> &indices) const;

Parameter Description 2

Parameter

Input/Output

Description

ptr

Output

Obtained buffer pointer.

indices

Input

Input index list and the source memory to be copied.

Return Parameter Description 2

Data Structure

Description

APP_ERROR

Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file.

Prototype 3

template<typename T, typename... Ix>
APP_ERROR GetBuffer(T* &value, Ix... index) const;

Parameter Description 3

Parameter

Input/Output

Description

value

Output

Obtained buffer.

index

Input

Input index value.

Return Parameter Description 3

Data Structure

Description

APP_ERROR

Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file.