Lines Matching refs:attr
24 bool mlirAttributeIsAAffineMap(MlirAttribute attr) { in mlirAttributeIsAAffineMap() argument
25 return unwrap(attr).isa<AffineMapAttr>(); in mlirAttributeIsAAffineMap()
32 MlirAffineMap mlirAffineMapAttrGetValue(MlirAttribute attr) { in mlirAffineMapAttrGetValue() argument
33 return wrap(unwrap(attr).cast<AffineMapAttr>().getValue()); in mlirAffineMapAttrGetValue()
40 bool mlirAttributeIsAArray(MlirAttribute attr) { in mlirAttributeIsAArray() argument
41 return unwrap(attr).isa<ArrayAttr>(); in mlirAttributeIsAArray()
52 intptr_t mlirArrayAttrGetNumElements(MlirAttribute attr) { in mlirArrayAttrGetNumElements() argument
53 return static_cast<intptr_t>(unwrap(attr).cast<ArrayAttr>().size()); in mlirArrayAttrGetNumElements()
56 MlirAttribute mlirArrayAttrGetElement(MlirAttribute attr, intptr_t pos) { in mlirArrayAttrGetElement() argument
57 return wrap(unwrap(attr).cast<ArrayAttr>().getValue()[pos]); in mlirArrayAttrGetElement()
64 bool mlirAttributeIsADictionary(MlirAttribute attr) { in mlirAttributeIsADictionary() argument
65 return unwrap(attr).isa<DictionaryAttr>(); in mlirAttributeIsADictionary()
78 intptr_t mlirDictionaryAttrGetNumElements(MlirAttribute attr) { in mlirDictionaryAttrGetNumElements() argument
79 return static_cast<intptr_t>(unwrap(attr).cast<DictionaryAttr>().size()); in mlirDictionaryAttrGetNumElements()
82 MlirNamedAttribute mlirDictionaryAttrGetElement(MlirAttribute attr, in mlirDictionaryAttrGetElement() argument
85 unwrap(attr).cast<DictionaryAttr>().getValue()[pos]; in mlirDictionaryAttrGetElement()
89 MlirAttribute mlirDictionaryAttrGetElementByName(MlirAttribute attr, in mlirDictionaryAttrGetElementByName() argument
91 return wrap(unwrap(attr).cast<DictionaryAttr>().get(unwrap(name))); in mlirDictionaryAttrGetElementByName()
98 bool mlirAttributeIsAFloat(MlirAttribute attr) { in mlirAttributeIsAFloat() argument
99 return unwrap(attr).isa<FloatAttr>(); in mlirAttributeIsAFloat()
112 double mlirFloatAttrGetValueDouble(MlirAttribute attr) { in mlirFloatAttrGetValueDouble() argument
113 return unwrap(attr).cast<FloatAttr>().getValueAsDouble(); in mlirFloatAttrGetValueDouble()
120 bool mlirAttributeIsAInteger(MlirAttribute attr) { in mlirAttributeIsAInteger() argument
121 return unwrap(attr).isa<IntegerAttr>(); in mlirAttributeIsAInteger()
128 int64_t mlirIntegerAttrGetValueInt(MlirAttribute attr) { in mlirIntegerAttrGetValueInt() argument
129 return unwrap(attr).cast<IntegerAttr>().getInt(); in mlirIntegerAttrGetValueInt()
132 int64_t mlirIntegerAttrGetValueSInt(MlirAttribute attr) { in mlirIntegerAttrGetValueSInt() argument
133 return unwrap(attr).cast<IntegerAttr>().getSInt(); in mlirIntegerAttrGetValueSInt()
136 uint64_t mlirIntegerAttrGetValueUInt(MlirAttribute attr) { in mlirIntegerAttrGetValueUInt() argument
137 return unwrap(attr).cast<IntegerAttr>().getUInt(); in mlirIntegerAttrGetValueUInt()
144 bool mlirAttributeIsABool(MlirAttribute attr) { in mlirAttributeIsABool() argument
145 return unwrap(attr).isa<BoolAttr>(); in mlirAttributeIsABool()
152 bool mlirBoolAttrGetValue(MlirAttribute attr) { in mlirBoolAttrGetValue() argument
153 return unwrap(attr).cast<BoolAttr>().getValue(); in mlirBoolAttrGetValue()
160 bool mlirAttributeIsAIntegerSet(MlirAttribute attr) { in mlirAttributeIsAIntegerSet() argument
161 return unwrap(attr).isa<IntegerSetAttr>(); in mlirAttributeIsAIntegerSet()
168 bool mlirAttributeIsAOpaque(MlirAttribute attr) { in mlirAttributeIsAOpaque() argument
169 return unwrap(attr).isa<OpaqueAttr>(); in mlirAttributeIsAOpaque()
180 MlirStringRef mlirOpaqueAttrGetDialectNamespace(MlirAttribute attr) { in mlirOpaqueAttrGetDialectNamespace() argument
181 return wrap(unwrap(attr).cast<OpaqueAttr>().getDialectNamespace().strref()); in mlirOpaqueAttrGetDialectNamespace()
184 MlirStringRef mlirOpaqueAttrGetData(MlirAttribute attr) { in mlirOpaqueAttrGetData() argument
185 return wrap(unwrap(attr).cast<OpaqueAttr>().getAttrData()); in mlirOpaqueAttrGetData()
192 bool mlirAttributeIsAString(MlirAttribute attr) { in mlirAttributeIsAString() argument
193 return unwrap(attr).isa<StringAttr>(); in mlirAttributeIsAString()
204 MlirStringRef mlirStringAttrGetValue(MlirAttribute attr) { in mlirStringAttrGetValue() argument
205 return wrap(unwrap(attr).cast<StringAttr>().getValue()); in mlirStringAttrGetValue()
212 bool mlirAttributeIsASymbolRef(MlirAttribute attr) { in mlirAttributeIsASymbolRef() argument
213 return unwrap(attr).isa<SymbolRefAttr>(); in mlirAttributeIsASymbolRef()
227 MlirStringRef mlirSymbolRefAttrGetRootReference(MlirAttribute attr) { in mlirSymbolRefAttrGetRootReference() argument
228 return wrap(unwrap(attr).cast<SymbolRefAttr>().getRootReference().getValue()); in mlirSymbolRefAttrGetRootReference()
231 MlirStringRef mlirSymbolRefAttrGetLeafReference(MlirAttribute attr) { in mlirSymbolRefAttrGetLeafReference() argument
232 return wrap(unwrap(attr).cast<SymbolRefAttr>().getLeafReference().getValue()); in mlirSymbolRefAttrGetLeafReference()
235 intptr_t mlirSymbolRefAttrGetNumNestedReferences(MlirAttribute attr) { in mlirSymbolRefAttrGetNumNestedReferences() argument
237 unwrap(attr).cast<SymbolRefAttr>().getNestedReferences().size()); in mlirSymbolRefAttrGetNumNestedReferences()
240 MlirAttribute mlirSymbolRefAttrGetNestedReference(MlirAttribute attr, in mlirSymbolRefAttrGetNestedReference() argument
242 return wrap(unwrap(attr).cast<SymbolRefAttr>().getNestedReferences()[pos]); in mlirSymbolRefAttrGetNestedReference()
249 bool mlirAttributeIsAFlatSymbolRef(MlirAttribute attr) { in mlirAttributeIsAFlatSymbolRef() argument
250 return unwrap(attr).isa<FlatSymbolRefAttr>(); in mlirAttributeIsAFlatSymbolRef()
257 MlirStringRef mlirFlatSymbolRefAttrGetValue(MlirAttribute attr) { in mlirFlatSymbolRefAttrGetValue() argument
258 return wrap(unwrap(attr).cast<FlatSymbolRefAttr>().getValue()); in mlirFlatSymbolRefAttrGetValue()
265 bool mlirAttributeIsAType(MlirAttribute attr) { in mlirAttributeIsAType() argument
266 return unwrap(attr).isa<TypeAttr>(); in mlirAttributeIsAType()
273 MlirType mlirTypeAttrGetValue(MlirAttribute attr) { in mlirTypeAttrGetValue() argument
274 return wrap(unwrap(attr).cast<TypeAttr>().getValue()); in mlirTypeAttrGetValue()
281 bool mlirAttributeIsAUnit(MlirAttribute attr) { in mlirAttributeIsAUnit() argument
282 return unwrap(attr).isa<UnitAttr>(); in mlirAttributeIsAUnit()
293 bool mlirAttributeIsAElements(MlirAttribute attr) { in mlirAttributeIsAElements() argument
294 return unwrap(attr).isa<ElementsAttr>(); in mlirAttributeIsAElements()
297 MlirAttribute mlirElementsAttrGetValue(MlirAttribute attr, intptr_t rank, in mlirElementsAttrGetValue() argument
299 return wrap(unwrap(attr) in mlirElementsAttrGetValue()
304 bool mlirElementsAttrIsValidIndex(MlirAttribute attr, intptr_t rank, in mlirElementsAttrIsValidIndex() argument
306 return unwrap(attr).cast<ElementsAttr>().isValidIndex( in mlirElementsAttrIsValidIndex()
310 int64_t mlirElementsAttrGetNumElements(MlirAttribute attr) { in mlirElementsAttrGetNumElements() argument
311 return unwrap(attr).cast<ElementsAttr>().getNumElements(); in mlirElementsAttrGetNumElements()
321 bool mlirAttributeIsADenseElements(MlirAttribute attr) { in mlirAttributeIsADenseElements() argument
322 return unwrap(attr).isa<DenseElementsAttr>(); in mlirAttributeIsADenseElements()
324 bool mlirAttributeIsADenseIntElements(MlirAttribute attr) { in mlirAttributeIsADenseIntElements() argument
325 return unwrap(attr).isa<DenseIntElementsAttr>(); in mlirAttributeIsADenseIntElements()
327 bool mlirAttributeIsADenseFPElements(MlirAttribute attr) { in mlirAttributeIsADenseFPElements() argument
328 return unwrap(attr).isa<DenseFPElementsAttr>(); in mlirAttributeIsADenseFPElements()
502 MlirAttribute mlirDenseElementsAttrReshapeGet(MlirAttribute attr, in mlirDenseElementsAttrReshapeGet() argument
504 return wrap(unwrap(attr).cast<DenseElementsAttr>().reshape( in mlirDenseElementsAttrReshapeGet()
511 bool mlirDenseElementsAttrIsSplat(MlirAttribute attr) { in mlirDenseElementsAttrIsSplat() argument
512 return unwrap(attr).cast<DenseElementsAttr>().isSplat(); in mlirDenseElementsAttrIsSplat()
515 MlirAttribute mlirDenseElementsAttrGetSplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetSplatValue() argument
517 unwrap(attr).cast<DenseElementsAttr>().getSplatValue<Attribute>()); in mlirDenseElementsAttrGetSplatValue()
519 int mlirDenseElementsAttrGetBoolSplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetBoolSplatValue() argument
520 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<bool>(); in mlirDenseElementsAttrGetBoolSplatValue()
522 int8_t mlirDenseElementsAttrGetInt8SplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetInt8SplatValue() argument
523 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<int8_t>(); in mlirDenseElementsAttrGetInt8SplatValue()
525 uint8_t mlirDenseElementsAttrGetUInt8SplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetUInt8SplatValue() argument
526 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<uint8_t>(); in mlirDenseElementsAttrGetUInt8SplatValue()
528 int32_t mlirDenseElementsAttrGetInt32SplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetInt32SplatValue() argument
529 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<int32_t>(); in mlirDenseElementsAttrGetInt32SplatValue()
531 uint32_t mlirDenseElementsAttrGetUInt32SplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetUInt32SplatValue() argument
532 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<uint32_t>(); in mlirDenseElementsAttrGetUInt32SplatValue()
534 int64_t mlirDenseElementsAttrGetInt64SplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetInt64SplatValue() argument
535 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<int64_t>(); in mlirDenseElementsAttrGetInt64SplatValue()
537 uint64_t mlirDenseElementsAttrGetUInt64SplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetUInt64SplatValue() argument
538 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<uint64_t>(); in mlirDenseElementsAttrGetUInt64SplatValue()
540 float mlirDenseElementsAttrGetFloatSplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetFloatSplatValue() argument
541 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<float>(); in mlirDenseElementsAttrGetFloatSplatValue()
543 double mlirDenseElementsAttrGetDoubleSplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetDoubleSplatValue() argument
544 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<double>(); in mlirDenseElementsAttrGetDoubleSplatValue()
546 MlirStringRef mlirDenseElementsAttrGetStringSplatValue(MlirAttribute attr) { in mlirDenseElementsAttrGetStringSplatValue() argument
548 unwrap(attr).cast<DenseElementsAttr>().getSplatValue<StringRef>()); in mlirDenseElementsAttrGetStringSplatValue()
554 bool mlirDenseElementsAttrGetBoolValue(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetBoolValue() argument
555 return unwrap(attr).cast<DenseElementsAttr>().getValues<bool>()[pos]; in mlirDenseElementsAttrGetBoolValue()
557 int8_t mlirDenseElementsAttrGetInt8Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetInt8Value() argument
558 return unwrap(attr).cast<DenseElementsAttr>().getValues<int8_t>()[pos]; in mlirDenseElementsAttrGetInt8Value()
560 uint8_t mlirDenseElementsAttrGetUInt8Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetUInt8Value() argument
561 return unwrap(attr).cast<DenseElementsAttr>().getValues<uint8_t>()[pos]; in mlirDenseElementsAttrGetUInt8Value()
563 int16_t mlirDenseElementsAttrGetInt16Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetInt16Value() argument
564 return unwrap(attr).cast<DenseElementsAttr>().getValues<int16_t>()[pos]; in mlirDenseElementsAttrGetInt16Value()
566 uint16_t mlirDenseElementsAttrGetUInt16Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetUInt16Value() argument
567 return unwrap(attr).cast<DenseElementsAttr>().getValues<uint16_t>()[pos]; in mlirDenseElementsAttrGetUInt16Value()
569 int32_t mlirDenseElementsAttrGetInt32Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetInt32Value() argument
570 return unwrap(attr).cast<DenseElementsAttr>().getValues<int32_t>()[pos]; in mlirDenseElementsAttrGetInt32Value()
572 uint32_t mlirDenseElementsAttrGetUInt32Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetUInt32Value() argument
573 return unwrap(attr).cast<DenseElementsAttr>().getValues<uint32_t>()[pos]; in mlirDenseElementsAttrGetUInt32Value()
575 int64_t mlirDenseElementsAttrGetInt64Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetInt64Value() argument
576 return unwrap(attr).cast<DenseElementsAttr>().getValues<int64_t>()[pos]; in mlirDenseElementsAttrGetInt64Value()
578 uint64_t mlirDenseElementsAttrGetUInt64Value(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetUInt64Value() argument
579 return unwrap(attr).cast<DenseElementsAttr>().getValues<uint64_t>()[pos]; in mlirDenseElementsAttrGetUInt64Value()
581 float mlirDenseElementsAttrGetFloatValue(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetFloatValue() argument
582 return unwrap(attr).cast<DenseElementsAttr>().getValues<float>()[pos]; in mlirDenseElementsAttrGetFloatValue()
584 double mlirDenseElementsAttrGetDoubleValue(MlirAttribute attr, intptr_t pos) { in mlirDenseElementsAttrGetDoubleValue() argument
585 return unwrap(attr).cast<DenseElementsAttr>().getValues<double>()[pos]; in mlirDenseElementsAttrGetDoubleValue()
587 MlirStringRef mlirDenseElementsAttrGetStringValue(MlirAttribute attr, in mlirDenseElementsAttrGetStringValue() argument
590 unwrap(attr).cast<DenseElementsAttr>().getValues<StringRef>()[pos]); in mlirDenseElementsAttrGetStringValue()
596 const void *mlirDenseElementsAttrGetRawData(MlirAttribute attr) { in mlirDenseElementsAttrGetRawData() argument
598 unwrap(attr).cast<DenseElementsAttr>().getRawData().data()); in mlirDenseElementsAttrGetRawData()
605 bool mlirAttributeIsAOpaqueElements(MlirAttribute attr) { in mlirAttributeIsAOpaqueElements() argument
606 return unwrap(attr).isa<OpaqueElementsAttr>(); in mlirAttributeIsAOpaqueElements()
613 bool mlirAttributeIsASparseElements(MlirAttribute attr) { in mlirAttributeIsASparseElements() argument
614 return unwrap(attr).isa<SparseElementsAttr>(); in mlirAttributeIsASparseElements()
626 MlirAttribute mlirSparseElementsAttrGetIndices(MlirAttribute attr) { in mlirSparseElementsAttrGetIndices() argument
627 return wrap(unwrap(attr).cast<SparseElementsAttr>().getIndices()); in mlirSparseElementsAttrGetIndices()
630 MlirAttribute mlirSparseElementsAttrGetValues(MlirAttribute attr) { in mlirSparseElementsAttrGetValues() argument
631 return wrap(unwrap(attr).cast<SparseElementsAttr>().getValues()); in mlirSparseElementsAttrGetValues()