IsIntegralType

Function Usage

Checks whether the input data of integer type, including Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, and Uint64.

Prototype

bool IsIntergralType(const DataType dtype)

Parameters

Parameter

Input/Output

Description

dtype

Input

Input data type.

Returns

true: integer; false: otherwise.

Constraints

None

Example

1
2
3
4
5
6
// If dtype is not an integer, a return statement is executed.
void Func(const DataType dtype) {
    if (!IsIntegralType(dtype)) {
        return;
    }
}