While writing a distributed program, one might need to know the index set that a certain locale owns in a given distributed array. This README describes the initial support for this functionality.
For code examples using these features, see the
proc array.hasSingleLocalSubdomain() : bool;
This is a param function which returns a boolean. If true, then the index set owned by a locale can be represented by a single domain.
This function always returns
true for non-distributed arrays.
To support this function on a custom distributed array type, write a param function named 'dsiHasSingleLocalSubdomain'.
proc array.localSubdomain() : domain;
This function only operates on arrays whose 'hasSingleLocalSubdomain()' result is true. Otherwise, a compiler error is thrown.
This function returns a single domain that represents the index set owned by the current locale. This returned domain cannot be used to modify the index set owned by the locale.
For non-distributed arrays, this function returns a copy of that array's domain.
To support this function on a custom distributed array type, write a function named 'dsiLocalSubdomain'.
iter array.localSubdomains() : domain;
This iterator yields the subdomain(s) that represent the index set owned by the current locale.
If the locale's index set can be represented by a single domain, then the
localSubdomain is yielded.
Currently, this is a serial iterator.
To support this iterator on a custom distributed array type, write an iterator named 'dsiLocalSubdomains'.
Any functions in this section are only supported on distributed array types. Calling them on a non-distributed array will result in a compiler error.