@@ -15,7 +15,6 @@ Returns an empty attribute.
15
15
"""
16
16
Attribute () = Attribute (API. mlirAttributeGetNull ())
17
17
18
-
19
18
"""
20
19
parse(::Core.Type{Attribute}, str; context=context())
21
20
@@ -45,7 +44,6 @@ Gets the type of this attribute.
45
44
"""
46
45
type (attr:: AbstractAttribute ) = Type (API. mlirAttributeGetType (Attribute (attr))) # TODO : remove Attribute here
47
46
48
-
49
47
"""
50
48
typeid(attribute)
51
49
@@ -434,7 +432,7 @@ isdensefloatelements(attr::Attribute) = API.mlirAttributeIsADenseFPElements(attr
434
432
435
433
abstract type AbstractDenseElementsAttribute{T} <: AbstractAttribute end
436
434
437
- DenseAttribute{T} = Union{Vector{T}, AbstractDenseElementsAttribute{T}}
435
+ DenseAttribute{T} = Union{Vector{T},AbstractDenseElementsAttribute{T}}
438
436
439
437
struct DenseElementsAttribute{T} <: AbstractDenseElementsAttribute{T}
440
438
attr:: API.MlirAttribute
515
513
516
514
function Base. fill (value:: UInt32 , shaped_type:: Type )
517
515
@assert isshaped (shaped_type) " type $(shaped_type) is not a shaped type"
518
- return SplatAttribute {UInt32} (API. mlirDenseElementsAttrUInt32SplatGet (shaped_type, value))
516
+ return SplatAttribute {UInt32} (
517
+ API. mlirDenseElementsAttrUInt32SplatGet (shaped_type, value)
518
+ )
519
519
end
520
520
521
521
function Base. fill (value:: Int32 , shaped_type:: Type )
525
525
526
526
function Base. fill (value:: UInt64 , shaped_type:: Type )
527
527
@assert isshaped (shaped_type) " type $(shaped_type) is not a shaped type"
528
- return SplatAttribute {UInt64} (API. mlirDenseElementsAttrUInt64SplatGet (shaped_type, value))
528
+ return SplatAttribute {UInt64} (
529
+ API. mlirDenseElementsAttrUInt64SplatGet (shaped_type, value)
530
+ )
529
531
end
530
532
531
533
function Base. fill (value:: Int64 , shaped_type:: Type )
@@ -535,12 +537,16 @@ end
535
537
536
538
function Base. fill (value:: Float32 , shaped_type:: Type )
537
539
@assert isshaped (shaped_type) " type $(shaped_type) is not a shaped type"
538
- return SplatAttribute {Float32} (API. mlirDenseElementsAttrFloatSplatGet (shaped_type, value))
540
+ return SplatAttribute {Float32} (
541
+ API. mlirDenseElementsAttrFloatSplatGet (shaped_type, value)
542
+ )
539
543
end
540
544
541
545
function Base. fill (value:: Float64 , shaped_type:: Type )
542
546
@assert isshaped (shaped_type) " type $(shaped_type) is not a shaped type"
543
- return SplatAttribute {Float64} (API. mlirDenseElementsAttrDoubleSplatGet (shaped_type, value))
547
+ return SplatAttribute {Float64} (
548
+ API. mlirDenseElementsAttrDoubleSplatGet (shaped_type, value)
549
+ )
544
550
end
545
551
546
552
function Base. fill (:: Core.Type{Attribute} , value, shape)
0 commit comments