IsIntegralType
函数功能
判断输入的数据类型是否为整数类型,包括Int8、Int16、Int32、Int64、Uint8、Uint16、Uint32、Uint64。
函数原型
bool IsIntergralType(const DataType dtype)
参数说明
参数 |
输入/输出 |
说明 |
---|---|---|
dtype |
输入 |
输入的数据类型。 |
返回值说明
若为整数类型返回true,否则返回false。
约束说明
无
调用示例
// 判断dtype不为浮点数类型时,返回 void Func(const DataType dtype) { if (!IsIntegralType(dtype)) { return; } }
父主题: data_type_utils