AllocTensorListMsg
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Allocates a continuous memory block based on the input dtype shapes array to carry the tensor array.
Prototype
1 | virtual std::shared_ptr<FlowMsg> AllocTensorListMsg(const std::vector<std::vector<int64_t>> &shapes, const std::vector<TensorDataType> &dataTypes, uint32_t align = 512U) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
shapes |
Input |
Shape list of the tensor list. |
dataTypes |
Input |
DataType list of the tensor list. |
align |
Input |
Alignment size of the allocated memory address. Values: [32, 64, 128, 256, 512, 1024]. |
Returns
Pointer to the allocated FlowMsg.
Exception Handling
NULL is returned if the tensor allocation fails.
Constraints
None
Parent topic: Class MetaRunContext