SetDataType

Function Usage

Sets the data type of an aclTensor.

Prototype

void SetDataType(op::DataType dataType)

Parameters

Parameter

Input/Output

Description

dataType

Input

The data type is op::DataType (that is, ge::DataType), which sets the aclTensor to dataType.

NOTE:

For details about ge::DataType, see ge::DataType in Basic Data Structures and API Reference.

Returns

None

Constraints

None

Examples

1
2
3
4
// Set the data type of the input to int64.
void Func(const aclTensor *input) {
    input->SetDataType(DT_INT64);
}