mpi_array.indexing.IndexingExtent

class mpi_array.indexing.IndexingExtent(slice=None, start=None, stop=None, struct=None)[source]

Bases: object

Methods

__init__([slice, start, stop, struct]) Construct, must specify either slice or both of start and stop.
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)
split(a, index) Split this extent into two extents by cutting along axis a at index index.
to_slice() Returns “tuple of slice” equivalent of this indexing extent.
to_tuple() Convert this instance to a tuple which can be passed to constructor (or used as a dict key).

Attributes

START
START_STR
STOP
STOP_STR Indexing bounds for a single tile of domain decomposition.
ndim Dimension of indexing.
shape Sequence of int indicating the shape of this extent (including halo).
start Sequence of int indicating the per-axis start indices of this extent (including halo).
stop Sequence of int indicating the per-axis stop indices of this extent (including halo).
struct_dtype_dict