AllocRawDataMsg

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 block based on the input size to carry data of the RawData type.

Prototype

1
virtual std::shared_ptr<FlowMsg> AllocRawDataMsg(int64_t size, uint32_t align = 512U)

Parameters

Parameter

Input/Output

Description

size

Input

Size of the allocated memory.

align

Input

Alignment size for the allocated memory address. The value range is [32, 64, 128, 256, 512, 1024].

Returns

Pointer to the allocated FlowMsg.

Exception Handling

NULL is returned if the tensor allocation fails.

Constraints

None