JuliaParallel / JuliaParallel/DistributedArrays.jl
Add gather(d::DArray{T,N,Array{T,N}}) where {T, N}
- Langage dominant
- Julia
- Étoiles
- 205
- Forks
- 34
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start by locating the existing gather function and the DArray definition in DistributedArrays.jl, then compare current gather methods with the proposed DArray{T,N,Array{T,N}} signature. Verify the behavior with a distributed array whose local parts use Array storage; done means gather returns the expected Array with all distributed indices populated.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- julia
- Domaine
- distributed-systems
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100