跳转至

msptiBuffersCallbackRequestFunc

Supported Products

[!NOTE]

For details about Ascend product models, see Ascend Product Models.

Product Type Supported
Ascend 950 products √
Atlas A3 training products/Atlas A3 inference products √
Atlas A2 training products/Atlas A2 inference products √
Atlas 200I/500 A2 inference products √
Atlas inference products ×
Atlas training products ×

Description

Registers the callback function with msPTI to allocate the storage space of the activity buffer. When using the Activity API, a user (subscriber) needs to customize this function and register it with msPTI. When the storage space of the activity buffer is insufficient, msPTI calls this function to allocate new storage space.

Function Prototype

typedef void(*msptiBuffersCallbackRequestFunc)(uint8_t **buffer, size_t *size, size_t *maxNumRecords)

Parameter Description

Table 1 Parameter Description

Parameter Name

Input/Output

Description

buffer

Output

Sets the address of the activity buffer.

size

output.

Sets the size of the activity buffer. (You are advised to allocate at least 2 MB memory.)

maxNumRecords

output.

Sets the number of records in the activity buffer. The value is generally **0**.

Returns

None