alloc_raw_data_msg

Applicable Products

Product

Supported

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Allocates a continuous memory based on the input size to carry the FlowMsg of the raw data type.

Prototype

1
alloc_raw_data_msg(self, size, align:Optional[int] = 64) -> FlowMsg

Parameters

Parameter

Input/Output

Description

size

Input

Size of the allocated memory, in bytes.

align

Input

Size of the allocated memory address alignment. Values: [32, 64, 128, 256, 512, 1024]. Default value: 64.

Returns

The FlowMsg instance is returned in normal scenarios. If the allocation fails, None is returned.

Exception Handling

None

Constraints

None