Skip to content

Commit

Permalink
Add getComm method to Distributors
Browse files Browse the repository at this point in the history
Additionally, there is a minor documentation correction for the 
`Distributor` interface
  • Loading branch information
neil-lindquist committed Apr 8, 2019
1 parent 66f5405 commit 0950d4d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/Distributor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ in for the subtype:
createFromSends(dist::DistributorImpl,exportPIDs::AbstractArray{PID})::Integer where PID <:Integer
Sets up the Distributor object using a list of process IDs to which we
export and the number of IDs being exported. Returns the number of
IDs this processor will be receiving.
export. Returns the number of IDs this processor will be receiving.
createFromRecvs(dist::DistributorImpl, remoteGIDs::AbstractArray{GID}, remotePIDs::AbstractArray{PID})::Tuple{AbstractArray{GID}, AbstractArray{PID}} where GID <: Integer where PID <: Integer
Sets up the Distributor object using a list of remote global IDs and corresponding
Expand Down Expand Up @@ -72,7 +71,7 @@ objects set to this processor
"""
function resolve(dist::Distributor, exportObjs::AbstractArray{T})::AbstractArray{T} where T
resolvePosts(dist, exportObjs)
resolveWaits(dist)
resolveWaits(dist)::AbstractArray{T}
end

"""
Expand Down
5 changes: 5 additions & 0 deletions src/MPIDistributor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ function createReverseDistributor(dist::MPIDistributor{GID, PID, LID}
end



#### General Interface ####

getComm(dist::MPIDistributor) = dist.comm

#### Distributor interface ####

function createFromSends(dist::MPIDistributor{GID, PID, LID}, exportPIDs::AbstractArray{PID, 1})::Integer where GID <:Integer where PID <:Integer where LID <:Integer
Expand Down
2 changes: 0 additions & 2 deletions src/RowMatrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ Additionally, Julia's `mul!` and `*` functions are implemented for `RowMatrix`-`
abstract type RowMatrix{Data <: Number, GID <: Integer, PID <: Integer, LID <: Integer} <: AbstractArray{Data, 2}
end

#REVIEW look into requiring A_mul_B! instead and having apply! call that

isFillActive(matrix::RowMatrix) = !isFillComplete(matrix)
isLocallyIndexed(matrix::RowMatrix) = !isGloballyIndexed(matrix)

Expand Down
2 changes: 2 additions & 0 deletions src/SerialComm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,5 @@ end
function createDistributor(comm::SerialComm{GID, PID, LID})::SerialDistributor{GID, PID, LID} where GID <: Integer where PID <: Integer where LID <: Integer
SerialDistributor{GID, PID, LID}()
end

getComm(::SerialDistributor{GID, PID, LID}) where {GID, PID, LID} = SerialComm{GID, PID, LID}()

0 comments on commit 0950d4d

Please sign in to comment.