-
#include "tensorstore/index_space/index_domain.h"
-
Result<IndexDomain<>>
tensorstore::MergeIndexDomains(IndexDomainView<> a,
IndexDomainView<> b); Merges two index domains.
If both
a
andb
are null, returns a null index domain.If exactly one of
a
andb
is non-null, returns the non-null domain.Otherwise,
a
andb
must be compatible:For all dimension
i
for which!a.labels()[i].empty() && !b.labels()[i].empty()
,a.labels[i] == b.labels[i]
.For each lower/upper bound of each dimension
i
, eithera
andb
have the same bound (including implicit bit), or at least one of the bounds is implicit and infinite.
In the merged domain, non-empty labels take precedence, and explicit/finite bounds take precedence over implicit/infinite bounds.