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#
I
fulfillsstd::forward_iterator
i
has a methodrank
returning the rank on which the memoryi
references 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#
R
fulfillsrng::forward_range
r
has a methodrank
returning the rank on which the memoryr
references 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#
R
fulfillsrng::forward_range
r
has 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:
I
fulfillsstd::random_access_iterator
i
has a methodrank
returning the rank on which the memoryi
references is located.i
has a methodlocal
returning an objectl
whose type fulfillsstd::contiguous_iterator
. Dereferencingl
is 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:
T
fulfillsstd::ranges::random_access_range
.T
’s iterator type fulfillsremote_contiguous_iterator
.t
has a methodrank
returning the rank on which the range is located. For all iteratorsiter
t.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:
T
fulfills std::ranges::random_access_ranget
has a methodsegments
such that thet.segments()
returns anstd::ranges::random_access_range
where 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?