E.V.E
v2023.02.15
Loading...
Searching...
No Matches

Detailed Description

Concepts a range or an iterator satisfies to enter an algorithm, and the types that model them.

An algorithm accepts a relaxed_range: a begin and an end over contiguous memory, a std::vector, a std::span, an array, a view of this module, or two pointers through eve::algo::as_range. The relaxed concepts widen the standard ones to what SIMD needs: an aligned pointer or an eve::algo::iterator as iterator, and a relaxed_sentinel_for that need not be an iterator of the same type.

Classes

struct  eve::algo::nothing_t
 a type to indicate that there is nothing there More...
struct  relaxed_iterator
 anything that can be reasonably converted to an iterator: std::contigious_iterator, eve::algo::iterator, aligned_ptr. Defined as being totally_ordered, having +/- like an iterator And preprocess_range(eve::algo::traits{}, I, I) should work. eve::unalign(I) should be OK. More...
struct  relaxed_sentinel_for
 Two relaxed iterators form a valid relaxed range pair. preprocess_range has to be defined for the pair. Example: int const* is a relaxed_sentinel_for aligned_ptr<int const>. More...
struct  relaxed_range
 Any class that has begin/end and end is a relaxed_sentinel_for begin. User can customize preprocess_range for a relaxed_range in case there is more information to get from there then would be from just begin/end. More...
struct  eve::algo::ptr_iterator< Ptr, Cardinal >
 An eve iterator on top of pointer or aligned pointer. More...
struct  eve::algo::range_ref_wrapper< Rng >
 a non_owning_range wrapper around owning range. Should be created via range_ref More...
struct  map_load_op
 requirement for the operation applied on read/load in map. should work on both scalar and wide for the underlying iterator for any cardinal. More...
struct  map_store_op
 requirement for the operation applied on store in map. should work on both scalar and wide for the underlying iterator for any cardinal. More...

Concepts

concept  eve::algo::non_owning_range
 a non_owning range is a relaxed_range that does not own it's elements and can be copied without it's contents being affected TODO: FIX-#1017: how is this related to std::borrowed_range?

Typedefs

template<typename R>
using eve::algo::iterator_t = decltype(std::declval<R>().begin())
 Iterator for a relaxed range.
template<typename R>
using eve::algo::sentinel_t = decltype(std::declval<R>().end())
 Sentinel for a relaxed range.
template<typename R>
using eve::algo::unaligned_iterator_t = unaligned_t<iterator_t<R>>
 Unaligned iterator for a relaxed range.

Variables

constexpr range_ref_ eve::algo::range_ref
 for a non_owning_range returns it, otherwise returns a range_ref_wrapper.

Typedef Documentation

◆ iterator_t

template<typename R>
using eve::algo::iterator_t = decltype(std::declval<R>().begin())

Iterator for a relaxed range.

Template Parameters
R- relaxed range to process

Required header: #include <eve/module/algo/algo/concepts.hpp>

template <relaxed_range R>
using iterator_t = decltype(std::declval<R>().begin());
decltype(std::declval< R >().begin()) iterator_t
Iterator for a relaxed range.
Definition ranges_types.hpp:34

◆ sentinel_t

template<typename R>
using eve::algo::sentinel_t = decltype(std::declval<R>().end())

Sentinel for a relaxed range.

Template Parameters
R- relaxed range to process

Required header: #include <eve/module/algo/algo/concepts.hpp>

template <relaxed_range R>
using sentinel_t = decltype(std::declval<R>().end());
decltype(std::declval< R >().end()) sentinel_t
Sentinel for a relaxed range.
Definition ranges_types.hpp:50

◆ unaligned_iterator_t

template<typename R>
using eve::algo::unaligned_iterator_t = unaligned_t<iterator_t<R>>

Unaligned iterator for a relaxed range.

Template Parameters
R- relaxed range to process

an iterator that can represent every position in the range

Required header: #include <eve/module/algo/algo/concepts.hpp>

template <typename R>
unaligned_t< iterator_t< R > > unaligned_iterator_t
Unaligned iterator for a relaxed range.
Definition ranges_types.hpp:68
decltype(unalign(std::declval< T >())) unaligned_t
Compute the unaligned pointer type associated to a given type.
Definition unalign.hpp:113

Variable Documentation

◆ range_ref

range_ref_ eve::algo::range_ref
inlineconstexpr

for a non_owning_range returns it, otherwise returns a range_ref_wrapper.

Required header: #include <eve/module/algo/algo/range_ref.hpp>