AllocTensorMsg
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Allocates a message of the tensor type based on the shape and data type. This function is called by Proc.
Prototype
1 | std::shared_ptr<FlowMsg> AllocTensorMsg(const std::vector<int64_t> &shape, TensorDataType dataType) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
Shape |
Input |
Shape of a tensor. |
dataType |
Input |
Data type of a tensor. |
Returns
Pointer to the allocated tensor.
Exception Handling
NULL is returned if the tensor allocation fails.
Constraints
None
Parent topic: Class MetaRunContext