|
369 | 369 |
|
370 | 370 | # shortcut to set/get localparts of a distributed object |
371 | 371 | Base.getindex(d::DArray, s::Symbol) = _getindex(d, s) |
372 | | -Base.getindex(d::DistributedArrays.DArray{<:Any, 1}, s::Symbol) = _getindex(d, s) |
| 372 | +Base.getindex(d::DArray{<:Any, 1}, s::Symbol) = _getindex(d, s) |
373 | 373 | function _getindex(d::DArray, s::Symbol) |
374 | 374 | @assert s in [:L, :l, :LP, :lp] |
375 | 375 | return localpart(d) |
@@ -440,14 +440,6 @@ function Base.:(==)(d1::SubDArray, d2::SubDArray) |
440 | 440 | return t |
441 | 441 | end |
442 | 442 |
|
443 | | -# Fix method ambiguities |
444 | | -for T in (:DArray, :SubDArray) |
445 | | - @eval begin |
446 | | - Base.:(==)(d1::$T{<:Any,1}, d2::SparseArrays.ReadOnly) = d1 == parent(d2) |
447 | | - Base.:(==)(d1::SparseArrays.ReadOnly, d2::$T{<:Any,1}) = parent(d1) == d2 |
448 | | - end |
449 | | -end |
450 | | - |
451 | 443 | """ |
452 | 444 | locate(d::DArray, I::Int...) |
453 | 445 |
|
@@ -664,9 +656,6 @@ function Base.getindex(d::DArray{<:Any,N}, i::Vararg{Int,N}) where {N} |
664 | 656 | _scalarindexingallowed() |
665 | 657 | return getindex_tuple(d, i) |
666 | 658 | end |
667 | | -function Base.getindex(d::DArray{<:Any,N}, I::Vararg{Any,N}) where {N} |
668 | | - return view(d, I...) |
669 | | -end |
670 | 659 | Base.getindex(d::DArray) = d[1] |
671 | 660 | Base.getindex(d::SubDArray, I::Int...) = invoke(getindex, Tuple{SubArray{<:Any,N},Vararg{Int,N}} where N, d, I...) |
672 | 661 | Base.getindex(d::SubOrDArray, I::Union{Int,UnitRange{Int},Colon,Vector{Int},StepRange{Int,Int}}...) = view(d, I...) |
@@ -697,15 +686,6 @@ function Base.copyto!(dest::SubOrDArray, src::AbstractArray) |
697 | 686 | return dest |
698 | 687 | end |
699 | 688 |
|
700 | | -# Fix method ambiguities |
701 | | -# TODO: Improve efficiency? |
702 | | -Base.copyto!(dest::SubOrDArray{<:Any,2}, src::SparseArrays.AbstractSparseMatrixCSC) = copyto!(dest, Matrix(src)) |
703 | | -@static if isdefined(SparseArrays, :CHOLMOD) |
704 | | - Base.copyto!(dest::SubOrDArray, src::SparseArrays.CHOLMOD.Dense) = copyto!(dest, Array(src)) |
705 | | - Base.copyto!(dest::SubOrDArray{T}, src::SparseArrays.CHOLMOD.Dense{T}) where {T<:Union{Float32,Float64,ComplexF32,ComplexF64}} = copyto!(dest, Array(src)) |
706 | | - Base.copyto!(dest::SubOrDArray{T,2}, src::SparseArrays.CHOLMOD.Dense{T}) where {T<:Union{Float32,Float64,ComplexF32,ComplexF64}} = copyto!(dest, Array(src)) |
707 | | -end |
708 | | - |
709 | 689 | function Base.deepcopy(src::DArray) |
710 | 690 | dest = similar(src) |
711 | 691 | @sync for p in procs(src) |
|
0 commit comments