mpi_array.distribution.CartLocaleExtent

class mpi_array.distribution.CartLocaleExtent(peer_rank=None, inter_locale_rank=None, cart_coord=None, cart_shape=None, globale_extent=None, slice=None, halo=None, start=None, stop=None, struct=None)[source]

Bases: mpi_array.distribution.LocaleExtent

Indexing extents for single tile of cartesian domain distribution.

Methods

__init__([peer_rank, inter_locale_rank, ...]) Construct.
calc_intersection(other) Returns the indexing extent which is the intersection of this extent with the other extent.
calc_intersection_split(other) Returns (leftovers, intersection) pair, where intersection is the IndexingExtent object (possibly None) indicating the intersection of this (self) extent with the other extent and leftovers is a list of IndexingExtent objects indicating regions of self which do not intersect with the other extent.
create_struct_dtype_from_ndim(ndim) Creates a numpy.dtype structure for holding start and stop indices.
create_struct_instance(ndim) Creates a struct instance with numpy.dtype self.struct_dtype_dict[ndim].
get_struct_dtype(ndim)
get_struct_dtype_from_ndim(ndim)
globale_to_locale_extent_h(gext) Return gext converted to locale index.
globale_to_locale_h(gidx) Convert globale array index to locale array index.
globale_to_locale_n(gidx) Convert globale array index to locale array index.
globale_to_locale_slice_h(gslice) Return gslice converted to locale slice.
globale_to_locale_slice_n(gslice) Return gslice converted to locale slice.
halo_slab_extent(axis, dir) Returns indexing extent of the halo slab for specified axis.
locale_to_globale_extent_h(lext) Return lext converted to globale index.
locale_to_globale_h(lidx) Convert locale array index to globale array index.
locale_to_globale_n(lidx) Convert locale array index to globale array index.
locale_to_globale_slice_h(lslice) Return lslice converted to globale slice.
locale_to_globale_slice_n(lslice) Return lslice converted to globale slice.
no_halo_extent(axis) Returns the indexing extent identical to this extent, except has the halo trimmed from the axis specified by axis.
split(a, index) Split this extent into two extents by cutting along axis a at index index.
to_slice() Same as to_slice_n().
to_slice_h() Returns “tuple of slice” equivalent of this indexing extent including halo.
to_slice_n() Returns “tuple of slice” equivalent of this indexing extent without halo (“no halo”).
to_tuple() Convert this instance to a tuple which can be passed to constructor (or used as a dict key).

Attributes

CART_COORD
CART_COORD_STR
CART_SHAPE
CART_SHAPE_STR
HALO
HALO_STR
HI
INTER_LOCALE_RANK
INTER_LOCALE_RANK_STR
LO
PEER_RANK
PEER_RANK_STR
START
START_N
START_N_STR
START_STR
STOP
STOP_N
STOP_N_STR
STOP_STR
cart_coord A tuple of int indicating the coordinate index (mpi4py.MPI.CartComm.Get_coordinate()) of this LocaleExtent in the cartesian domain distribution.
cart_rank An int indicating the rank of the process in the cart_comm cartesian communicator which corresponds to the {peer_rank} rank in the peer_comm communicator.
cart_shape A tuple of int indicating the number of LocaleExtent regions in each axis direction of the cartesian distribution.
halo A (len(self.start), 2) shaped array of int indicating the per-axis number of outer ghost elements.
inter_locale_rank An int indicating the rank of the process in the inter_locale_comm responsible for exchanging data to/from this extent.
ndim Dimension of indexing.
peer_rank An int indicating the rank of the process in the peer_comm communicator which corresponds to the inter_locale_rank in the inter_locale_comm communicator.
shape Same as shape_n.
shape_h The shape of the tile with “halo” elements.
shape_n The shape of the tile without “halo” elements (“no halo”).
size_h Integer indicating the number of elements in this extent including halo.
size_n Integer indicating the number of elements in this extent without halo (“no halo”)
start Same as start_n.
start_h The start index of the tile with “halo” elements.
start_n The start index of the tile without “halo” elements (“no halo”).
stop Same as stop_n.
stop_h The stop index of the tile with “halo” elements.
stop_n The stop index of the tile without “halo” elements (“no halo”).
struct_dtype_dict