@@ -516,9 +516,9 @@ function distribute(A::AbstractArray, DA::DArray)
516
516
return DArray (I-> localpart (s), DA)
517
517
end
518
518
519
- ( :: Type{ DArray{T,N,S}} ) (A:: S ) where {T,N,S<: AbstractArray } = distribute (convert (AbstractArray{T,N}, A))
519
+ DArray {T,N,S} (A:: S ) where {T,N,S<: AbstractArray } = distribute (convert (AbstractArray{T,N}, A))
520
520
521
- function ( :: Type{ Array{S,N}} ) (d:: DArray{T,N} ) where {S,T,N}
521
+ function Array {S,N} (d:: DArray{T,N} ) where {S,T,N}
522
522
a = Array {S} (undef, size (d))
523
523
@sync begin
524
524
for i = 1 : length (d. pids)
@@ -528,7 +528,7 @@ function (::Type{Array{S,N}})(d::DArray{T,N}) where {S,T,N}
528
528
return a
529
529
end
530
530
531
- function ( :: Type{ Array{S,N}} ) (s:: SubDArray{T,N} ) where {S,T,N}
531
+ function Array {S,N} (s:: SubDArray{T,N} ) where {S,T,N}
532
532
I = s. indices
533
533
d = s. parent
534
534
if isa (I,Tuple{Vararg{UnitRange{Int}}}) && S<: T && T<: S && ! isempty (s)
@@ -543,7 +543,7 @@ function (::Type{Array{S,N}})(s::SubDArray{T,N}) where {S,T,N}
543
543
return a
544
544
end
545
545
546
- function ( :: Type{ DArray} ) (SD:: SubArray{T,N} ) where {T,N}
546
+ function DArray (SD:: SubArray{T,N} ) where {T,N}
547
547
D = SD. parent
548
548
DArray (size (SD), procs (D)) do I
549
549
lindices = Base. reindex (SD, SD. indices, I)
0 commit comments