MLIR 22.0.0git
Complex.cpp File Reference

Go to the source code of this file.

Functions

 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION (Complex, complex, mlir::complex::ComplexDialect) bool mlirAttributeIsAComplex(MlirAttribute attr)
MlirAttribute mlirComplexAttrDoubleGet (MlirContext ctx, MlirType type, double real, double imag)
 Creates a complex attribute in the given context with the given double real and imaginary values and double-precision FP semantics.
MlirAttribute mlirComplexAttrDoubleGetChecked (MlirLocation loc, MlirType type, double real, double imag)
 Same as "mlirComplexAttrDoubleGet", but if the type is not valid for a construction of a ComplexAttr, returns a null MlirAttribute.
double mlirComplexAttrGetRealDouble (MlirAttribute attr)
 Returns the real value stored in the given complex attribute, interpreting the value as double.
double mlirComplexAttrGetImagDouble (MlirAttribute attr)
 Returns the imaginaryvalue stored in the given complex attribute, interpreting the value as double.
MlirTypeID mlirComplexAttrGetTypeID (void)
 Returns the typeID of a Complex attribute.

Function Documentation

◆ MLIR_DEFINE_CAPI_DIALECT_REGISTRATION()

MLIR_DEFINE_CAPI_DIALECT_REGISTRATION ( Complex ,
complex ,
mlir::complex::ComplexDialect  )

Definition at line 17 of file Complex.cpp.

References unwrap().

◆ mlirComplexAttrDoubleGet()

MlirAttribute mlirComplexAttrDoubleGet ( MlirContext ctx,
MlirType type,
double real,
double imag )

Creates a complex attribute in the given context with the given double real and imaginary values and double-precision FP semantics.

Definition at line 24 of file Complex.cpp.

References unwrap(), and wrap().

◆ mlirComplexAttrDoubleGetChecked()

MlirAttribute mlirComplexAttrDoubleGetChecked ( MlirLocation loc,
MlirType type,
double real,
double imag )

Same as "mlirComplexAttrDoubleGet", but if the type is not valid for a construction of a ComplexAttr, returns a null MlirAttribute.

Definition at line 30 of file Complex.cpp.

References unwrap(), and wrap().

◆ mlirComplexAttrGetImagDouble()

double mlirComplexAttrGetImagDouble ( MlirAttribute attr)

Returns the imaginaryvalue stored in the given complex attribute, interpreting the value as double.

Definition at line 40 of file Complex.cpp.

References unwrap().

◆ mlirComplexAttrGetRealDouble()

double mlirComplexAttrGetRealDouble ( MlirAttribute attr)

Returns the real value stored in the given complex attribute, interpreting the value as double.

Definition at line 36 of file Complex.cpp.

References unwrap().

◆ mlirComplexAttrGetTypeID()

MlirTypeID mlirComplexAttrGetTypeID ( void )

Returns the typeID of a Complex attribute.

Definition at line 44 of file Complex.cpp.

References wrap().