acltdtCreateDataItem

The Atlas 200/300/500 Inference Product does not support this API.

Description

Creates data of the acltdtDataItem type as a Tensor.

To destroy data of the acltdtDataItem type, call acltdtDestroyDataItem.

Prototype

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.

dims

Input

Tensor shape.

dimNum

Input

Tensor dimension count.

dataType

Input

Data type of the normal data.

data

Input

Pointer to the data address.

size

Input

Buffer size.

Returns

  • Success: a pointer to data of the acltdtDataItem type
  • Failure: nullptr