IsIntegralType
Function Usage
Checks whether the input data is of integer type, including Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, and Uint64.
Prototype
bool IsIntegralType(const ge::DataType type)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
dtype |
Input |
Input data type. |
Returns
true: integer; false: otherwise.
Constraints
None
Examples
1 2 3 4 5 6 | // If dtype is not a integer type, a return statement is executed. void Func(const DataType dtype) { if (!IsIntegralType(dtype)) { return; } } |
Parent topic: data_type_utils