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_extentand {src_extent}. Any regions ofdst_extentwhich do not intersect withsrc_extentare returned as alistof left-overtype(dst_extent)elements. The regions ofdst_extentwhich do intersect withsrc_extentare returned as alistof update elements. The update elements are created with a call to the factory objectupdate_factory:update_factory(dst_extent, src_extent, intersection)
Returns
tuplepair(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_extentis include when calculating the intersection withsrc_extent.
Return type: Returns: Returns
tuplepair of(leftovers, updates).- dst_extent (