MLIR  16.0.0git
Functions
BuiltinAttributes.h File Reference
#include "mlir-c/AffineMap.h"
#include "mlir-c/IR.h"
#include "mlir-c/Support.h"
+ Include dependency graph for BuiltinAttributes.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

MLIR_CAPI_EXPORTED MlirAttribute mlirAttributeGetNull ()
 Returns an empty attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAAffineMap (MlirAttribute attr)
 Checks whether the given attribute is an affine map attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirAffineMapAttrGet (MlirAffineMap map)
 Creates an affine map attribute wrapping the given map. More...
 
MLIR_CAPI_EXPORTED MlirAffineMap mlirAffineMapAttrGetValue (MlirAttribute attr)
 Returns the affine map wrapped in the given affine map attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAArray (MlirAttribute attr)
 Checks whether the given attribute is an array attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirArrayAttrGet (MlirContext ctx, intptr_t numElements, MlirAttribute const *elements)
 Creates an array element containing the given list of elements in the given context. More...
 
MLIR_CAPI_EXPORTED intptr_t mlirArrayAttrGetNumElements (MlirAttribute attr)
 Returns the number of elements stored in the given array attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirArrayAttrGetElement (MlirAttribute attr, intptr_t pos)
 Returns pos-th element stored in the given array attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADictionary (MlirAttribute attr)
 Checks whether the given attribute is a dictionary attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDictionaryAttrGet (MlirContext ctx, intptr_t numElements, MlirNamedAttribute const *elements)
 Creates a dictionary attribute containing the given list of elements in the provided context. More...
 
MLIR_CAPI_EXPORTED intptr_t mlirDictionaryAttrGetNumElements (MlirAttribute attr)
 Returns the number of attributes contained in a dictionary attribute. More...
 
MLIR_CAPI_EXPORTED MlirNamedAttribute mlirDictionaryAttrGetElement (MlirAttribute attr, intptr_t pos)
 Returns pos-th element of the given dictionary attribute. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAFloat (MlirAttribute attr)
 Checks whether the given attribute is a floating point attribute. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED double mlirFloatAttrGetValueDouble (MlirAttribute attr)
 Returns the value stored in the given floating point attribute, interpreting the value as double. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAInteger (MlirAttribute attr)
 Checks whether the given attribute is an integer attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirIntegerAttrGet (MlirType type, int64_t value)
 Creates an integer attribute of the given type with the given integer value. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsABool (MlirAttribute attr)
 Checks whether the given attribute is a bool attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirBoolAttrGet (MlirContext ctx, int value)
 Creates a bool attribute in the given context with the given value. More...
 
MLIR_CAPI_EXPORTED bool mlirBoolAttrGetValue (MlirAttribute attr)
 Returns the value stored in the given bool attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAIntegerSet (MlirAttribute attr)
 Checks whether the given attribute is an integer set attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAOpaque (MlirAttribute attr)
 Checks whether the given attribute is an opaque attribute. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED MlirStringRef mlirOpaqueAttrGetDialectNamespace (MlirAttribute attr)
 Returns the namespace of the dialect with which the given opaque attribute is associated. More...
 
MLIR_CAPI_EXPORTED MlirStringRef mlirOpaqueAttrGetData (MlirAttribute attr)
 Returns the raw data as a string reference. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAString (MlirAttribute attr)
 Checks whether the given attribute is a string attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirStringAttrGet (MlirContext ctx, MlirStringRef str)
 Creates a string attribute in the given context containing the given string. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirStringAttrTypedGet (MlirType type, MlirStringRef str)
 Creates a string attribute in the given context containing the given string. More...
 
MLIR_CAPI_EXPORTED MlirStringRef mlirStringAttrGetValue (MlirAttribute attr)
 Returns the attribute values as a string reference. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsASymbolRef (MlirAttribute attr)
 Checks whether the given attribute is a symbol reference attribute. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED MlirStringRef mlirSymbolRefAttrGetRootReference (MlirAttribute attr)
 Returns the string reference to the root referenced symbol. More...
 
MLIR_CAPI_EXPORTED MlirStringRef mlirSymbolRefAttrGetLeafReference (MlirAttribute attr)
 Returns the string reference to the leaf referenced symbol. More...
 
MLIR_CAPI_EXPORTED intptr_t mlirSymbolRefAttrGetNumNestedReferences (MlirAttribute attr)
 Returns the number of references nested in the given symbol reference attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirSymbolRefAttrGetNestedReference (MlirAttribute attr, intptr_t pos)
 Returns pos-th reference nested in the given symbol reference attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAFlatSymbolRef (MlirAttribute attr)
 Checks whether the given attribute is a flat symbol reference attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirFlatSymbolRefAttrGet (MlirContext ctx, MlirStringRef symbol)
 Creates a flat symbol reference attribute in the given context referencing a symbol identified by the given string. More...
 
MLIR_CAPI_EXPORTED MlirStringRef mlirFlatSymbolRefAttrGetValue (MlirAttribute attr)
 Returns the referenced symbol as a string reference. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAType (MlirAttribute attr)
 Checks whether the given attribute is a type attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirTypeAttrGet (MlirType type)
 Creates a type attribute wrapping the given type in the same context as the type. More...
 
MLIR_CAPI_EXPORTED MlirType mlirTypeAttrGetValue (MlirAttribute attr)
 Returns the type stored in the given type attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAUnit (MlirAttribute attr)
 Checks whether the given attribute is a unit attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirUnitAttrGet (MlirContext ctx)
 Creates a unit attribute in the given context. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAElements (MlirAttribute attr)
 Checks whether the given attribute is an elements attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirElementsAttrGetValue (MlirAttribute attr, intptr_t rank, uint64_t *idxs)
 Returns the element at the given rank-dimensional index. More...
 
MLIR_CAPI_EXPORTED bool mlirElementsAttrIsValidIndex (MlirAttribute attr, intptr_t rank, uint64_t *idxs)
 Checks whether the given rank-dimensional index is valid in the given elements attribute. More...
 
MLIR_CAPI_EXPORTED int64_t mlirElementsAttrGetNumElements (MlirAttribute attr)
 Gets the total number of elements in the given elements attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseBoolArray (MlirAttribute attr)
 Checks whether the given attribute is a dense array attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI8Array (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI16Array (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI32Array (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI64Array (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseF32Array (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseF64Array (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseBoolArrayGet (MlirContext ctx, intptr_t size, int const *values)
 Create a dense array attribute with the given elements. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseI8ArrayGet (MlirContext ctx, intptr_t size, int8_t const *values)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseI16ArrayGet (MlirContext ctx, intptr_t size, int16_t const *values)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseI32ArrayGet (MlirContext ctx, intptr_t size, int32_t const *values)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseI64ArrayGet (MlirContext ctx, intptr_t size, int64_t const *values)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseF32ArrayGet (MlirContext ctx, intptr_t size, float const *values)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseF64ArrayGet (MlirContext ctx, intptr_t size, double const *values)
 
MLIR_CAPI_EXPORTED intptr_t mlirDenseArrayGetNumElements (MlirAttribute attr)
 Get the size of a dense array. More...
 
MLIR_CAPI_EXPORTED bool mlirDenseBoolArrayGetElement (MlirAttribute attr, intptr_t pos)
 Get an element of a dense array. More...
 
MLIR_CAPI_EXPORTED int8_t mlirDenseI8ArrayGetElement (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED int16_t mlirDenseI16ArrayGetElement (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED int32_t mlirDenseI32ArrayGetElement (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED int64_t mlirDenseI64ArrayGetElement (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED float mlirDenseF32ArrayGetElement (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED double mlirDenseF64ArrayGetElement (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseElements (MlirAttribute attr)
 Checks whether the given attribute is a dense elements attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseIntElements (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseFPElements (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrSplatGet (MlirType shapedType, MlirAttribute element)
 Creates a dense elements attribute with the given Shaped type containing a single replicated element (splat). More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrBoolSplatGet (MlirType shapedType, bool element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt8SplatGet (MlirType shapedType, uint8_t element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt8SplatGet (MlirType shapedType, int8_t element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt32SplatGet (MlirType shapedType, uint32_t element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt32SplatGet (MlirType shapedType, int32_t element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt64SplatGet (MlirType shapedType, uint64_t element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt64SplatGet (MlirType shapedType, int64_t element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrFloatSplatGet (MlirType shapedType, float element)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrDoubleSplatGet (MlirType shapedType, double element)
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt8Get (MlirType shapedType, intptr_t numElements, const uint8_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt8Get (MlirType shapedType, intptr_t numElements, const int8_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt16Get (MlirType shapedType, intptr_t numElements, const uint16_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt16Get (MlirType shapedType, intptr_t numElements, const int16_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt32Get (MlirType shapedType, intptr_t numElements, const uint32_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt32Get (MlirType shapedType, intptr_t numElements, const int32_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt64Get (MlirType shapedType, intptr_t numElements, const uint64_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt64Get (MlirType shapedType, intptr_t numElements, const int64_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrFloatGet (MlirType shapedType, intptr_t numElements, const float *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrDoubleGet (MlirType shapedType, intptr_t numElements, const double *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrBFloat16Get (MlirType shapedType, intptr_t numElements, const uint16_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrFloat16Get (MlirType shapedType, intptr_t numElements, const uint16_t *elements)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrStringGet (MlirType shapedType, intptr_t numElements, MlirStringRef *strs)
 Creates a dense elements attribute with the given shaped type from string elements. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED bool mlirDenseElementsAttrIsSplat (MlirAttribute attr)
 Checks whether the given dense elements attribute contains a single replicated value (splat). More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrGetSplatValue (MlirAttribute attr)
 Returns the single replicated value (splat) of a specific type contained by the given dense elements attribute. More...
 
MLIR_CAPI_EXPORTED int mlirDenseElementsAttrGetBoolSplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED int8_t mlirDenseElementsAttrGetInt8SplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED uint8_t mlirDenseElementsAttrGetUInt8SplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED int32_t mlirDenseElementsAttrGetInt32SplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED uint32_t mlirDenseElementsAttrGetUInt32SplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED int64_t mlirDenseElementsAttrGetInt64SplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED uint64_t mlirDenseElementsAttrGetUInt64SplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED float mlirDenseElementsAttrGetFloatSplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED double mlirDenseElementsAttrGetDoubleSplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED MlirStringRef mlirDenseElementsAttrGetStringSplatValue (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED int8_t mlirDenseElementsAttrGetInt8Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED uint8_t mlirDenseElementsAttrGetUInt8Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED int16_t mlirDenseElementsAttrGetInt16Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED uint16_t mlirDenseElementsAttrGetUInt16Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED int32_t mlirDenseElementsAttrGetInt32Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED uint32_t mlirDenseElementsAttrGetUInt32Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED int64_t mlirDenseElementsAttrGetInt64Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED uint64_t mlirDenseElementsAttrGetUInt64Value (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED float mlirDenseElementsAttrGetFloatValue (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED double mlirDenseElementsAttrGetDoubleValue (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED MlirStringRef mlirDenseElementsAttrGetStringValue (MlirAttribute attr, intptr_t pos)
 
MLIR_CAPI_EXPORTED const voidmlirDenseElementsAttrGetRawData (MlirAttribute attr)
 Returns the raw data of the given dense elements attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsASparseElements (MlirAttribute attr)
 Checks whether the given attribute is a sparse elements attribute. More...
 
MLIR_CAPI_EXPORTED 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. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirSparseElementsAttrGetIndices (MlirAttribute attr)
 Returns the dense elements attribute containing 64-bit integer indices of non-null elements in the given sparse elements attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirSparseElementsAttrGetValues (MlirAttribute attr)
 Returns the dense elements attribute containing the non-null elements in the given sparse elements attribute. More...
 
MLIR_CAPI_EXPORTED bool mlirAttributeIsAStridedLayout (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED MlirAttribute mlirStridedLayoutAttrGet (MlirContext ctx, int64_t offset, intptr_t numStrides, const int64_t *strides)
 
MLIR_CAPI_EXPORTED int64_t mlirStridedLayoutAttrGetOffset (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED intptr_t mlirStridedLayoutAttrGetNumStrides (MlirAttribute attr)
 
MLIR_CAPI_EXPORTED int64_t mlirStridedLayoutAttrGetStride (MlirAttribute attr, intptr_t pos)
 

Function Documentation

◆ mlirAffineMapAttrGet()

MLIR_CAPI_EXPORTED 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 28 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirAffineMapAttrGetValue()

MLIR_CAPI_EXPORTED MlirAffineMap mlirAffineMapAttrGetValue ( MlirAttribute  attr)

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

Definition at line 32 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirArrayAttrGet()

MLIR_CAPI_EXPORTED 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 44 of file BuiltinAttributes.cpp.

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

◆ mlirArrayAttrGetElement()

MLIR_CAPI_EXPORTED MlirAttribute mlirArrayAttrGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Returns pos-th element stored in the given array attribute.

Definition at line 56 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirArrayAttrGetNumElements()

MLIR_CAPI_EXPORTED intptr_t mlirArrayAttrGetNumElements ( MlirAttribute  attr)

Returns the number of elements stored in the given array attribute.

Definition at line 52 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeGetNull()

MLIR_CAPI_EXPORTED MlirAttribute mlirAttributeGetNull ( )

Returns an empty attribute.

Definition at line 18 of file BuiltinAttributes.cpp.

Referenced by mlir::python::PyInferTypeOpInterface::inferReturnTypes(), and mlirDenseElementsAttrRawBufferGet().

◆ mlirAttributeIsAAffineMap()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAAffineMap ( MlirAttribute  attr)

Checks whether the given attribute is an affine map attribute.

Definition at line 24 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAArray()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAArray ( MlirAttribute  attr)

Checks whether the given attribute is an array attribute.

Definition at line 40 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsABool()

MLIR_CAPI_EXPORTED bool mlirAttributeIsABool ( MlirAttribute  attr)

Checks whether the given attribute is a bool attribute.

Definition at line 144 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseBoolArray()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseBoolArray ( MlirAttribute  attr)

Checks whether the given attribute is a dense array attribute.

Definition at line 321 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseElements()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseElements ( MlirAttribute  attr)

Checks whether the given attribute is a dense elements attribute.

Definition at line 421 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseF32Array()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseF32Array ( MlirAttribute  attr)

Definition at line 336 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseF64Array()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseF64Array ( MlirAttribute  attr)

Definition at line 339 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseFPElements()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseFPElements ( MlirAttribute  attr)

Definition at line 427 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI16Array()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI16Array ( MlirAttribute  attr)

Definition at line 327 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI32Array()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI32Array ( MlirAttribute  attr)

Definition at line 330 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI64Array()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI64Array ( MlirAttribute  attr)

Definition at line 333 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseI8Array()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseI8Array ( MlirAttribute  attr)

Definition at line 324 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADenseIntElements()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADenseIntElements ( MlirAttribute  attr)

Definition at line 424 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsADictionary()

MLIR_CAPI_EXPORTED bool mlirAttributeIsADictionary ( MlirAttribute  attr)

Checks whether the given attribute is a dictionary attribute.

Definition at line 64 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAElements()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAElements ( MlirAttribute  attr)

Checks whether the given attribute is an elements attribute.

Definition at line 293 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAFlatSymbolRef()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAFlatSymbolRef ( MlirAttribute  attr)

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

Definition at line 249 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAFloat()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAFloat ( MlirAttribute  attr)

Checks whether the given attribute is a floating point attribute.

Definition at line 98 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAInteger()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAInteger ( MlirAttribute  attr)

Checks whether the given attribute is an integer attribute.

Definition at line 120 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAIntegerSet()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAIntegerSet ( MlirAttribute  attr)

Checks whether the given attribute is an integer set attribute.

Definition at line 160 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAOpaque()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAOpaque ( MlirAttribute  attr)

Checks whether the given attribute is an opaque attribute.

Definition at line 168 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsASparseElements()

MLIR_CAPI_EXPORTED bool mlirAttributeIsASparseElements ( MlirAttribute  attr)

Checks whether the given attribute is a sparse elements attribute.

Definition at line 705 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAStridedLayout()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAStridedLayout ( MlirAttribute  attr)

Definition at line 730 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAString()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAString ( MlirAttribute  attr)

Checks whether the given attribute is a string attribute.

Definition at line 192 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsASymbolRef()

MLIR_CAPI_EXPORTED bool mlirAttributeIsASymbolRef ( MlirAttribute  attr)

Checks whether the given attribute is a symbol reference attribute.

Definition at line 212 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAType()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAType ( MlirAttribute  attr)

Checks whether the given attribute is a type attribute.

Definition at line 265 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirAttributeIsAUnit()

MLIR_CAPI_EXPORTED bool mlirAttributeIsAUnit ( MlirAttribute  attr)

Checks whether the given attribute is a unit attribute.

Definition at line 281 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirBoolAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirBoolAttrGet ( MlirContext  ctx,
int  value 
)

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

Definition at line 148 of file BuiltinAttributes.cpp.

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

◆ mlirBoolAttrGetValue()

MLIR_CAPI_EXPORTED bool mlirBoolAttrGetValue ( MlirAttribute  attr)

Returns the value stored in the given bool attribute.

Definition at line 152 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseArrayGetNumElements()

MLIR_CAPI_EXPORTED intptr_t mlirDenseArrayGetNumElements ( MlirAttribute  attr)

Get the size of a dense array.

Definition at line 385 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseBoolArrayGet()

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

Create a dense array attribute with the given elements.

Definition at line 346 of file BuiltinAttributes.cpp.

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

◆ mlirDenseBoolArrayGetElement()

MLIR_CAPI_EXPORTED bool mlirDenseBoolArrayGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Get an element of a dense array.

Definition at line 392 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrBFloat16Get()

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

Definition at line 575 of file BuiltinAttributes.cpp.

References mlirDenseElementsAttrRawBufferGet().

◆ mlirDenseElementsAttrBoolGet()

MLIR_CAPI_EXPORTED 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 507 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrBoolSplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrBoolSplatGet ( MlirType  shapedType,
bool  element 
)

Definition at line 461 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrDoubleGet()

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

Definition at line 570 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrDoubleSplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrDoubleSplatGet ( MlirType  shapedType,
double  element 
)

Definition at line 501 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrFloat16Get()

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

Definition at line 582 of file BuiltinAttributes.cpp.

References mlirDenseElementsAttrRawBufferGet().

◆ mlirDenseElementsAttrFloatGet()

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

Definition at line 565 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrFloatSplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrFloatSplatGet ( MlirType  shapedType,
float  element 
)

Definition at line 496 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrGet()

MLIR_CAPI_EXPORTED 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 434 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrGetBoolSplatValue()

MLIR_CAPI_EXPORTED int mlirDenseElementsAttrGetBoolSplatValue ( MlirAttribute  attr)

Definition at line 619 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetBoolValue()

MLIR_CAPI_EXPORTED 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 654 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetDoubleSplatValue()

MLIR_CAPI_EXPORTED double mlirDenseElementsAttrGetDoubleSplatValue ( MlirAttribute  attr)

Definition at line 643 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetDoubleValue()

MLIR_CAPI_EXPORTED double mlirDenseElementsAttrGetDoubleValue ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 684 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetFloatSplatValue()

MLIR_CAPI_EXPORTED float mlirDenseElementsAttrGetFloatSplatValue ( MlirAttribute  attr)

Definition at line 640 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetFloatValue()

MLIR_CAPI_EXPORTED float mlirDenseElementsAttrGetFloatValue ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 681 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt16Value()

MLIR_CAPI_EXPORTED int16_t mlirDenseElementsAttrGetInt16Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 663 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt32SplatValue()

MLIR_CAPI_EXPORTED int32_t mlirDenseElementsAttrGetInt32SplatValue ( MlirAttribute  attr)

Definition at line 628 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt32Value()

MLIR_CAPI_EXPORTED int32_t mlirDenseElementsAttrGetInt32Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 669 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt64SplatValue()

MLIR_CAPI_EXPORTED int64_t mlirDenseElementsAttrGetInt64SplatValue ( MlirAttribute  attr)

Definition at line 634 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt64Value()

MLIR_CAPI_EXPORTED int64_t mlirDenseElementsAttrGetInt64Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 675 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt8SplatValue()

MLIR_CAPI_EXPORTED int8_t mlirDenseElementsAttrGetInt8SplatValue ( MlirAttribute  attr)

Definition at line 622 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetInt8Value()

MLIR_CAPI_EXPORTED int8_t mlirDenseElementsAttrGetInt8Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 657 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetRawData()

MLIR_CAPI_EXPORTED const void* mlirDenseElementsAttrGetRawData ( MlirAttribute  attr)

Returns the raw data of the given dense elements attribute.

Definition at line 696 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetSplatValue()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrGetSplatValue ( MlirAttribute  attr)

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

Definition at line 615 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDenseElementsAttrGetStringSplatValue()

MLIR_CAPI_EXPORTED MlirStringRef mlirDenseElementsAttrGetStringSplatValue ( MlirAttribute  attr)

Definition at line 646 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDenseElementsAttrGetStringValue()

MLIR_CAPI_EXPORTED MlirStringRef mlirDenseElementsAttrGetStringValue ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 687 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDenseElementsAttrGetUInt16Value()

MLIR_CAPI_EXPORTED uint16_t mlirDenseElementsAttrGetUInt16Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 666 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt32SplatValue()

MLIR_CAPI_EXPORTED uint32_t mlirDenseElementsAttrGetUInt32SplatValue ( MlirAttribute  attr)

Definition at line 631 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt32Value()

MLIR_CAPI_EXPORTED uint32_t mlirDenseElementsAttrGetUInt32Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 672 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt64SplatValue()

MLIR_CAPI_EXPORTED uint64_t mlirDenseElementsAttrGetUInt64SplatValue ( MlirAttribute  attr)

Definition at line 637 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt64Value()

MLIR_CAPI_EXPORTED uint64_t mlirDenseElementsAttrGetUInt64Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 678 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt8SplatValue()

MLIR_CAPI_EXPORTED uint8_t mlirDenseElementsAttrGetUInt8SplatValue ( MlirAttribute  attr)

Definition at line 625 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrGetUInt8Value()

MLIR_CAPI_EXPORTED uint8_t mlirDenseElementsAttrGetUInt8Value ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 660 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrInt16Get()

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

Definition at line 540 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt32Get()

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

Definition at line 550 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt32SplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt32SplatGet ( MlirType  shapedType,
int32_t  element 
)

Definition at line 481 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrInt64Get()

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

Definition at line 560 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt64SplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt64SplatGet ( MlirType  shapedType,
int64_t  element 
)

Definition at line 491 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrInt8Get()

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

Definition at line 530 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrInt8SplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrInt8SplatGet ( MlirType  shapedType,
int8_t  element 
)

Definition at line 471 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrIsSplat()

MLIR_CAPI_EXPORTED bool mlirDenseElementsAttrIsSplat ( MlirAttribute  attr)

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

Definition at line 611 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseElementsAttrRawBufferGet()

MLIR_CAPI_EXPORTED 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 443 of file BuiltinAttributes.cpp.

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

Referenced by mlirDenseElementsAttrBFloat16Get(), and mlirDenseElementsAttrFloat16Get().

◆ mlirDenseElementsAttrReshapeGet()

MLIR_CAPI_EXPORTED 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 602 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDenseElementsAttrSplatGet()

MLIR_CAPI_EXPORTED 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 456 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrStringGet()

MLIR_CAPI_EXPORTED 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 590 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrUInt16Get()

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

Definition at line 535 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt32Get()

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

Definition at line 545 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt32SplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt32SplatGet ( MlirType  shapedType,
uint32_t  element 
)

Definition at line 476 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrUInt64Get()

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

Definition at line 555 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt64SplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt64SplatGet ( MlirType  shapedType,
uint64_t  element 
)

Definition at line 486 of file BuiltinAttributes.cpp.

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

◆ mlirDenseElementsAttrUInt8Get()

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

Definition at line 525 of file BuiltinAttributes.cpp.

References getDenseAttribute().

◆ mlirDenseElementsAttrUInt8SplatGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirDenseElementsAttrUInt8SplatGet ( MlirType  shapedType,
uint8_t  element 
)

Definition at line 466 of file BuiltinAttributes.cpp.

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

◆ mlirDenseF32ArrayGet()

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

◆ mlirDenseF32ArrayGetElement()

MLIR_CAPI_EXPORTED float mlirDenseF32ArrayGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 407 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseF64ArrayGet()

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

◆ mlirDenseF64ArrayGetElement()

MLIR_CAPI_EXPORTED double mlirDenseF64ArrayGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 410 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseI16ArrayGet()

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

◆ mlirDenseI16ArrayGetElement()

MLIR_CAPI_EXPORTED int16_t mlirDenseI16ArrayGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 398 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseI32ArrayGet()

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

◆ mlirDenseI32ArrayGetElement()

MLIR_CAPI_EXPORTED int32_t mlirDenseI32ArrayGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 401 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseI64ArrayGet()

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

◆ mlirDenseI64ArrayGetElement()

MLIR_CAPI_EXPORTED int64_t mlirDenseI64ArrayGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 404 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDenseI8ArrayGet()

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

◆ mlirDenseI8ArrayGetElement()

MLIR_CAPI_EXPORTED int8_t mlirDenseI8ArrayGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 395 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirDictionaryAttrGet()

MLIR_CAPI_EXPORTED 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 68 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDictionaryAttrGetElement()

MLIR_CAPI_EXPORTED MlirNamedAttribute mlirDictionaryAttrGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Returns pos-th element of the given dictionary attribute.

Definition at line 82 of file BuiltinAttributes.cpp.

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

◆ mlirDictionaryAttrGetElementByName()

MLIR_CAPI_EXPORTED 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 89 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirDictionaryAttrGetNumElements()

MLIR_CAPI_EXPORTED intptr_t mlirDictionaryAttrGetNumElements ( MlirAttribute  attr)

Returns the number of attributes contained in a dictionary attribute.

Definition at line 78 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirElementsAttrGetNumElements()

MLIR_CAPI_EXPORTED 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 310 of file BuiltinAttributes.cpp.

References getNumElements(), and unwrap().

◆ mlirElementsAttrGetValue()

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

Returns the element at the given rank-dimensional index.

Definition at line 297 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirElementsAttrIsValidIndex()

MLIR_CAPI_EXPORTED 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 304 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirFlatSymbolRefAttrGet()

MLIR_CAPI_EXPORTED 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 253 of file BuiltinAttributes.cpp.

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

◆ mlirFlatSymbolRefAttrGetValue()

MLIR_CAPI_EXPORTED 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 257 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirFloatAttrDoubleGet()

MLIR_CAPI_EXPORTED 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 102 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirFloatAttrDoubleGetChecked()

MLIR_CAPI_EXPORTED 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 107 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirFloatAttrGetValueDouble()

MLIR_CAPI_EXPORTED double mlirFloatAttrGetValueDouble ( MlirAttribute  attr)

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

Definition at line 112 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirIntegerAttrGet ( MlirType  type,
int64_t  value 
)

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

Definition at line 124 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirIntegerAttrGetValueInt()

MLIR_CAPI_EXPORTED 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 128 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGetValueSInt()

MLIR_CAPI_EXPORTED 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 132 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirIntegerAttrGetValueUInt()

MLIR_CAPI_EXPORTED 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 136 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirOpaqueAttrGet()

MLIR_CAPI_EXPORTED 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 172 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirOpaqueAttrGetData()

MLIR_CAPI_EXPORTED 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 184 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirOpaqueAttrGetDialectNamespace()

MLIR_CAPI_EXPORTED 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 180 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSparseElementsAttrGetIndices()

MLIR_CAPI_EXPORTED 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 718 of file BuiltinAttributes.cpp.

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

◆ mlirSparseElementsAttrGetValues()

MLIR_CAPI_EXPORTED MlirAttribute mlirSparseElementsAttrGetValues ( MlirAttribute  attr)

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

Definition at line 722 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSparseElementsAttribute()

MLIR_CAPI_EXPORTED 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 709 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirStridedLayoutAttrGet()

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

Definition at line 734 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirStridedLayoutAttrGetNumStrides()

MLIR_CAPI_EXPORTED intptr_t mlirStridedLayoutAttrGetNumStrides ( MlirAttribute  attr)

Definition at line 745 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirStridedLayoutAttrGetOffset()

MLIR_CAPI_EXPORTED int64_t mlirStridedLayoutAttrGetOffset ( MlirAttribute  attr)

Definition at line 741 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirStridedLayoutAttrGetStride()

MLIR_CAPI_EXPORTED int64_t mlirStridedLayoutAttrGetStride ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 750 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirStringAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirStringAttrGet ( MlirContext  ctx,
MlirStringRef  str 
)

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

Definition at line 196 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::PySymbolTable::setSymbolName(), and mlir::python::PySymbolTable::setVisibility().

◆ mlirStringAttrGetValue()

MLIR_CAPI_EXPORTED 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 204 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirStringAttrTypedGet()

MLIR_CAPI_EXPORTED 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 200 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSymbolRefAttrGet()

MLIR_CAPI_EXPORTED 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 216 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSymbolRefAttrGetLeafReference()

MLIR_CAPI_EXPORTED 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 231 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSymbolRefAttrGetNestedReference()

MLIR_CAPI_EXPORTED MlirAttribute mlirSymbolRefAttrGetNestedReference ( MlirAttribute  attr,
intptr_t  pos 
)

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

Definition at line 240 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirSymbolRefAttrGetNumNestedReferences()

MLIR_CAPI_EXPORTED intptr_t mlirSymbolRefAttrGetNumNestedReferences ( MlirAttribute  attr)

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

Definition at line 235 of file BuiltinAttributes.cpp.

References unwrap().

◆ mlirSymbolRefAttrGetRootReference()

MLIR_CAPI_EXPORTED 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 227 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirTypeAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirTypeAttrGet ( MlirType  type)

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

Definition at line 269 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirTypeAttrGetValue()

MLIR_CAPI_EXPORTED MlirType mlirTypeAttrGetValue ( MlirAttribute  attr)

Returns the type stored in the given type attribute.

Definition at line 273 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().

◆ mlirUnitAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirUnitAttrGet ( MlirContext  ctx)

Creates a unit attribute in the given context.

Definition at line 285 of file BuiltinAttributes.cpp.

References unwrap(), and wrap().