AllocTensorMsg
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Allocates FlowMsg based on the shape, data type, and alignment size.
Prototype
1 | FlowMsgPtr AllocTensorMsg(const std::vector<int64_t> &shape, DataType data_type, uint32_t align = 512U) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
shape |
Input |
Shape of tensor FlowMsg. |
data_type |
Input |
Data type of tensor FlowMsg. |
align |
Input |
Alignment size for the allocated memory address. The value range is [32, 64, 128, 256, 512, 1024]. This parameter is reserved. |
Returns
Pointer to the allocated FlowMsg.
Exception Handling
NULL is returned if the FlowMsg allocation fails.
Constraints
None
Parent topic: FlowBufferFactory Data Type