HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.0
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
epu8_impl.hpp File Reference
#include <initializer_list>
#include <iostream>
#include <random>
#include <sstream>
#include "vect_generic.hpp"

Go to the source code of this file.

Classes

struct  std::equal_to< HPCombi::epu8 >
 
struct  std::not_equal_to< HPCombi::epu8 >
 
struct  std::hash< HPCombi::epu8 >
 
struct  std::less< HPCombi::epu8 >
 

Namespaces

namespace  HPCombi
 
namespace  std
 

Macros

#define FF   0xff
 

Functions

epu8 HPCombi::permuted_ref (epu8 a, epu8 b) noexcept
 Permuting a HPCombi::epu8.
 
uint64_t HPCombi::first_mask (epu8 msk, size_t bound)
 
uint64_t HPCombi::last_mask (epu8 msk, size_t bound)
 
uint64_t HPCombi::first_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept
 The first difference between two HPCombi::epu8.
 
uint64_t HPCombi::first_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept
 The first difference between two HPCombi::epu8.
 
uint64_t HPCombi::last_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept
 The last difference between two HPCombi::epu8.
 
uint64_t HPCombi::last_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept
 The last difference between two HPCombi::epu8.
 
bool HPCombi::less (epu8 a, epu8 b) noexcept
 Lexicographic comparison between two HPCombi::epu8.
 
int8_t HPCombi::less_partial (epu8 a, epu8 b, int k) noexcept
 Partial lexicographic comparison between two HPCombi::epu8.
 
uint64_t HPCombi::first_zero (epu8 v, int bnd) noexcept
 return the index of the first zero entry or 16 if there are none Only index smaller than bound are taken into account.
 
uint64_t HPCombi::last_zero (epu8 v, int bnd) noexcept
 return the index of the last zero entry or 16 if there are none Only index smaller than bound are taken into account.
 
uint64_t HPCombi::first_non_zero (epu8 v, int bnd) noexcept
 return the index of the first non zero entry or 16 if there are none Only index smaller than bound are taken into account.
 
uint64_t HPCombi::last_non_zero (epu8 v, int bnd) noexcept
 return the index of the last non zero entry or 16 if there are none Only index smaller than bound are taken into account.
 
template<bool Increasing = true, size_t sz>
epu8 HPCombi::network_sort (epu8 res, std::array< epu8, sz > rounds)
 Apply a sorting network.
 
template<bool Increasing = true, size_t sz>
epu8 HPCombi::network_sort_perm (epu8 &v, std::array< epu8, sz > rounds)
 Apply a sorting network in place and return the permutation.
 
bool HPCombi::is_sorted (epu8 a) noexcept
 Testing if a HPCombi::epu8 is sorted.
 
epu8 HPCombi::sorted (epu8 a) noexcept
 Return a sorted HPCombi::epu8.
 
epu8 HPCombi::sorted8 (epu8 a) noexcept
 Return a HPCombi::epu8 with the two half sorted.
 
epu8 HPCombi::revsorted (epu8 a) noexcept
 Return a reverse sorted HPCombi::epu8.
 
epu8 HPCombi::revsorted8 (epu8 a) noexcept
 Return a HPCombi::epu8 with the two half reverse sorted.
 
epu8 HPCombi::sort_perm (epu8 &a) noexcept
 Sort this and return the sorting permutation.
 
epu8 HPCombi::sort8_perm (epu8 &a) noexcept
 Sort this and return the sorting permutation.
 
void HPCombi::merge_rev (epu8 &a, epu8 &b) noexcept
 
void HPCombi::merge (epu8 &a, epu8 &b) noexcept
 Merge two sorted epu8.
 
epu8 HPCombi::random_epu8 (uint16_t bnd)
 A random HPCombi::epu8.
 
epu8 HPCombi::remove_dups (epu8 a, uint8_t repl=0) noexcept
 Remove duplicates in a sorted HPCombi::epu8.
 
epu8 HPCombi::permutation_of_ref (epu8 a, epu8 b) noexcept
 Find if a vector is a permutation of one other.
 
epu8 HPCombi::permutation_of (epu8 a, epu8 b) noexcept
 Find if a vector is a permutation of one other.
 
uint8_t HPCombi::horiz_sum_ref (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_sum_gen (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_sum4 (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_sum3 (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_sums_ref (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_sums_gen (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_sums_round (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_max_ref (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_max_gen (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_max4 (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_max3 (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_max_ref (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_max_gen (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_max_round (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_min_ref (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_min_gen (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_min4 (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
uint8_t HPCombi::horiz_min3 (epu8) noexcept
 Horizontal sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_min_ref (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_min_gen (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
epu8 HPCombi::partial_min_round (epu8) noexcept
 Horizontal partial sum of a HPCombi::epu8.
 
epu8 HPCombi::eval16_ref (epu8 v) noexcept
 Evaluation of a HPCombi::epu8.
 
epu8 HPCombi::eval16_arr (epu8 v) noexcept
 Evaluation of a HPCombi::epu8.
 
epu8 HPCombi::eval16_gen (epu8 v) noexcept
 
epu8 HPCombi::eval16_cycle (epu8 v) noexcept
 Evaluation of a HPCombi::epu8.
 
epu8 HPCombi::eval16_popcount (epu8 v) noexcept
 Evaluation of a HPCombi::epu8.
 
epu8 HPCombi::popcount16 (epu8 v) noexcept
 a vector popcount function
 
bool HPCombi::is_partial_transformation (epu8 v, const size_t k=16) noexcept
 Test for partial transformation.
 
bool HPCombi::is_transformation (epu8 v, const size_t k=16) noexcept
 Test for transformation.
 
bool HPCombi::is_partial_permutation (epu8 v, const size_t k=16) noexcept
 Test for partial permutations.
 
bool HPCombi::is_permutation_sort (epu8 v, const size_t k=16) noexcept
 
bool HPCombi::is_permutation_eval (epu8 v, const size_t k=16) noexcept
 
bool HPCombi::is_permutation (epu8 v, const size_t k=16) noexcept
 
std::ostream & std::operator<< (std::ostream &stream, HPCombi::epu8 const &a)
 
std::string std::to_string (HPCombi::epu8 const &a)
 

Variables

constexpr std::array< epu8, 9 > HPCombi::sorting_rounds
 A 16-way sorting network.
 
constexpr std::array< epu8, 6 > HPCombi::sorting_rounds8
 A duplicated 8-way sorting network.
 
constexpr std::array< epu8, 6 > HPCombi::merge_rounds
 
constexpr std::array< epu8, 3 > HPCombi::inverting_rounds
 
constexpr std::array< epu8, 4 > HPCombi::summing_rounds
 Permutation Round for partial and horizontal sums.
 
constexpr std::array< epu8, 4 > HPCombi::mining_rounds
 

Macro Definition Documentation

◆ FF

#define FF   0xff