mpi_array.indexing.calc_intersection_split¶
-
mpi_array.indexing.
calc_intersection_split
(dst_extent, src_extent, update_factory, update_dst_halo)[source]¶ Calculates intersection between
dst_extent
and {src_extent}. Any regions ofdst_extent
which do not intersect withsrc_extent
are returned as alist
of left-overtype(dst_extent)
elements. The regions ofdst_extent
which do intersect withsrc_extent
are returned as alist
of update elements. The update elements are created with a call to the factory objectupdate_factory
:update_factory(dst_extent, src_extent, intersection)
Returns
tuple
pair(leftovers, updates)
.Parameters: - dst_extent (
HaloIndexingExtent
) – Extent which is to receive update from intersection withsrc_extent
. - src_extent (
HaloIndexingExtent
) – Extent which is to provide update for the intersecting region ofdst_extent
. - update_factory (callable
object
) – Object called to create instances ofmpi_array.decomposition.PairUpdateExtent
. - update_dst_halo (
bool
) – If true, then the halo ofdst_extent
is include when calculating the intersection withsrc_extent
.
Return type: Returns: Returns
tuple
pair of(leftovers, updates)
.- dst_extent (