Skip to content

Commit 4effaf9

Browse files
committed
format 2
1 parent 17d67f8 commit 4effaf9

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/mlir/IR/Attribute.jl

+13-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Returns an empty attribute.
1515
"""
1616
Attribute() = Attribute(API.mlirAttributeGetNull())
1717

18-
1918
"""
2019
parse(::Core.Type{Attribute}, str; context=context())
2120
@@ -45,7 +44,6 @@ Gets the type of this attribute.
4544
"""
4645
type(attr::AbstractAttribute) = Type(API.mlirAttributeGetType(Attribute(attr))) #TODO: remove Attribute here
4746

48-
4947
"""
5048
typeid(attribute)
5149
@@ -434,7 +432,7 @@ isdensefloatelements(attr::Attribute) = API.mlirAttributeIsADenseFPElements(attr
434432

435433
abstract type AbstractDenseElementsAttribute{T} <: AbstractAttribute end
436434

437-
DenseAttribute{T} = Union{Vector{T}, AbstractDenseElementsAttribute{T}}
435+
DenseAttribute{T} = Union{Vector{T},AbstractDenseElementsAttribute{T}}
438436

439437
struct DenseElementsAttribute{T} <: AbstractDenseElementsAttribute{T}
440438
attr::API.MlirAttribute
@@ -515,7 +513,9 @@ end
515513

516514
function Base.fill(value::UInt32, shaped_type::Type)
517515
@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+
)
519519
end
520520

521521
function Base.fill(value::Int32, shaped_type::Type)
@@ -525,7 +525,9 @@ end
525525

526526
function Base.fill(value::UInt64, shaped_type::Type)
527527
@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+
)
529531
end
530532

531533
function Base.fill(value::Int64, shaped_type::Type)
@@ -535,12 +537,16 @@ end
535537

536538
function Base.fill(value::Float32, shaped_type::Type)
537539
@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+
)
539543
end
540544

541545
function Base.fill(value::Float64, shaped_type::Type)
542546
@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+
)
544550
end
545551

546552
function Base.fill(::Core.Type{Attribute}, value, shape)

0 commit comments

Comments
 (0)