HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.3
Loading...
Searching...
No Matches
epu8_impl.hpp File Reference

implementation of epu8.hpp ; this file should not be included directly. More...

#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 >
 This type appears in the doc because we provide an equal operator for HPCombi::epu8. More...
 
struct  std::not_equal_to< HPCombi::epu8 >
 This type appears in the doc because we provide a not_equal operator for HPCombi::epu8. More...
 
struct  std::hash< HPCombi::epu8 >
 This type appears in the doc because we provide a hash function for HPCombi::epu8. More...
 
struct  std::less< HPCombi::epu8 >
 This type appears in the doc because we provide a less operator for HPCombi::epu8. More...
 

Namespaces

namespace  HPCombi
 
namespace  std
 

Macros

#define FF   0xff
 

Functions

epu8 HPCombi::permuted_ref (epu8 a, epu8 b) noexcept
 Apply a permutation b on the vector a: for i=0..16 {result[i] = a[b[i]}.
 
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
 Same interface as first_diff but with a different implementation.
 
uint64_t HPCombi::first_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept
 Same interface as first_diff but with a different implementation.
 
uint64_t HPCombi::last_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept
 Same interface as last_diff but with a different implementation.
 
uint64_t HPCombi::last_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept
 Same interface as last_diff but with a different implementation.
 
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 both halves sorted.
 
epu8 HPCombi::revsorted (epu8 a) noexcept
 Return a reverse sorted HPCombi::epu8.
 
epu8 HPCombi::revsorted8 (epu8 a) noexcept
 Return a HPCombi::epu8 with both halves 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
 Same interface as permutation_of but with a different implementation.
 
epu8 HPCombi::permutation_of (epu8 a, epu8 b) noexcept
 Find if a vector is a permutation of another one.
 
uint8_t HPCombi::horiz_sum_ref (epu8) noexcept
 Same interface as horiz_sum but with a different implementation.
 
uint8_t HPCombi::horiz_sum_gen (epu8) noexcept
 Same interface as horiz_sum but with a different implementation.
 
uint8_t HPCombi::horiz_sum4 (epu8) noexcept
 Same interface as horiz_sum but with a different implementation.
 
uint8_t HPCombi::horiz_sum3 (epu8) noexcept
 Same interface as horiz_sum but with a different implementation.
 
epu8 HPCombi::partial_sums_ref (epu8) noexcept
 Same interface as partial_sums but with a different implementation.
 
epu8 HPCombi::partial_sums_gen (epu8) noexcept
 Same interface as partial_sums but with a different implementation.
 
epu8 HPCombi::partial_sums_round (epu8) noexcept
 Same interface as partial_sums but with a different implementation.
 
uint8_t HPCombi::horiz_max_ref (epu8) noexcept
 Same interface as horiz_max but with a different implementation.
 
uint8_t HPCombi::horiz_max_gen (epu8) noexcept
 Same interface as horiz_max but with a different implementation.
 
uint8_t HPCombi::horiz_max4 (epu8) noexcept
 Same interface as horiz_max but with a different implementation.
 
uint8_t HPCombi::horiz_max3 (epu8) noexcept
 Same interface as horiz_max but with a different implementation.
 
epu8 HPCombi::partial_max_ref (epu8) noexcept
 Same interface as partial_max but with a different implementation.
 
epu8 HPCombi::partial_max_gen (epu8) noexcept
 Same interface as partial_max but with a different implementation.
 
epu8 HPCombi::partial_max_round (epu8) noexcept
 Same interface as partial_max but with a different implementation.
 
uint8_t HPCombi::horiz_min_ref (epu8) noexcept
 Same interface as horiz_min but with a different implementation.
 
uint8_t HPCombi::horiz_min_gen (epu8) noexcept
 Same interface as horiz_min but with a different implementation.
 
uint8_t HPCombi::horiz_min4 (epu8) noexcept
 Same interface as horiz_min but with a different implementation.
 
uint8_t HPCombi::horiz_min3 (epu8) noexcept
 Same interface as horiz_min but with a different implementation.
 
epu8 HPCombi::partial_min_ref (epu8) noexcept
 Same interface as partial_min but with a different implementation.
 
epu8 HPCombi::partial_min_gen (epu8) noexcept
 Same interface as partial_min but with a different implementation.
 
epu8 HPCombi::partial_min_round (epu8) noexcept
 Same interface as partial_min but with a different implementation.
 
epu8 HPCombi::eval16_ref (epu8 v) noexcept
 Same interface as eval16 but with a different implementation.
 
epu8 HPCombi::eval16_arr (epu8 v) noexcept
 Same interface as eval16 but with a different implementation.
 
epu8 HPCombi::eval16_gen (epu8 v) noexcept
 
epu8 HPCombi::eval16_cycle (epu8 v) noexcept
 Same interface as eval16 but with a different implementation.
 
epu8 HPCombi::eval16_popcount (epu8 v) noexcept
 Same interface as eval16 but with a different implementation.
 
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
 Same interface as is_permutation but with a different implementation.
 
bool HPCombi::is_permutation_eval (epu8 v, const size_t k=16) noexcept
 Same interface as is_permutation but with a different implementation.
 
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
 

Detailed Description

implementation of epu8.hpp ; this file should not be included directly.

Macro Definition Documentation

◆ FF

#define FF   0xff