Skip to content

Commit

Permalink
Merge pull request #24776 from Sacha0/reparrdist
Browse files Browse the repository at this point in the history
replace Array(shape...)-like calls in base/distributed/*
  • Loading branch information
Sacha0 committed Nov 26, 2017
2 parents 1c60e20 + dcf4f54 commit cc13293
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions base/distributed/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ end

additional_io_objs=Dict()
function launch_additional(np::Integer, cmd::Cmd)
io_objs = Vector{Any}(np)
addresses = Vector{Any}(np)
io_objs = Vector{Any}(uninitialized, np)
addresses = Vector{Any}(uninitialized, np)

for i in 1:np
io = open(detach(cmd), "r+")
Expand Down
2 changes: 1 addition & 1 deletion base/distributed/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function splitrange(N::Int, np::Int)
each = div(N,np)
extras = rem(N,np)
nchunks = each > 0 ? np : extras
chunks = Vector{UnitRange{Int}}(nchunks)
chunks = Vector{UnitRange{Int}}(uninitialized, nchunks)
lo = 1
for i in 1:nchunks
hi = lo + each - 1
Expand Down
2 changes: 1 addition & 1 deletion base/distributed/managers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ end
function launch(manager::SSHManager, params::Dict, launched::Array, launch_ntfy::Condition)
# Launch one worker on each unique host in parallel. Additional workers are launched later.
# Wait for all launches to complete.
launch_tasks = Vector{Any}(length(manager.machines))
launch_tasks = Vector{Any}(uninitialized, length(manager.machines))

for (i,(machine, cnt)) in enumerate(manager.machines)
let machine=machine, cnt=cnt
Expand Down
2 changes: 1 addition & 1 deletion base/distributed/pmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ julia> collect(c)
```
"""
function head_and_tail(c, n)
head = Vector{eltype(c)}(n)
head = Vector{eltype(c)}(uninitialized, n)
s = start(c)
i = 0
while i < n && !done(c, s)
Expand Down

0 comments on commit cc13293

Please sign in to comment.