@@ -762,6 +762,13 @@ function Base.show(io::IO,k::MIME"text/plain",data::ExchangeGraph)
762762 println (io,typeof (data)," with $(length (data. snd)) nodes" )
763763end
764764
765+ """
766+ default_find_rcv_ids(::AbstractArray)
767+
768+ Provides a default function to find the `rcv` side of an
769+ `ExchangeGraph` out of the `snd` side information.
770+ Its behaviour can be statically changed using [`set_default_find_rcv_ids`](@ref).
771+ """
765772function default_find_rcv_ids (:: AbstractArray )
766773 find_rcv_ids_gather_scatter
767774end
@@ -779,10 +786,11 @@ are set to `snd`. Otherwise, either the optional `neighbors` or
779786`neighbors` is also an `ExchangeGraph`
780787that contains a super set of the outgoing and incoming neighbors
781788associated with `snd`. It is used to find the incoming neighbors `rcv`
782- efficiently. If `neighbors` are not provided, then `find_rcv_ids`
789+ efficiently. If `neighbors` are not provided, then `find_rcv_ids`
783790is used (either the user-provided or a default one).
784791`find_rcv_ids` is a function that implements an algorithm to find the
785- rcv side of the exchange graph out of the snd side information.
792+ rcv side of the exchange graph out of the snd side information. It
793+ defaults to [`default_find_rcv_ids`](@ref).
786794"""
787795function ExchangeGraph (snd;
788796 rcv= nothing ,
@@ -836,8 +844,14 @@ function ExchangeGraph_impl_with_find_rcv_ids(snd_ids::AbstractArray,find_rcv_id
836844 ExchangeGraph (snd_ids,rcv_ids)
837845end
838846
839- # This strategy gathers the communication graph into one process
840- # and then scatters back the receivers
847+ """
848+ find_rcv_ids_gather_scatter(snd_ids::AbstractArray)
849+
850+ Finds the `rcv` side of an `ExchangeGraph` out of the `snd` side information.
851+
852+ This strategy gathers the communication graph into one process
853+ and then scatters back the receivers.
854+ """
841855function find_rcv_ids_gather_scatter (snd_ids:: AbstractArray )
842856 snd_ids_main = gather (snd_ids)
843857 rcv_ids_main = map (snd_ids_main) do snd_ids_main
0 commit comments