SetBufferLen

Product Support

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference product's AI Core

Atlas inference product's Vector Core

Atlas training products

Function

Sets the buffer length. When calling the operator[] function to create a new LocalTensor, you are advised to call this API to set the length of the new LocalTensor so that the compiler can automatically optimize memory and synchronization.

Prototype

1
__aicore__ inline void SetBufferLen(uint32_t dataLen)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

dataLen

Input

Number of elements in the buffer.

Returns

None

Restrictions

None

Example

For details, see Example.