E.V.E  0.1-beta

Shuffling pattern. More...

Detailed Description

template<std::ptrdiff_t... I>
struct eve::pattern_t< I >

Shuffling pattern.

Holds the index describing a compile-time shuffling pattern.

Template Parameters
IIndex of the shuffling pattern

Static Public Member Functions

static constexpr auto size () noexcept
 Size of the pattern in number of indices.
 
static constexpr bool has_zeros () noexcept
 Checks if a pattern contains any zeroing index.
 
static constexpr bool validate (std::ptrdiff_t N) noexcept
 Ensure that a pattern don't try to reference non-existent lanes.
 

Public Member Functions

constexpr std::ptrdiff_t operator() (std::ptrdiff_t i, int) const noexcept
 Returns the index to use for accessing the ith element of a shuffled eve::wide.
 
constexpr bool strictly_over (std::ptrdiff_t n) const noexcept
 Checks if all non zeroing-indexes in a pattern are greater than a given index.
 
constexpr bool strictly_under (std::ptrdiff_t n) const noexcept
 Checks if all non zeroing-indexes in a pattern are leser than a given index.
 
constexpr bool over (std::ptrdiff_t n) const noexcept
 Checks if all non zeroing-indexes in a pattern are strictly greater or equal than a given index.
 
constexpr bool under (std::ptrdiff_t n) const noexcept
 Checks if all non zeroing-indexes in a pattern are strictly lesser or equal than a given index.
 
template<std::ptrdiff_t... J>
constexpr bool operator== (pattern_t< J... >) const noexcept
 Checks equality with another pattern.
 
template<std::ptrdiff_t... J>
constexpr bool operator!= (pattern_t< J... >) const noexcept
 Checks inequality with another pattern.
 

Friends

std::ostream & operator<< (std::ostream &os, pattern_t const &)
 Stream insertion operator for shuffling pattern.
 

Related Functions

(Note that these are not member functions.)

template<std::ptrdiff_t Sz, typename F >
constexpr auto fix_pattern (F)
 Converts a formula pattern to index pattern.
 
template<std::ptrdiff_t N, shuffle_pattern Pattern>
constexpr auto pattern_clamp (Pattern const &) noexcept
 Clamp a pattern to a given size.
 
template<std::ptrdiff_t B, std::ptrdiff_t E, std::ptrdiff_t N, shuffle_pattern Pattern>
constexpr auto pattern_view (Pattern const &) noexcept
 Extract a sub-pattern of an existing pattern. More...
 
template<std::ptrdiff_t O, std::ptrdiff_t N, shuffle_pattern Pattern>
constexpr auto slide_pattern (Pattern) noexcept