File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -564,6 +564,14 @@ function DenseElementsAttribute(values::AbstractArray{Float16})
564
564
)
565
565
end
566
566
567
+ function DenseElementsAttribute (values:: AbstractArray{<:Complex} )
568
+ shaped_type = TensorType (size (values), Type (eltype (values)))
569
+ # TODO : row major
570
+ Attribute (
571
+ API. mlirDenseElementsAttrRawBufferGet (shaped_type, length (values) * sizeof (eltype (values)), values)
572
+ )
573
+ end
574
+
567
575
"""
568
576
DenseElementsAttribute(array::AbstractArray{String})
569
577
Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ Creates a signless integer type of the given bitwidth in the context. The type i
85
85
Type (T:: Core.Type{<:Integer} ; context:: Context = context ()) =
86
86
Type (API. mlirIntegerTypeGet (context, sizeof (T) * 8 ))
87
87
88
+ """
89
+ Type(T::Core.Type{<:Complex}; context=context())
90
+
91
+ Creates a complex type with the given element type.
92
+ """
93
+ Type (:: Core.Type{Complex{T}} ; context= context ()) where {T} = Type (API. mlirComplexTypeGet (Type (T)))
94
+
88
95
"""
89
96
Type(T::Core.Type{<:Signed}; context=context()
90
97
You can’t perform that action at this time.
0 commit comments