Skip to content

Commit 3725046

Browse files
committed
Merge pull request #77 from enthought/feature/constrain-dimdata-along-an-axis
Constrain dimdata along an axis
2 parents 523340a + 8f4c657 commit 3725046

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

protocol.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ The remaining key-value pairs in each dimension dictionary depend on the
371371
General constraints
372372
```````````````````
373373

374+
Empty local buffers
375+
~~~~~~~~~~~~~~~~~~~
374376
It shall be possible for one or more local array sections to contain no data.
375377
This is supported by the protocol and is not an invalid state. These
376378
situations may arise when downsampling or slicing a distributed array.
@@ -383,6 +385,8 @@ The following properties of a dimension dictionary imply an empty local buffer:
383385
* With the ``'b'`` ``dist_type``: ``start == size`` (this also implies that ``start == stop``)
384386
* With the ``'u'`` ``dist_type``: ``len(indices) == 0``
385387

388+
Global array size
389+
~~~~~~~~~~~~~~~~~
386390
The global number of elements in an array is the product of the ``size``\s of
387391
the dimension dictionaries, or 1 if the ``dim_data`` sequence is empty. In
388392
Python syntax, this would be ``reduce(operator.mul, global_shape, 1)`` where
@@ -391,6 +395,17 @@ is the ``size`` of the dimension dictionary for dimension ``i``. If
391395
``global_shape`` is an empty sequence, the result of the reduction above is
392396
``1``, indicating the distributed array is a zero-dimensional scalar.
393397

398+
Identical ``dim_data`` along an axis
399+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400+
If ``dim_data`` is the tuple of dimension dictionaries for a process and ``rank
401+
= dim_data[i]['proc_grid_rank']`` for some dimension ``i``, then all processes
402+
with the same ``rank`` for dimension ``i`` must have the same values for other
403+
keys in their respective dimension dictionaries. Essentially, this says that
404+
dimension dictionary ``dim_data[i]`` is identical for all processes that have
405+
the same value for ``dim_data[i]['proc_grid_rank']``. The only possible
406+
exception to this is the ``padding`` tuple, which may have different values on
407+
edge processes due to boundary padding.
408+
394409

395410
Examples
396411
-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)