acltdtCreateDataItem
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
x |
|
x |
|
√ |
Description
Creates data of the acltdtDataItem type as a tensor of a service.
To destroy data of the acltdtDataItem type, call acltdtDestroyDataItem.
Prototype
1 2 3 4 5 6 | acltdtDataItem *acltdtCreateDataItem(acltdtTensorType tdtType, const int64_t *dims, size_t dimNum, aclDataType dataType, void *data, size_t size) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
tdtType |
Input |
Tensor type. For details about the type definition, see acltdtTensorType. |
dims |
Input |
Tensor shape. |
dimNum |
Input |
Dimension count in the tensor shape. |
dataType |
Input |
Data type of normal data. For details about the type definition, see aclDataType. |
data |
Input |
Pointer to the data address. |
size |
Input |
Data length. |
Returns
- Success: a pointer to data of the acltdtDataItem type
- Failure: nullptr
Parent topic: acltdtDataItem