MLIR 23.0.0git
BuiltinAttributes.cpp File Reference

Go to the source code of this file.

Functions

MlirAttribute mlirAttributeGetNull ()
 Returns an empty attribute.
bool mlirAttributeIsALocation (MlirAttribute attr)
bool mlirAttributeIsAAffineMap (MlirAttribute attr)
 Checks whether the given attribute is an affine map attribute.
MlirAttribute mlirAffineMapAttrGet (MlirAffineMap map)
 Creates an affine map attribute wrapping the given map.
MlirStringRef mlirAffineMapAttrGetName (void)
MlirAffineMap mlirAffineMapAttrGetValue (MlirAttribute attr)
 Returns the affine map wrapped in the given affine map attribute.
MlirTypeID mlirAffineMapAttrGetTypeID (void)
 Returns the typeID of an AffineMap attribute.
bool mlirAttributeIsAArray (MlirAttribute attr)
 Checks whether the given attribute is an array attribute.
MlirAttribute mlirArrayAttrGet (MlirContext ctx, intptr_t numElements, MlirAttribute const *elements)
 Creates an array element containing the given list of elements in the given context.
MlirStringRef mlirArrayAttrGetName (void)
intptr_t mlirArrayAttrGetNumElements (MlirAttribute attr)
 Returns the number of elements stored in the given array attribute.
MlirAttribute mlirArrayAttrGetElement (MlirAttribute attr, intptr_t pos)
 Returns pos-th element stored in the given array attribute.
MlirTypeID mlirArrayAttrGetTypeID (void)
 Returns the typeID of an Array attribute.
bool mlirAttributeIsADictionary (MlirAttribute attr)
 Checks whether the given attribute is a dictionary attribute.
MlirAttribute mlirDictionaryAttrGet (MlirContext ctx, intptr_t numElements, MlirNamedAttribute const *elements)
 Creates a dictionary attribute containing the given list of elements in the provided context.
MlirStringRef mlirDictionaryAttrGetName (void)
intptr_t mlirDictionaryAttrGetNumElements (MlirAttribute attr)
 Returns the number of attributes contained in a dictionary attribute.
MlirNamedAttribute mlirDictionaryAttrGetElement (MlirAttribute attr, intptr_t pos)
 Returns pos-th element of the given dictionary attribute.
MlirAttribute mlirDictionaryAttrGetElementByName (MlirAttribute attr, MlirStringRef name)
 Returns the dictionary attribute element with the given name or NULL if the given name does not exist in the dictionary.
MlirTypeID mlirDictionaryAttrGetTypeID (void)
 Returns the typeID of a Dictionary attribute.
bool mlirAttributeIsAFloat (MlirAttribute attr)
 Checks whether the given attribute is a floating point attribute.
MlirStringRef mlirFloatAttrGetName (void)
MlirAttribute mlirFloatAttrDoubleGet (MlirContext ctx, MlirType type, double value)
 Creates a floating point attribute in the given context with the given double value and double-precision FP semantics.
MlirAttribute mlirFloatAttrDoubleGetChecked (MlirLocation loc, MlirType type, double value)
 Same as "mlirFloatAttrDoubleGet", but if the type is not valid for a construction of a FloatAttr, returns a null MlirAttribute.
double mlirFloatAttrGetValueDouble (MlirAttribute attr)
 Returns the value stored in the given floating point attribute, interpreting the value as double.
MlirTypeID mlirFloatAttrGetTypeID (void)
 Returns the typeID of a Float attribute.
bool mlirAttributeIsAInteger (MlirAttribute attr)
 Checks whether the given attribute is an integer attribute.
MlirAttribute mlirIntegerAttrGet (MlirType type, int64_t value)
 Creates an integer attribute of the given type with the given integer value.
MlirStringRef mlirIntegerAttrGetName (void)
int64_t mlirIntegerAttrGetValueInt (MlirAttribute attr)
 Returns the value stored in the given integer attribute, assuming the value is of signless type and fits into a signed 64-bit integer.
int64_t mlirIntegerAttrGetValueSInt (MlirAttribute attr)
 Returns the value stored in the given integer attribute, assuming the value is of signed type and fits into a signed 64-bit integer.
uint64_t mlirIntegerAttrGetValueUInt (MlirAttribute attr)
 Returns the value stored in the given integer attribute, assuming the value is of unsigned type and fits into an unsigned 64-bit integer.
unsigned mlirIntegerAttrGetValueBitWidth (MlirAttribute attr)
 Returns the bit width of the integer attribute's underlying APInt value.
unsigned mlirIntegerAttrGetValueNumWords (MlirAttribute attr)
 Returns the number of 64-bit words that make up the integer attribute's underlying APInt value.
void mlirIntegerAttrGetValueWords (MlirAttribute attr, uint64_t *words)
 Copies the 64-bit words making up the integer attribute's APInt value into the provided buffer.
MlirAttribute mlirIntegerAttrGetFromWords (MlirType type, unsigned numWords, const uint64_t *words)
 Creates an integer attribute of the given type from an array of 64-bit words.
MlirTypeID mlirIntegerAttrGetTypeID (void)
 Returns the typeID of an Integer attribute.
bool mlirAttributeIsABool (MlirAttribute attr)
 Checks whether the given attribute is a bool attribute.
MlirAttribute mlirBoolAttrGet (MlirContext ctx, int value)
 Creates a bool attribute in the given context with the given value.
bool mlirBoolAttrGetValue (MlirAttribute attr)
 Returns the value stored in the given bool attribute.
bool mlirAttributeIsAIntegerSet (MlirAttribute attr)
 Checks whether the given attribute is an integer set attribute.
MlirTypeID mlirIntegerSetAttrGetTypeID (void)
 Returns the typeID of an IntegerSet attribute.
MlirAttribute mlirIntegerSetAttrGet (MlirIntegerSet set)
 Creates an integer set attribute wrapping the given set.
MlirStringRef mlirIntegerSetAttrGetName (void)
MlirIntegerSet mlirIntegerSetAttrGetValue (MlirAttribute attr)
 Returns the integer set wrapped in the given integer set attribute.
bool mlirAttributeIsAOpaque (MlirAttribute attr)
 Checks whether the given attribute is an opaque attribute.
MlirAttribute mlirOpaqueAttrGet (MlirContext ctx, MlirStringRef dialectNamespace, intptr_t dataLength, const char *data, MlirType type)
 Creates an opaque attribute in the given context associated with the dialect identified by its namespace.
MlirStringRef mlirOpaqueAttrGetName (void)
MlirStringRef mlirOpaqueAttrGetDialectNamespace (MlirAttribute attr)
 Returns the namespace of the dialect with which the given opaque attribute is associated.
MlirStringRef mlirOpaqueAttrGetData (MlirAttribute attr)
 Returns the raw data as a string reference.
MlirTypeID mlirOpaqueAttrGetTypeID (void)
 Returns the typeID of an Opaque attribute.
bool mlirAttributeIsAString (MlirAttribute attr)
 Checks whether the given attribute is a string attribute.
MlirAttribute mlirStringAttrGet (MlirContext ctx, MlirStringRef str)
 Creates a string attribute in the given context containing the given string.
MlirStringRef mlirStringAttrGetName (void)
MlirAttribute mlirStringAttrTypedGet (MlirType type, MlirStringRef str)
 Creates a string attribute in the given context containing the given string.
MlirStringRef mlirStringAttrGetValue (MlirAttribute attr)
 Returns the attribute values as a string reference.
MlirTypeID mlirStringAttrGetTypeID (void)
 Returns the typeID of a String attribute.
bool mlirAttributeIsASymbolRef (MlirAttribute attr)
 Checks whether the given attribute is a symbol reference attribute.
MlirAttribute mlirSymbolRefAttrGet (MlirContext ctx, MlirStringRef symbol, intptr_t numReferences, MlirAttribute const *references)
 Creates a symbol reference attribute in the given context referencing a symbol identified by the given string inside a list of nested references.
MlirStringRef mlirSymbolRefAttrGetName (void)
MlirStringRef mlirSymbolRefAttrGetRootReference (MlirAttribute attr)
 Returns the string reference to the root referenced symbol.
MlirStringRef mlirSymbolRefAttrGetLeafReference (MlirAttribute attr)
 Returns the string reference to the leaf referenced symbol.
intptr_t mlirSymbolRefAttrGetNumNestedReferences (MlirAttribute attr)
 Returns the number of references nested in the given symbol reference attribute.
MlirAttribute mlirSymbolRefAttrGetNestedReference (MlirAttribute attr, intptr_t pos)
 Returns pos-th reference nested in the given symbol reference attribute.
MlirTypeID mlirSymbolRefAttrGetTypeID (void)
 Returns the typeID of an SymbolRef attribute.
MlirAttribute mlirDisctinctAttrCreate (MlirAttribute referencedAttr)
 Creates a DisctinctAttr with the referenced attribute.
bool mlirAttributeIsAFlatSymbolRef (MlirAttribute attr)
 Checks whether the given attribute is a flat symbol reference attribute.
MlirAttribute mlirFlatSymbolRefAttrGet (MlirContext ctx, MlirStringRef symbol)
 Creates a flat symbol reference attribute in the given context referencing a symbol identified by the given string.
MlirStringRef mlirFlatSymbolRefAttrGetName (void)
MlirStringRef mlirFlatSymbolRefAttrGetValue (MlirAttribute attr)
 Returns the referenced symbol as a string reference.
bool mlirAttributeIsAType (MlirAttribute attr)
 Checks whether the given attribute is a type attribute.
MlirAttribute mlirTypeAttrGet (MlirType type)
 Creates a type attribute wrapping the given type in the same context as the type.
MlirStringRef mlirTypeAttrGetName (void)
MlirType mlirTypeAttrGetValue (MlirAttribute attr)
 Returns the type stored in the given type attribute.
MlirTypeID mlirTypeAttrGetTypeID (void)
 Returns the typeID of a Type attribute.
bool mlirAttributeIsAUnit (MlirAttribute attr)
 Checks whether the given attribute is a unit attribute.
MlirAttribute mlirUnitAttrGet (MlirContext ctx)
 Creates a unit attribute in the given context.
MlirStringRef mlirUnitAttrGetName (void)
MlirTypeID mlirUnitAttrGetTypeID (void)
 Returns the typeID of a Unit attribute.
bool mlirAttributeIsAElements (MlirAttribute attr)
 Checks whether the given attribute is an elements attribute.
MlirAttribute mlirElementsAttrGetValue (MlirAttribute attr, intptr_t rank, uint64_t *idxs)
 Returns the element at the given rank-dimensional index.
bool mlirElementsAttrIsValidIndex (MlirAttribute attr, intptr_t rank, uint64_t *idxs)
 Checks whether the given rank-dimensional index is valid in the given elements attribute.
int64_t mlirElementsAttrGetNumElements (MlirAttribute attr)
 Gets the total number of elements in the given elements attribute.
MlirTypeID mlirDenseArrayAttrGetTypeID ()
bool mlirAttributeIsADenseBoolArray (MlirAttribute attr)
 Checks whether the given attribute is a dense array attribute.
bool mlirAttributeIsADenseI8Array (MlirAttribute attr)
bool mlirAttributeIsADenseI16Array (MlirAttribute attr)
bool mlirAttributeIsADenseI32Array (MlirAttribute attr)
bool mlirAttributeIsADenseI64Array (MlirAttribute attr)
bool mlirAttributeIsADenseF32Array (MlirAttribute attr)
bool mlirAttributeIsADenseF64Array (MlirAttribute attr)
MlirAttribute mlirDenseBoolArrayGet (MlirContext ctx, intptr_t size, int const *values)
 Create a dense array attribute with the given elements.
MlirAttribute mlirDenseI8ArrayGet (MlirContext ctx, intptr_t size, int8_t const *values)
MlirAttribute mlirDenseI16ArrayGet (MlirContext ctx, intptr_t size, int16_t const *values)
MlirAttribute mlirDenseI32ArrayGet (MlirContext ctx, intptr_t size, int32_t const *values)
MlirAttribute mlirDenseI64ArrayGet (MlirContext ctx, intptr_t size, int64_t const *values)
MlirAttribute mlirDenseF32ArrayGet (MlirContext ctx, intptr_t size, float const *values)
MlirAttribute mlirDenseF64ArrayGet (MlirContext ctx, intptr_t size, double const *values)
intptr_t mlirDenseArrayGetNumElements (MlirAttribute attr)
 Get the size of a dense array.
bool mlirDenseBoolArrayGetElement (MlirAttribute attr, intptr_t pos)
 Get an element of a dense array.
int8_t mlirDenseI8ArrayGetElement (MlirAttribute attr, intptr_t pos)
int16_t mlirDenseI16ArrayGetElement (MlirAttribute attr, intptr_t pos)
int32_t mlirDenseI32ArrayGetElement (MlirAttribute attr, intptr_t pos)
int64_t mlirDenseI64ArrayGetElement (MlirAttribute attr, intptr_t pos)
float mlirDenseF32ArrayGetElement (MlirAttribute attr, intptr_t pos)
double mlirDenseF64ArrayGetElement (MlirAttribute attr, intptr_t pos)
bool mlirAttributeIsADenseElements (MlirAttribute attr)
 Checks whether the given attribute is a dense elements attribute.
bool mlirAttributeIsADenseIntElements (MlirAttribute attr)
bool mlirAttributeIsADenseFPElements (MlirAttribute attr)
MlirTypeID mlirDenseIntOrFPElementsAttrGetTypeID (void)
 Returns the typeID of an DenseIntOrFPElements attribute.
MlirAttribute mlirDenseElementsAttrGet (MlirType shapedType, intptr_t numElements, MlirAttribute const *elements)
 Creates a dense elements attribute with the given Shaped type and elements in the same context as the type.
MlirAttribute mlirDenseElementsAttrRawBufferGet (MlirType shapedType, size_t rawBufferSize, const void *rawBuffer)
 Creates a dense elements attribute with the given Shaped type and elements populated from a packed, row-major opaque buffer of contents.
MlirAttribute mlirDenseElementsAttrSplatGet (MlirType shapedType, MlirAttribute element)
 Creates a dense elements attribute with the given Shaped type containing a single replicated element (splat).
MlirAttribute mlirDenseElementsAttrBoolSplatGet (MlirType shapedType, bool element)
MlirAttribute mlirDenseElementsAttrUInt8SplatGet (MlirType shapedType, uint8_t element)
MlirAttribute mlirDenseElementsAttrInt8SplatGet (MlirType shapedType, int8_t element)
MlirAttribute mlirDenseElementsAttrUInt32SplatGet (MlirType shapedType, uint32_t element)
MlirAttribute mlirDenseElementsAttrInt32SplatGet (MlirType shapedType, int32_t element)
MlirAttribute mlirDenseElementsAttrUInt64SplatGet (MlirType shapedType, uint64_t element)
MlirAttribute mlirDenseElementsAttrInt64SplatGet (MlirType shapedType, int64_t element)
MlirAttribute mlirDenseElementsAttrFloatSplatGet (MlirType shapedType, float element)
MlirAttribute mlirDenseElementsAttrDoubleSplatGet (MlirType shapedType, double element)
MlirAttribute mlirDenseElementsAttrBoolGet (MlirType shapedType, intptr_t numElements, const int *elements)
 Creates a dense elements attribute with the given shaped type from elements of a specific type.
template<typename T>
static MlirAttribute getDenseAttribute (MlirType shapedType, intptr_t numElements, const T *elements)
 Creates a dense attribute with elements of the type deduced by templates.
MlirAttribute mlirDenseElementsAttrUInt8Get (MlirType shapedType, intptr_t numElements, const uint8_t *elements)
MlirAttribute mlirDenseElementsAttrInt8Get (MlirType shapedType, intptr_t numElements, const int8_t *elements)
MlirAttribute mlirDenseElementsAttrUInt16Get (MlirType shapedType, intptr_t numElements, const uint16_t *elements)
MlirAttribute mlirDenseElementsAttrInt16Get (MlirType shapedType, intptr_t numElements, const int16_t *elements)
MlirAttribute mlirDenseElementsAttrUInt32Get (MlirType shapedType, intptr_t numElements, const uint32_t *elements)
MlirAttribute mlirDenseElementsAttrInt32Get (MlirType shapedType, intptr_t numElements, const int32_t *elements)
MlirAttribute mlirDenseElementsAttrUInt64Get (MlirType shapedType, intptr_t numElements, const uint64_t *elements)
MlirAttribute mlirDenseElementsAttrInt64Get (MlirType shapedType, intptr_t numElements, const int64_t *elements)
MlirAttribute mlirDenseElementsAttrFloatGet (MlirType shapedType, intptr_t numElements, const float *elements)
MlirAttribute mlirDenseElementsAttrDoubleGet (MlirType shapedType, intptr_t numElements, const double *elements)
MlirAttribute mlirDenseElementsAttrBFloat16Get (MlirType shapedType, intptr_t numElements, const uint16_t *elements)
MlirAttribute mlirDenseElementsAttrFloat16Get (MlirType shapedType, intptr_t numElements, const uint16_t *elements)
MlirAttribute mlirDenseElementsAttrStringGet (MlirType shapedType, intptr_t numElements, MlirStringRef *strs)
 Creates a dense elements attribute with the given shaped type from string elements.
MlirAttribute mlirDenseElementsAttrReshapeGet (MlirAttribute attr, MlirType shapedType)
 Creates a dense elements attribute that has the same data as the given dense elements attribute and a different shaped type.
bool mlirDenseElementsAttrIsSplat (MlirAttribute attr)
 Checks whether the given dense elements attribute contains a single replicated value (splat).
MlirAttribute mlirDenseElementsAttrGetSplatValue (MlirAttribute attr)
 Returns the single replicated value (splat) of a specific type contained by the given dense elements attribute.
int mlirDenseElementsAttrGetBoolSplatValue (MlirAttribute attr)
int8_t mlirDenseElementsAttrGetInt8SplatValue (MlirAttribute attr)
uint8_t mlirDenseElementsAttrGetUInt8SplatValue (MlirAttribute attr)
int32_t mlirDenseElementsAttrGetInt32SplatValue (MlirAttribute attr)
uint32_t mlirDenseElementsAttrGetUInt32SplatValue (MlirAttribute attr)
int64_t mlirDenseElementsAttrGetInt64SplatValue (MlirAttribute attr)
uint64_t mlirDenseElementsAttrGetUInt64SplatValue (MlirAttribute attr)
float mlirDenseElementsAttrGetFloatSplatValue (MlirAttribute attr)
double mlirDenseElementsAttrGetDoubleSplatValue (MlirAttribute attr)
MlirStringRef mlirDenseElementsAttrGetStringSplatValue (MlirAttribute attr)
bool mlirDenseElementsAttrGetBoolValue (MlirAttribute attr, intptr_t pos)
 Returns the pos-th value (flat contiguous indexing) of a specific type contained by the given dense elements attribute.
int8_t mlirDenseElementsAttrGetInt8Value (MlirAttribute attr, intptr_t pos)
uint8_t mlirDenseElementsAttrGetUInt8Value (MlirAttribute attr, intptr_t pos)
int16_t mlirDenseElementsAttrGetInt16Value (MlirAttribute attr, intptr_t pos)
uint16_t mlirDenseElementsAttrGetUInt16Value (MlirAttribute attr, intptr_t pos)
int32_t mlirDenseElementsAttrGetInt32Value (MlirAttribute attr, intptr_t pos)
uint32_t mlirDenseElementsAttrGetUInt32Value (MlirAttribute attr, intptr_t pos)
int64_t mlirDenseElementsAttrGetInt64Value (MlirAttribute attr, intptr_t pos)
uint64_t mlirDenseElementsAttrGetUInt64Value (MlirAttribute attr, intptr_t pos)
uint64_t mlirDenseElementsAttrGetIndexValue (MlirAttribute attr, intptr_t pos)
float mlirDenseElementsAttrGetFloatValue (MlirAttribute attr, intptr_t pos)
double mlirDenseElementsAttrGetDoubleValue (MlirAttribute attr, intptr_t pos)
MlirStringRef mlirDenseElementsAttrGetStringValue (MlirAttribute attr, intptr_t pos)
const voidmlirDenseElementsAttrGetRawData (MlirAttribute attr)
 Returns the raw data of the given dense elements attribute.
bool mlirAttributeIsADenseResourceElements (MlirAttribute attr)
MlirAttribute mlirUnmanagedDenseResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, void *data, size_t dataLength, size_t dataAlignment, bool dataIsMutable, void(*deleter)(void *userData, const void *data, size_t size, size_t align), void *userData)
 Unlike the typed accessors below, constructs the attribute with a raw data buffer and no type/alignment checking.
MlirStringRef mlirDenseResourceElementsAttrGetName (void)
template<typename U, typename T>
static MlirAttribute getDenseResource (MlirType shapedType, MlirStringRef name, intptr_t numElements, const T *elements)
MlirAttribute mlirUnmanagedDenseBoolResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const int *elements)
MlirAttribute mlirUnmanagedDenseUInt8ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const uint8_t *elements)
MlirAttribute mlirUnmanagedDenseUInt16ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const uint16_t *elements)
MlirAttribute mlirUnmanagedDenseUInt32ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const uint32_t *elements)
MlirAttribute mlirUnmanagedDenseUInt64ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const uint64_t *elements)
MlirAttribute mlirUnmanagedDenseInt8ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const int8_t *elements)
MlirAttribute mlirUnmanagedDenseInt16ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const int16_t *elements)
MlirAttribute mlirUnmanagedDenseInt32ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const int32_t *elements)
MlirAttribute mlirUnmanagedDenseInt64ResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const int64_t *elements)
MlirAttribute mlirUnmanagedDenseFloatResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const float *elements)
MlirAttribute mlirUnmanagedDenseDoubleResourceElementsAttrGet (MlirType shapedType, MlirStringRef name, intptr_t numElements, const double *elements)
template<typename U, typename T>
static T getDenseResourceVal (MlirAttribute attr, intptr_t pos)
bool mlirDenseBoolResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
 Returns the pos-th value (flat contiguous indexing) of a specific type contained by the given dense resource elements attribute.
uint8_t mlirDenseUInt8ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
uint16_t mlirDenseUInt16ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
uint32_t mlirDenseUInt32ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
uint64_t mlirDenseUInt64ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
int8_t mlirDenseInt8ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
int16_t mlirDenseInt16ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
int32_t mlirDenseInt32ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
int64_t mlirDenseInt64ResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
float mlirDenseFloatResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
double mlirDenseDoubleResourceElementsAttrGetValue (MlirAttribute attr, intptr_t pos)
bool mlirAttributeIsASparseElements (MlirAttribute attr)
 Checks whether the given attribute is a sparse elements attribute.
MlirAttribute mlirSparseElementsAttribute (MlirType shapedType, MlirAttribute denseIndices, MlirAttribute denseValues)
 Creates a sparse elements attribute of the given shape from a list of indices and a list of associated values.
MlirAttribute mlirSparseElementsAttrGetIndices (MlirAttribute attr)
 Returns the dense elements attribute containing 64-bit integer indices of non-null elements in the given sparse elements attribute.
MlirAttribute mlirSparseElementsAttrGetValues (MlirAttribute attr)
 Returns the dense elements attribute containing the non-null elements in the given sparse elements attribute.
MlirTypeID mlirSparseElementsAttrGetTypeID (void)
 Returns the typeID of a SparseElements attribute.
bool mlirAttributeIsAStridedLayout (MlirAttribute attr)
MlirAttribute mlirStridedLayoutAttrGet (MlirContext ctx, int64_t offset, intptr_t numStrides, const int64_t *strides)
MlirStringRef mlirStridedLayoutAttrGetName (void)
int64_t mlirStridedLayoutAttrGetOffset (MlirAttribute attr)
intptr_t mlirStridedLayoutAttrGetNumStrides (MlirAttribute attr)
int64_t mlirStridedLayoutAttrGetStride (MlirAttribute attr, intptr_t pos)
MlirTypeID mlirStridedLayoutAttrGetTypeID (void)
 Returns the typeID of a StridedLayout attribute.

Function Documentation

◆ getDenseAttribute()

template<typename T>
MlirAttribute getDenseAttribute ( MlirType shapedType,
intptr_t numElements,
const T * elements )
static

◆ getDenseResource()

◆ getDenseResourceVal()

◆ mlirAffineMapAttrGet()

MlirAttribute mlirAffineMapAttrGet ( MlirAffineMap map)

Creates an affine map attribute wrapping the given map.

The attribute belongs to the same context as the affine map.

Definition at line 40 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineMapAttribute::bindDerived().

◆ mlirAffineMapAttrGetName()

MlirStringRef mlirAffineMapAttrGetName ( void )

Definition at line 44 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirAffineMapAttrGetTypeID()

MlirTypeID mlirAffineMapAttrGetTypeID ( void )

Returns the typeID of an AffineMap attribute.

Definition at line 52 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirAffineMapAttrGetValue()

MlirAffineMap mlirAffineMapAttrGetValue ( MlirAttribute attr)

Returns the affine map wrapped in the given affine map attribute.

Definition at line 48 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAffineMapAttribute::bindDerived().

◆ mlirArrayAttrGet()

MlirAttribute mlirArrayAttrGet ( MlirContext ctx,
intptr_t numElements,
MlirAttribute const * elements )

Creates an array element containing the given list of elements in the given context.

Definition at line 64 of file BuiltinAttributes.cpp.

References unwrap(), unwrapList(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyArrayAttribute::bindDerived().

◆ mlirArrayAttrGetElement()

MlirAttribute mlirArrayAttrGetElement ( MlirAttribute attr,
intptr_t pos )

◆ mlirArrayAttrGetName()

MlirStringRef mlirArrayAttrGetName ( void )

Definition at line 72 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirArrayAttrGetNumElements()

intptr_t mlirArrayAttrGetNumElements ( MlirAttribute attr)

◆ mlirArrayAttrGetTypeID()

MlirTypeID mlirArrayAttrGetTypeID ( void )

Returns the typeID of an Array attribute.

Definition at line 82 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirAttributeGetNull()

◆ mlirAttributeIsAAffineMap()

bool mlirAttributeIsAAffineMap ( MlirAttribute attr)

Checks whether the given attribute is an affine map attribute.

Definition at line 36 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAArray()

bool mlirAttributeIsAArray ( MlirAttribute attr)

Checks whether the given attribute is an array attribute.

Definition at line 60 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsABool()

bool mlirAttributeIsABool ( MlirAttribute attr)

Checks whether the given attribute is a bool attribute.

Definition at line 209 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseBoolArray()

bool mlirAttributeIsADenseBoolArray ( MlirAttribute attr)

Checks whether the given attribute is a dense array attribute.

Definition at line 446 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseElements()

bool mlirAttributeIsADenseElements ( MlirAttribute attr)

Checks whether the given attribute is a dense elements attribute.

Definition at line 550 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseF32Array()

bool mlirAttributeIsADenseF32Array ( MlirAttribute attr)

Definition at line 461 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseF64Array()

bool mlirAttributeIsADenseF64Array ( MlirAttribute attr)

Definition at line 464 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseFPElements()

bool mlirAttributeIsADenseFPElements ( MlirAttribute attr)

Definition at line 558 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI16Array()

bool mlirAttributeIsADenseI16Array ( MlirAttribute attr)

Definition at line 452 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI32Array()

bool mlirAttributeIsADenseI32Array ( MlirAttribute attr)

Definition at line 455 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI64Array()

bool mlirAttributeIsADenseI64Array ( MlirAttribute attr)

Definition at line 458 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI8Array()

bool mlirAttributeIsADenseI8Array ( MlirAttribute attr)

Definition at line 449 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseIntElements()

bool mlirAttributeIsADenseIntElements ( MlirAttribute attr)

Definition at line 554 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseResourceElements()

bool mlirAttributeIsADenseResourceElements ( MlirAttribute attr)

Definition at line 844 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADictionary()

bool mlirAttributeIsADictionary ( MlirAttribute attr)

Checks whether the given attribute is a dictionary attribute.

Definition at line 88 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAElements()

bool mlirAttributeIsAElements ( MlirAttribute attr)

Checks whether the given attribute is an elements attribute.

Definition at line 414 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAFlatSymbolRef()

bool mlirAttributeIsAFlatSymbolRef ( MlirAttribute attr)

Checks whether the given attribute is a flat symbol reference attribute.

Definition at line 358 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAFloat()

bool mlirAttributeIsAFloat ( MlirAttribute attr)

Checks whether the given attribute is a floating point attribute.

Definition at line 130 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::getSplat().

◆ mlirAttributeIsAInteger()

bool mlirAttributeIsAInteger ( MlirAttribute attr)

Checks whether the given attribute is an integer attribute.

Definition at line 156 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::getSplat().

◆ mlirAttributeIsAIntegerSet()

bool mlirAttributeIsAIntegerSet ( MlirAttribute attr)

Checks whether the given attribute is an integer set attribute.

Definition at line 225 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsALocation()

bool mlirAttributeIsALocation ( MlirAttribute attr)

Definition at line 28 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAOpaque()

bool mlirAttributeIsAOpaque ( MlirAttribute attr)

Checks whether the given attribute is an opaque attribute.

Definition at line 249 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsASparseElements()

bool mlirAttributeIsASparseElements ( MlirAttribute attr)

Checks whether the given attribute is a sparse elements attribute.

Definition at line 1003 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAStridedLayout()

bool mlirAttributeIsAStridedLayout ( MlirAttribute attr)

Definition at line 1032 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAString()

bool mlirAttributeIsAString ( MlirAttribute attr)

Checks whether the given attribute is a string attribute.

Definition at line 280 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsASymbolRef()

bool mlirAttributeIsASymbolRef ( MlirAttribute attr)

Checks whether the given attribute is a symbol reference attribute.

Definition at line 306 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAType()

bool mlirAttributeIsAType ( MlirAttribute attr)

Checks whether the given attribute is a type attribute.

Definition at line 378 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAUnit()

bool mlirAttributeIsAUnit ( MlirAttribute attr)

Checks whether the given attribute is a unit attribute.

Definition at line 398 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirBoolAttrGet()

MlirAttribute mlirBoolAttrGet ( MlirContext ctx,
int value )

Creates a bool attribute in the given context with the given value.

Definition at line 213 of file BuiltinAttributes.cpp.

References mlir::BoolAttr::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBoolAttribute::bindDerived().

◆ mlirBoolAttrGetValue()

bool mlirBoolAttrGetValue ( MlirAttribute attr)

Returns the value stored in the given bool attribute.

Definition at line 217 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBoolAttribute::bindDerived().

◆ mlirDenseArrayAttrGetTypeID()

MlirTypeID mlirDenseArrayAttrGetTypeID ( void )

◆ mlirDenseArrayGetNumElements()

◆ mlirDenseBoolArrayGet()

MlirAttribute mlirDenseBoolArrayGet ( MlirContext ctx,
intptr_t size,
int const * values )

Create a dense array attribute with the given elements.

Definition at line 472 of file BuiltinAttributes.cpp.

References mlir::detail::DenseArrayAttrImpl< bool >::get(), unwrap(), and wrap().

◆ mlirDenseBoolArrayGetElement()

bool mlirDenseBoolArrayGetElement ( MlirAttribute attr,
intptr_t pos )

Get an element of a dense array.

Definition at line 520 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseBoolResourceElementsAttrGetValue()

bool mlirDenseBoolResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Returns the pos-th value (flat contiguous indexing) of a specific type contained by the given dense resource elements attribute.

Definition at line 951 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseDoubleResourceElementsAttrGetValue()

double mlirDenseDoubleResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 994 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseElementsAttrBFloat16Get()

MlirAttribute mlirDenseElementsAttrBFloat16Get ( MlirType shapedType,
intptr_t numElements,
const uint16_t * elements )

Definition at line 708 of file BuiltinAttributes.cpp.

References mlirDenseElementsAttrRawBufferGet().

◆ mlirDenseElementsAttrBoolGet()

MlirAttribute mlirDenseElementsAttrBoolGet ( MlirType shapedType,
intptr_t numElements,
const int * elements )

Creates a dense elements attribute with the given shaped type from elements of a specific type.

Expects the element type of the shaped type to match the data element type.

Definition at line 641 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrBoolSplatGet()

MlirAttribute mlirDenseElementsAttrBoolSplatGet ( MlirType shapedType,
bool element )

Definition at line 595 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrDoubleGet()

MlirAttribute mlirDenseElementsAttrDoubleGet ( MlirType shapedType,
intptr_t numElements,
const double * elements )

Definition at line 703 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrDoubleSplatGet()

MlirAttribute mlirDenseElementsAttrDoubleSplatGet ( MlirType shapedType,
double element )

Definition at line 635 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrFloat16Get()

MlirAttribute mlirDenseElementsAttrFloat16Get ( MlirType shapedType,
intptr_t numElements,
const uint16_t * elements )

Definition at line 715 of file BuiltinAttributes.cpp.

References mlirDenseElementsAttrRawBufferGet().

◆ mlirDenseElementsAttrFloatGet()

MlirAttribute mlirDenseElementsAttrFloatGet ( MlirType shapedType,
intptr_t numElements,
const float * elements )

Definition at line 698 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrFloatSplatGet()

MlirAttribute mlirDenseElementsAttrFloatSplatGet ( MlirType shapedType,
float element )

Definition at line 630 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrGet()

MlirAttribute mlirDenseElementsAttrGet ( MlirType shapedType,
intptr_t numElements,
MlirAttribute const * elements )

Creates a dense elements attribute with the given Shaped type and elements in the same context as the type.

Definition at line 570 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), unwrapList(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::getFromList().

◆ mlirDenseElementsAttrGetBoolSplatValue()

int mlirDenseElementsAttrGetBoolSplatValue ( MlirAttribute attr)

Definition at line 753 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetBoolValue()

bool mlirDenseElementsAttrGetBoolValue ( MlirAttribute attr,
intptr_t pos )

Returns the pos-th value (flat contiguous indexing) of a specific type contained by the given dense elements attribute.

Definition at line 789 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseIntElementsAttribute::dunderGetItem().

◆ mlirDenseElementsAttrGetDoubleSplatValue()

double mlirDenseElementsAttrGetDoubleSplatValue ( MlirAttribute attr)

Definition at line 777 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetDoubleValue()

double mlirDenseElementsAttrGetDoubleValue ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetFloatSplatValue()

float mlirDenseElementsAttrGetFloatSplatValue ( MlirAttribute attr)

Definition at line 774 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetFloatValue()

float mlirDenseElementsAttrGetFloatValue ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetIndexValue()

uint64_t mlirDenseElementsAttrGetIndexValue ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetInt16Value()

int16_t mlirDenseElementsAttrGetInt16Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetInt32SplatValue()

int32_t mlirDenseElementsAttrGetInt32SplatValue ( MlirAttribute attr)

Definition at line 762 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt32Value()

int32_t mlirDenseElementsAttrGetInt32Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetInt64SplatValue()

int64_t mlirDenseElementsAttrGetInt64SplatValue ( MlirAttribute attr)

Definition at line 768 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt64Value()

int64_t mlirDenseElementsAttrGetInt64Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetInt8SplatValue()

int8_t mlirDenseElementsAttrGetInt8SplatValue ( MlirAttribute attr)

Definition at line 756 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt8Value()

int8_t mlirDenseElementsAttrGetInt8Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetRawData()

const void * mlirDenseElementsAttrGetRawData ( MlirAttribute attr)

Returns the raw data of the given dense elements attribute.

Definition at line 835 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetSplatValue()

MlirAttribute mlirDenseElementsAttrGetSplatValue ( MlirAttribute attr)

Returns the single replicated value (splat) of a specific type contained by the given dense elements attribute.

Definition at line 749 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::bindDerived().

◆ mlirDenseElementsAttrGetStringSplatValue()

MlirStringRef mlirDenseElementsAttrGetStringSplatValue ( MlirAttribute attr)

Definition at line 780 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDenseElementsAttrGetStringValue()

MlirStringRef mlirDenseElementsAttrGetStringValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 825 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDenseElementsAttrGetUInt16Value()

uint16_t mlirDenseElementsAttrGetUInt16Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetUInt32SplatValue()

uint32_t mlirDenseElementsAttrGetUInt32SplatValue ( MlirAttribute attr)

Definition at line 765 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt32Value()

uint32_t mlirDenseElementsAttrGetUInt32Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetUInt64SplatValue()

uint64_t mlirDenseElementsAttrGetUInt64SplatValue ( MlirAttribute attr)

Definition at line 771 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt64Value()

uint64_t mlirDenseElementsAttrGetUInt64Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrGetUInt8SplatValue()

uint8_t mlirDenseElementsAttrGetUInt8SplatValue ( MlirAttribute attr)

Definition at line 759 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt8Value()

uint8_t mlirDenseElementsAttrGetUInt8Value ( MlirAttribute attr,
intptr_t pos )

◆ mlirDenseElementsAttrInt16Get()

MlirAttribute mlirDenseElementsAttrInt16Get ( MlirType shapedType,
intptr_t numElements,
const int16_t * elements )

Definition at line 673 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt32Get()

MlirAttribute mlirDenseElementsAttrInt32Get ( MlirType shapedType,
intptr_t numElements,
const int32_t * elements )

Definition at line 683 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt32SplatGet()

MlirAttribute mlirDenseElementsAttrInt32SplatGet ( MlirType shapedType,
int32_t element )

Definition at line 615 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrInt64Get()

MlirAttribute mlirDenseElementsAttrInt64Get ( MlirType shapedType,
intptr_t numElements,
const int64_t * elements )

Definition at line 693 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt64SplatGet()

MlirAttribute mlirDenseElementsAttrInt64SplatGet ( MlirType shapedType,
int64_t element )

Definition at line 625 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrInt8Get()

MlirAttribute mlirDenseElementsAttrInt8Get ( MlirType shapedType,
intptr_t numElements,
const int8_t * elements )

Definition at line 663 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt8SplatGet()

MlirAttribute mlirDenseElementsAttrInt8SplatGet ( MlirType shapedType,
int8_t element )

Definition at line 605 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrIsSplat()

bool mlirDenseElementsAttrIsSplat ( MlirAttribute attr)

Checks whether the given dense elements attribute contains a single replicated value (splat).

Definition at line 745 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::bindDerived().

◆ mlirDenseElementsAttrRawBufferGet()

MlirAttribute mlirDenseElementsAttrRawBufferGet ( MlirType shapedType,
size_t rawBufferSize,
const void * rawBuffer )

Creates a dense elements attribute with the given Shaped type and elements populated from a packed, row-major opaque buffer of contents.

The format of the raw buffer is a densely packed array of values that can be bitcast to the storage format of the element type specified. Types that are not byte aligned will be:

  • For bitwidth > 1: Rounded up to the next byte.
  • For bitwidth = 1: Packed into 8bit bytes with bits corresponding to the linear order of the shape type from MSB to LSB, padded to on the right.

A raw buffer of a single element (or for 1-bit, a byte of value 0 or 255) will be interpreted as a splat. User code should be prepared for additional, conformant patterns to be identified as splats in the future.

Definition at line 579 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::getFromRawBuffer(), mlir::DenseElementsAttr::isValidRawBuffer(), mlirAttributeGetNull(), unwrap(), and wrap().

Referenced by mlirDenseElementsAttrBFloat16Get(), and mlirDenseElementsAttrFloat16Get().

◆ mlirDenseElementsAttrReshapeGet()

MlirAttribute mlirDenseElementsAttrReshapeGet ( MlirAttribute attr,
MlirType shapedType )

Creates a dense elements attribute that has the same data as the given dense elements attribute and a different shaped type.

The new type must have the same total number of elements.

Definition at line 735 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDenseElementsAttrSplatGet()

MlirAttribute mlirDenseElementsAttrSplatGet ( MlirType shapedType,
MlirAttribute element )

Creates a dense elements attribute with the given Shaped type containing a single replicated element (splat).

Definition at line 590 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::getSplat().

◆ mlirDenseElementsAttrStringGet()

MlirAttribute mlirDenseElementsAttrStringGet ( MlirType shapedType,
intptr_t numElements,
MlirStringRef * strs )

Creates a dense elements attribute with the given shaped type from string elements.

Definition at line 723 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrUInt16Get()

MlirAttribute mlirDenseElementsAttrUInt16Get ( MlirType shapedType,
intptr_t numElements,
const uint16_t * elements )

Definition at line 668 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt32Get()

MlirAttribute mlirDenseElementsAttrUInt32Get ( MlirType shapedType,
intptr_t numElements,
const uint32_t * elements )

Definition at line 678 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt32SplatGet()

MlirAttribute mlirDenseElementsAttrUInt32SplatGet ( MlirType shapedType,
uint32_t element )

Definition at line 610 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrUInt64Get()

MlirAttribute mlirDenseElementsAttrUInt64Get ( MlirType shapedType,
intptr_t numElements,
const uint64_t * elements )

Definition at line 688 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt64SplatGet()

MlirAttribute mlirDenseElementsAttrUInt64SplatGet ( MlirType shapedType,
uint64_t element )

Definition at line 620 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseElementsAttrUInt8Get()

MlirAttribute mlirDenseElementsAttrUInt8Get ( MlirType shapedType,
intptr_t numElements,
const uint8_t * elements )

Definition at line 658 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt8SplatGet()

MlirAttribute mlirDenseElementsAttrUInt8SplatGet ( MlirType shapedType,
uint8_t element )

Definition at line 600 of file BuiltinAttributes.cpp.

References mlir::DenseElementsAttr::get(), unwrap(), and wrap().

◆ mlirDenseF32ArrayGet()

MlirAttribute mlirDenseF32ArrayGet ( MlirContext ctx,
intptr_t size,
float const * values )

◆ mlirDenseF32ArrayGetElement()

float mlirDenseF32ArrayGetElement ( MlirAttribute attr,
intptr_t pos )

Definition at line 535 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseF64ArrayGet()

MlirAttribute mlirDenseF64ArrayGet ( MlirContext ctx,
intptr_t size,
double const * values )

◆ mlirDenseF64ArrayGetElement()

double mlirDenseF64ArrayGetElement ( MlirAttribute attr,
intptr_t pos )

Definition at line 538 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseFloatResourceElementsAttrGetValue()

float mlirDenseFloatResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 990 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseI16ArrayGet()

MlirAttribute mlirDenseI16ArrayGet ( MlirContext ctx,
intptr_t size,
int16_t const * values )

◆ mlirDenseI16ArrayGetElement()

int16_t mlirDenseI16ArrayGetElement ( MlirAttribute attr,
intptr_t pos )

Definition at line 526 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseI32ArrayGet()

MlirAttribute mlirDenseI32ArrayGet ( MlirContext ctx,
intptr_t size,
int32_t const * values )

◆ mlirDenseI32ArrayGetElement()

int32_t mlirDenseI32ArrayGetElement ( MlirAttribute attr,
intptr_t pos )

Definition at line 529 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseI64ArrayGet()

MlirAttribute mlirDenseI64ArrayGet ( MlirContext ctx,
intptr_t size,
int64_t const * values )

◆ mlirDenseI64ArrayGetElement()

int64_t mlirDenseI64ArrayGetElement ( MlirAttribute attr,
intptr_t pos )

Definition at line 532 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseI8ArrayGet()

MlirAttribute mlirDenseI8ArrayGet ( MlirContext ctx,
intptr_t size,
int8_t const * values )

◆ mlirDenseI8ArrayGetElement()

int8_t mlirDenseI8ArrayGetElement ( MlirAttribute attr,
intptr_t pos )

Definition at line 523 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseInt16ResourceElementsAttrGetValue()

int16_t mlirDenseInt16ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 978 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseInt32ResourceElementsAttrGetValue()

int32_t mlirDenseInt32ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 982 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseInt64ResourceElementsAttrGetValue()

int64_t mlirDenseInt64ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 986 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseInt8ResourceElementsAttrGetValue()

int8_t mlirDenseInt8ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 974 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseIntOrFPElementsAttrGetTypeID()

MlirTypeID mlirDenseIntOrFPElementsAttrGetTypeID ( void )

Returns the typeID of an DenseIntOrFPElements attribute.

Definition at line 562 of file BuiltinAttributes.cpp.

References wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAttributes().

◆ mlirDenseResourceElementsAttrGetName()

MlirStringRef mlirDenseResourceElementsAttrGetName ( void )

Definition at line 868 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirDenseUInt16ResourceElementsAttrGetValue()

uint16_t mlirDenseUInt16ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 959 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseUInt32ResourceElementsAttrGetValue()

uint32_t mlirDenseUInt32ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 964 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseUInt64ResourceElementsAttrGetValue()

uint64_t mlirDenseUInt64ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 969 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDenseUInt8ResourceElementsAttrGetValue()

uint8_t mlirDenseUInt8ResourceElementsAttrGetValue ( MlirAttribute attr,
intptr_t pos )

Definition at line 955 of file BuiltinAttributes.cpp.

References getDenseResourceVal().

◆ mlirDictionaryAttrGet()

MlirAttribute mlirDictionaryAttrGet ( MlirContext ctx,
intptr_t numElements,
MlirNamedAttribute const * elements )

Creates a dictionary attribute containing the given list of elements in the provided context.

Definition at line 92 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDictAttribute::bindDerived().

◆ mlirDictionaryAttrGetElement()

MlirNamedAttribute mlirDictionaryAttrGetElement ( MlirAttribute attr,
intptr_t pos )

Returns pos-th element of the given dictionary attribute.

Definition at line 110 of file BuiltinAttributes.cpp.

References mlir::NamedAttribute::getName(), mlir::NamedAttribute::getValue(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDictAttribute::bindDerived().

◆ mlirDictionaryAttrGetElementByName()

MlirAttribute mlirDictionaryAttrGetElementByName ( MlirAttribute attr,
MlirStringRef name )

Returns the dictionary attribute element with the given name or NULL if the given name does not exist in the dictionary.

Definition at line 117 of file BuiltinAttributes.cpp.

References mlir::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDictAttribute::bindDerived(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDictAttribute::dunderContains().

◆ mlirDictionaryAttrGetName()

MlirStringRef mlirDictionaryAttrGetName ( void )

Definition at line 102 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirDictionaryAttrGetNumElements()

intptr_t mlirDictionaryAttrGetNumElements ( MlirAttribute attr)

Returns the number of attributes contained in a dictionary attribute.

Definition at line 106 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDictAttribute::dunderLen().

◆ mlirDictionaryAttrGetTypeID()

MlirTypeID mlirDictionaryAttrGetTypeID ( void )

Returns the typeID of a Dictionary attribute.

Definition at line 122 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirDisctinctAttrCreate()

MlirAttribute mlirDisctinctAttrCreate ( MlirAttribute referencedAttr)

Creates a DisctinctAttr with the referenced attribute.

Definition at line 350 of file BuiltinAttributes.cpp.

References mlir::DistinctAttr::create(), unwrap(), and wrap().

◆ mlirElementsAttrGetNumElements()

int64_t mlirElementsAttrGetNumElements ( MlirAttribute attr)

Gets the total number of elements in the given elements attribute.

In order to iterate over the attribute, obtain its type, which must be a statically shaped type and use its sizes to build a multi-dimensional index.

Definition at line 430 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::dunderLen().

◆ mlirElementsAttrGetValue()

MlirAttribute mlirElementsAttrGetValue ( MlirAttribute attr,
intptr_t rank,
uint64_t * idxs )

Returns the element at the given rank-dimensional index.

Definition at line 418 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirElementsAttrIsValidIndex()

bool mlirElementsAttrIsValidIndex ( MlirAttribute attr,
intptr_t rank,
uint64_t * idxs )

Checks whether the given rank-dimensional index is valid in the given elements attribute.

Definition at line 424 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirFlatSymbolRefAttrGet()

MlirAttribute mlirFlatSymbolRefAttrGet ( MlirContext ctx,
MlirStringRef symbol )

Creates a flat symbol reference attribute in the given context referencing a symbol identified by the given string.

Definition at line 362 of file BuiltinAttributes.cpp.

References mlir::FlatSymbolRefAttr::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyFlatSymbolRefAttribute::bindDerived(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PySymbolRefAttribute::fromList().

◆ mlirFlatSymbolRefAttrGetName()

MlirStringRef mlirFlatSymbolRefAttrGetName ( void )

Definition at line 366 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirFlatSymbolRefAttrGetValue()

MlirStringRef mlirFlatSymbolRefAttrGetValue ( MlirAttribute attr)

Returns the referenced symbol as a string reference.

The data remains live as long as the context in which the attribute lives.

Definition at line 370 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyFlatSymbolRefAttribute::bindDerived().

◆ mlirFloatAttrDoubleGet()

MlirAttribute mlirFloatAttrDoubleGet ( MlirContext ctx,
MlirType type,
double value )

Creates a floating point attribute in the given context with the given double value and double-precision FP semantics.

Definition at line 136 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyFloatAttribute::bindDerived().

◆ mlirFloatAttrDoubleGetChecked()

MlirAttribute mlirFloatAttrDoubleGetChecked ( MlirLocation loc,
MlirType type,
double value )

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

Definition at line 141 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyFloatAttribute::bindDerived().

◆ mlirFloatAttrGetName()

MlirStringRef mlirFloatAttrGetName ( void )

Definition at line 134 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirFloatAttrGetTypeID()

MlirTypeID mlirFloatAttrGetTypeID ( void )

Returns the typeID of a Float attribute.

Definition at line 150 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirFloatAttrGetValueDouble()

double mlirFloatAttrGetValueDouble ( MlirAttribute attr)

Returns the value stored in the given floating point attribute, interpreting the value as double.

Definition at line 146 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyFloatAttribute::bindDerived().

◆ mlirIntegerAttrGet()

MlirAttribute mlirIntegerAttrGet ( MlirType type,
int64_t value )

Creates an integer attribute of the given type with the given integer value.

Definition at line 160 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyIntegerAttribute::bindDerived().

◆ mlirIntegerAttrGetFromWords()

MlirAttribute mlirIntegerAttrGetFromWords ( MlirType type,
unsigned numWords,
const uint64_t * words )

Creates an integer attribute of the given type from an array of 64-bit words.

This is useful for creating integer attributes with values with widths larger than 64 bits. Words are in little-endian order (least significant word first). The number of words must match the bit width of the type: numWords = ceil(bitWidth / 64).

Definition at line 193 of file BuiltinAttributes.cpp.

References mlir::Type::getIntOrFloatBitWidth(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyIntegerAttribute::bindDerived().

◆ mlirIntegerAttrGetName()

MlirStringRef mlirIntegerAttrGetName ( void )

Definition at line 164 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirIntegerAttrGetTypeID()

MlirTypeID mlirIntegerAttrGetTypeID ( void )

◆ mlirIntegerAttrGetValueBitWidth()

unsigned mlirIntegerAttrGetValueBitWidth ( MlirAttribute attr)

Returns the bit width of the integer attribute's underlying APInt value.

This is useful for determining the size of the integer, especially for values larger than 64 bits.

Definition at line 178 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGetValueInt()

int64_t mlirIntegerAttrGetValueInt ( MlirAttribute attr)

Returns the value stored in the given integer attribute, assuming the value is of signless type and fits into a signed 64-bit integer.

Definition at line 166 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGetValueNumWords()

unsigned mlirIntegerAttrGetValueNumWords ( MlirAttribute attr)

Returns the number of 64-bit words that make up the integer attribute's underlying APInt value.

For integers <= 64 bits, this returns 1.

Definition at line 182 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGetValueSInt()

int64_t mlirIntegerAttrGetValueSInt ( MlirAttribute attr)

Returns the value stored in the given integer attribute, assuming the value is of signed type and fits into a signed 64-bit integer.

Definition at line 170 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGetValueUInt()

uint64_t mlirIntegerAttrGetValueUInt ( MlirAttribute attr)

Returns the value stored in the given integer attribute, assuming the value is of unsigned type and fits into an unsigned 64-bit integer.

Definition at line 174 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGetValueWords()

void mlirIntegerAttrGetValueWords ( MlirAttribute attr,
uint64_t * words )

Copies the 64-bit words making up the integer attribute's APInt value into the provided buffer.

The buffer must have space for at least mlirIntegerAttrGetValueNumWords(attr) elements. Words are stored in little-endian order (least significant word first). The sign information is not encoded in the words themselves; use the type's signedness to interpret the value correctly.

Definition at line 186 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerSetAttrGet()

MlirAttribute mlirIntegerSetAttrGet ( MlirIntegerSet set)

Creates an integer set attribute wrapping the given set.

The attribute belongs to the same context as the integer set.

Definition at line 233 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyIntegerSetAttribute::bindDerived().

◆ mlirIntegerSetAttrGetName()

MlirStringRef mlirIntegerSetAttrGetName ( void )

Definition at line 237 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirIntegerSetAttrGetTypeID()

MlirTypeID mlirIntegerSetAttrGetTypeID ( void )

Returns the typeID of an IntegerSet attribute.

Definition at line 229 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirIntegerSetAttrGetValue()

MlirIntegerSet mlirIntegerSetAttrGetValue ( MlirAttribute attr)

Returns the integer set wrapped in the given integer set attribute.

Definition at line 241 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirOpaqueAttrGet()

MlirAttribute mlirOpaqueAttrGet ( MlirContext ctx,
MlirStringRef dialectNamespace,
intptr_t dataLength,
const char * data,
MlirType type )

Creates an opaque attribute in the given context associated with the dialect identified by its namespace.

The attribute contains opaque byte data of the specified length (data need not be null-terminated).

Definition at line 253 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpaqueAttribute::bindDerived().

◆ mlirOpaqueAttrGetData()

MlirStringRef mlirOpaqueAttrGetData ( MlirAttribute attr)

Returns the raw data as a string reference.

The data remains live as long as the context in which the attribute lives.

Definition at line 268 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpaqueAttribute::bindDerived().

◆ mlirOpaqueAttrGetDialectNamespace()

MlirStringRef mlirOpaqueAttrGetDialectNamespace ( MlirAttribute attr)

Returns the namespace of the dialect with which the given opaque attribute is associated.

The namespace string is owned by the context.

Definition at line 263 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpaqueAttribute::bindDerived().

◆ mlirOpaqueAttrGetName()

MlirStringRef mlirOpaqueAttrGetName ( void )

Definition at line 261 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirOpaqueAttrGetTypeID()

MlirTypeID mlirOpaqueAttrGetTypeID ( void )

Returns the typeID of an Opaque attribute.

Definition at line 272 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirSparseElementsAttrGetIndices()

MlirAttribute mlirSparseElementsAttrGetIndices ( MlirAttribute attr)

Returns the dense elements attribute containing 64-bit integer indices of non-null elements in the given sparse elements attribute.

Definition at line 1016 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSparseElementsAttrGetTypeID()

MlirTypeID mlirSparseElementsAttrGetTypeID ( void )

Returns the typeID of a SparseElements attribute.

Definition at line 1024 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirSparseElementsAttrGetValues()

MlirAttribute mlirSparseElementsAttrGetValues ( MlirAttribute attr)

Returns the dense elements attribute containing the non-null elements in the given sparse elements attribute.

Definition at line 1020 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSparseElementsAttribute()

MlirAttribute mlirSparseElementsAttribute ( MlirType shapedType,
MlirAttribute denseIndices,
MlirAttribute denseValues )

Creates a sparse elements attribute of the given shape from a list of indices and a list of associated values.

Both lists are expected to be dense elements attributes with the same number of elements. The list of indices is expected to contain 64-bit integers. The attribute is created in the same context as the type.

Definition at line 1007 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirStridedLayoutAttrGet()

MlirAttribute mlirStridedLayoutAttrGet ( MlirContext ctx,
int64_t offset,
intptr_t numStrides,
const int64_t * strides )

◆ mlirStridedLayoutAttrGetName()

MlirStringRef mlirStridedLayoutAttrGetName ( void )

Definition at line 1043 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirStridedLayoutAttrGetNumStrides()

intptr_t mlirStridedLayoutAttrGetNumStrides ( MlirAttribute attr)

◆ mlirStridedLayoutAttrGetOffset()

int64_t mlirStridedLayoutAttrGetOffset ( MlirAttribute attr)

◆ mlirStridedLayoutAttrGetStride()

int64_t mlirStridedLayoutAttrGetStride ( MlirAttribute attr,
intptr_t pos )

◆ mlirStridedLayoutAttrGetTypeID()

MlirTypeID mlirStridedLayoutAttrGetTypeID ( void )

Returns the typeID of a StridedLayout attribute.

Definition at line 1060 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirStringAttrGet()

MlirAttribute mlirStringAttrGet ( MlirContext ctx,
MlirStringRef str )

Creates a string attribute in the given context containing the given string.

Definition at line 284 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyStringAttribute::bindDerived().

◆ mlirStringAttrGetName()

MlirStringRef mlirStringAttrGetName ( void )

Definition at line 288 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirStringAttrGetTypeID()

MlirTypeID mlirStringAttrGetTypeID ( void )

Returns the typeID of a String attribute.

Definition at line 298 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirStringAttrGetValue()

MlirStringRef mlirStringAttrGetValue ( MlirAttribute attr)

Returns the attribute values as a string reference.

The data remains live as long as the context in which the attribute lives.

Definition at line 294 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyStringAttribute::bindDerived().

◆ mlirStringAttrTypedGet()

MlirAttribute mlirStringAttrTypedGet ( MlirType type,
MlirStringRef str )

Creates a string attribute in the given context containing the given string.

Additionally, the attribute has the given type.

Definition at line 290 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyStringAttribute::bindDerived().

◆ mlirSymbolRefAttrGet()

MlirAttribute mlirSymbolRefAttrGet ( MlirContext ctx,
MlirStringRef symbol,
intptr_t numReferences,
MlirAttribute const * references )

Creates a symbol reference attribute in the given context referencing a symbol identified by the given string inside a list of nested references.

Each of the references in the list must not be nested.

Definition at line 310 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PySymbolRefAttribute::fromList().

◆ mlirSymbolRefAttrGetLeafReference()

MlirStringRef mlirSymbolRefAttrGetLeafReference ( MlirAttribute attr)

Returns the string reference to the leaf referenced symbol.

The data remains live as long as the context in which the attribute lives.

Definition at line 330 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSymbolRefAttrGetName()

MlirStringRef mlirSymbolRefAttrGetName ( void )

Definition at line 321 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirSymbolRefAttrGetNestedReference()

MlirAttribute mlirSymbolRefAttrGetNestedReference ( MlirAttribute attr,
intptr_t pos )

Returns pos-th reference nested in the given symbol reference attribute.

Definition at line 340 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PySymbolRefAttribute::bindDerived().

◆ mlirSymbolRefAttrGetNumNestedReferences()

intptr_t mlirSymbolRefAttrGetNumNestedReferences ( MlirAttribute attr)

Returns the number of references nested in the given symbol reference attribute.

Definition at line 335 of file BuiltinAttributes.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PySymbolRefAttribute::bindDerived().

◆ mlirSymbolRefAttrGetRootReference()

MlirStringRef mlirSymbolRefAttrGetRootReference ( MlirAttribute attr)

Returns the string reference to the root referenced symbol.

The data remains live as long as the context in which the attribute lives.

Definition at line 325 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PySymbolRefAttribute::bindDerived().

◆ mlirSymbolRefAttrGetTypeID()

MlirTypeID mlirSymbolRefAttrGetTypeID ( void )

Returns the typeID of an SymbolRef attribute.

Definition at line 346 of file BuiltinAttributes.cpp.

References wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAttributes().

◆ mlirTypeAttrGet()

MlirAttribute mlirTypeAttrGet ( MlirType type)

Creates a type attribute wrapping the given type in the same context as the type.

Definition at line 382 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyTypeAttribute::bindDerived().

◆ mlirTypeAttrGetName()

MlirStringRef mlirTypeAttrGetName ( void )

Definition at line 386 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirTypeAttrGetTypeID()

MlirTypeID mlirTypeAttrGetTypeID ( void )

Returns the typeID of a Type attribute.

Definition at line 392 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirTypeAttrGetValue()

MlirType mlirTypeAttrGetValue ( MlirAttribute attr)

Returns the type stored in the given type attribute.

Definition at line 388 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyTypeAttribute::bindDerived().

◆ mlirUnitAttrGet()

MlirAttribute mlirUnitAttrGet ( MlirContext ctx)

Creates a unit attribute in the given context.

Definition at line 402 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyUnitAttribute::bindDerived().

◆ mlirUnitAttrGetName()

MlirStringRef mlirUnitAttrGetName ( void )

Definition at line 406 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirUnitAttrGetTypeID()

MlirTypeID mlirUnitAttrGetTypeID ( void )

Returns the typeID of a Unit attribute.

Definition at line 408 of file BuiltinAttributes.cpp.

References wrap().

◆ mlirUnmanagedDenseBoolResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseBoolResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const int * elements )

Definition at line 880 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseDoubleResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseDoubleResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const double * elements )

Definition at line 940 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseFloatResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseFloatResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const float * elements )

Definition at line 934 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseInt16ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseInt16ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const int16_t * elements )

Definition at line 916 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseInt32ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseInt32ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const int32_t * elements )

Definition at line 922 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseInt64ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseInt64ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const int64_t * elements )

Definition at line 928 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseInt8ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseInt8ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const int8_t * elements )

Definition at line 910 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
void * data,
size_t dataLength,
size_t dataAlignment,
bool dataIsMutable,
void(* deleter )(void *userData, const void *data, size_t size, size_t align),
void * userData )

Unlike the typed accessors below, constructs the attribute with a raw data buffer and no type/alignment checking.

Use a more strongly typed accessor if possible. If dataIsMutable is false, then an immutable AsmResourceBlob will be created and that passed data contents will be treated as const. If the deleter is non NULL, then it will be called when the data buffer can no longer be accessed (passing userData to it).

Definition at line 848 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseResourceElementsAttribute::getFromBuffer().

◆ mlirUnmanagedDenseUInt16ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseUInt16ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const uint16_t * elements )

Definition at line 892 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseUInt32ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseUInt32ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const uint32_t * elements )

Definition at line 898 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseUInt64ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseUInt64ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const uint64_t * elements )

Definition at line 904 of file BuiltinAttributes.cpp.

References getDenseResource().

◆ mlirUnmanagedDenseUInt8ResourceElementsAttrGet()

MlirAttribute mlirUnmanagedDenseUInt8ResourceElementsAttrGet ( MlirType shapedType,
MlirStringRef name,
intptr_t numElements,
const uint8_t * elements )

Definition at line 886 of file BuiltinAttributes.cpp.

References getDenseResource().