JuliaParallel / JuliaParallel/DistributedArrays.jl

Add gather(d::DArray{T,N,Array{T,N}}) where {T, N}

Open
#227 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
205
Forks
34
PR merge metrics
No merged PRs in 30d

Description

I am wondering why it is not possible to gather a DArray{T,N,Array{T,N}}?

I wrote this method to the gather function, it works for my purpose. Maybe it is possible to add it? (or maybe I did a mistake and it should be changed somehow?)
```
function gather(d::DArray{T,N,Array{T,N}}) where {T, N}
a=Array{T}(undef, size(d))
indices = collect.(d.indices)
@sync for (i,p) in enumerate(procs(d))
@async a[indices[i]...] = remotecall_fetch(localpart, p, d)
end
a
end
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.