Skip to content

SharedArray does not support undef constructors #27388

Open
@dlfivefifty

Description

@dlfivefifty
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-alpha.20 (2018-06-02 06:26 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit c8ce43ad17 (0 days old master)
|__/                   |  x86_64-apple-darwin17.5.0

julia> using SharedArrays

julia> A = SharedArray{Int,1}(undef,10)
ERROR: MethodError: no method matching SharedArray{Int64,1}(::UndefInitializer, ::Int64)
Closest candidates are:
  SharedArray{Int64,1}(::Any, ::Any, ::Any, ::Any, ::Any) where {T, N} at /Users/solver/Projects/julia7/usr/share/julia/stdlib/v0.7/SharedArrays/src/SharedArrays.jl:46
  SharedArray{Int64,1}(::Integer...; kwargs...) where {T, N} at /Users/solver/Projects/julia7/usr/share/julia/stdlib/v0.7/SharedArrays/src/SharedArrays.jl:163
  SharedArray{Int64,1}(::Any) where T<:AbstractArray at abstractarray.jl:22

julia> A = SharedArray{Int,1}(10)
10-element SharedArray{Int64,1}:
 0
 0
 0
 0
 0
 0
 0
 0
 0
 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    parallelismParallel or distributed computation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions