判断输入的数据类型是否为复数类,包括Complex128、Complex64、Complex32。
bool IsComplexType(const DataType dtype)
参数 |
输入/输出 |
说明 |
---|---|---|
dtype |
输入 |
输入的数据类型。 |
若为复数类型返回true,否则返回false。
无
1 2 3 4 5 6 | // 判断dtype不为复数类型时,返回 void Func(const DataType dtype) { if (!IsComplexType(dtype)) { return; } } |