Skip to content

Commit 7023730

Browse files
Rabab53jpsamaroo
andcommitted
DArray: Add type wrapper helpers
Co-authored-by: Julian P Samaroo <[email protected]>
1 parent 10e1307 commit 7023730

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/array/darray.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ mutable struct DArray{T,N,B<:AbstractBlocks{N},F} <: ArrayOp{T, N}
143143
end
144144
end
145145

146+
WrappedDArray{T,N} = Union{<:DArray{T,N}, Transpose{<:DArray{T,N}}, Adjoint{<:DArray{T,N}}}
147+
WrappedDMatrix{T} = WrappedDArray{T,2}
148+
WrappedDVector{T} = WrappedDArray{T,1}
149+
DMatrix{T} = DArray{T,2}
150+
DVector{T} = DArray{T,1}
151+
152+
146153
# mainly for backwards-compatibility
147154
DArray{T, N}(domain, subdomains, chunks, partitioning, concat=cat) where {T,N} =
148155
DArray(T, domain, subdomains, chunks, partitioning, concat)

0 commit comments

Comments
 (0)