IsComplexType
Description
Checks whether the input data is of complex type, including Complex128, Complex64, and Complex32.
Prototype
bool IsComplexType(const ge::DataType type)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
type |
Input |
Input data type. |
Return Value
If the input data type is complex number type, true is returned. Otherwise, false is returned.
Constraints
None
Example
1 2 3 4 5 6 | // If dtype is not a complex number, a return statement is executed. void Func(const DataType type) { if (!IsComplexType(type)) { return; } } |
Parent topic: data_type_utils