Concepts#
remote_iterator#
-
template<typename I>
concept remote_iterator#
Defined in concepts.hpp
template <typename I>
concept remote_iterator =
std::forward_iterator<I> && requires(I &iter) { dr::ranges::rank(iter); };
Requirements#
Ifulfillsstd::forward_iteratorihas a methodrankreturning the rank on which the memoryireferences is located.
remote_range#
-
template<typename R>
concept remote_range#
Defined in concepts.hpp
template <typename R>
concept remote_range =
rng::forward_range<R> && requires(R &r) { dr::ranges::rank(r); };
Requirements#
Rfulfillsrng::forward_rangerhas a methodrankreturning the rank on which the memoryrreferences is located.
distributed_range#
-
template<typename R>
concept distributed_range#
Defined in concepts.hpp
template <typename R>
concept distributed_range =
rng::forward_range<R> && requires(R &r) { dr::ranges::segments(r); };
Requirements#
Rfulfillsrng::forward_rangerhas a methodsegments
remote_contiguous_iterator#
-
template<typename I>
concept remote_contiguous_iterator#
A remote contiguous iterator acts as a pointer to some contiguous piece of remote memory.
Defined in concepts.hpp
template <typename I>
concept remote_contiguous_iterator = std::random_access_iterator<I> &&
requires(I i) {
{ i.rank() } -> std::convertible_to<std::size_t>;
{ i.local() } -> std::contiguous_iterator;
};
Requirements#
An object i of type I fulfills remote_contiguous_iterator
if and only if:
Ifulfillsstd::random_access_iteratorihas a methodrankreturning the rank on which the memoryireferences is located.ihas a methodlocalreturning an objectlwhose type fulfillsstd::contiguous_iterator. Dereferencinglis well-defined if the current rank is equali.rank().
Remarks#
Instantiations of remote_ptr, device_ptr, and BCL::GlobalPtr should all
fulfill remote_contiguous_iterator.
remote_contiguous_range#
-
template<typename R>
concept remote_contiguous_range#
A remote contiguous range is a range located in a contiguous piece of remote memory.
Defined in concepts.hpp
template <typename T>
concept remote_contiguous_range = std::ranges::random_access_range<T> &&
remote_contiguous_iterator<std::ranges::iterator_t<T>> && requires(T t) {
{ t.rank() } -> std::convertible_to<std::size_t>;
};
Requirements#
An object t of type T fulfills remote_contiguous_range if and only
if:
Tfulfillsstd::ranges::random_access_range.T’s iterator type fulfillsremote_contiguous_iterator.thas a methodrankreturning the rank on which the range is located. For all iteratorsitert.rank() == t.begin().rank().
Remarks#
All of the iterators in [begin(), end()) should be contiguous iterators
with the same rank, and [begin().local(), end().local()) should form a
contiguous range referencing the same memory, but locally. Not quite sure how
to express that concisely.
distributed_contiguous_range#
-
template<typename R>
concept distributed_contiguous_range#
A distributed contiguous range is a range consisting of multiple segments distributed over multiple processes, where each each segment is a remote contiguous range.
Defined in concepts.hpp
template <typename T>
concept distributed_contiguous_range = std::ranges::random_access_range<T> &&
requires(T t) {
{ t.segments() } -> std::ranges::random_access_range;
{
std::declval<std::ranges::range_value_t<decltype(t.segments())>>()
} -> remote_contiguous_range;
};
Requirements#
An object t of type T fulfills distributed_contiguous_range if and
only if:
Tfulfills std::ranges::random_access_rangethas a methodsegmentssuch that thet.segments()returns anstd::ranges::random_access_rangewhere each element is aremote_contiguous_range.
Remarks#
Should there be other requirements, other than segments? Perhaps a
distribution method to return an implementation-defined type describing the
distribution?