diff --git a/docs/CF_8cpp.html b/docs/CF_8cpp.html new file mode 100644 index 00000000..e305ebbc --- /dev/null +++ b/docs/CF_8cpp.html @@ -0,0 +1,123 @@ + + +
+ + + + +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <array>
#include <cassert>
#include <cstdint>
#include <iostream>
#include "hpcombi/perm16.hpp"
+Classes | |
class | EqEpu8 |
+Functions | |
int | main () |
int main | +( | +) | ++ |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <array>
#include <cassert>
#include <cstdint>
#include <functional>
#include <iostream>
#include <vector>
#include <unordered_set>
#include "hpcombi/perm16.hpp"
+Functions | |
PTransf16 | act1 (PTransf16 x, PTransf16 y) |
PTransf16 | act0 (PTransf16 x, PTransf16 y) |
int | main () |
+Variables | |
const PTransf16 | id {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s0 {0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s1e {0, 1, 2, 3, 4, 5, 7, 6, 9, 8, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s1f {0, 1, 2, 3, 4, 5, 8, 9, 6, 7, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s2 {0, 1, 2, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 13, 14, 15} |
const PTransf16 | s3 {0, 1, 2, 3, 5, 4, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15} |
const PTransf16 | s4 {0, 1, 2, 4, 3, 5, 6, 7, 8, 9, 10, 12, 11, 13, 14, 15} |
const PTransf16 | s5 {0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15} |
const PTransf16 | s6 {0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 13, 15} |
const PTransf16 | s7 {1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14} |
const uint8_t | FF = 0xff |
const uint8_t | FE = 0xfe |
const PTransf16 | gene |
const PTransf16 | genf |
+
|
+ +inline | +
+
|
+ +inline | +
int main | +( | +) | ++ |
const uint8_t FE = 0xfe | +
const uint8_t FF = 0xff | +
const PTransf16 gene | +
const PTransf16 genf | +
const PTransf16 id {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} | +
const PTransf16 s0 {0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14, 15} | +
const PTransf16 s1e {0, 1, 2, 3, 4, 5, 7, 6, 9, 8, 10, 11, 12, 13, 14, 15} | +
const PTransf16 s1f {0, 1, 2, 3, 4, 5, 8, 9, 6, 7, 10, 11, 12, 13, 14, 15} | +
const PTransf16 s2 {0, 1, 2, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 13, 14, 15} | +
const PTransf16 s3 {0, 1, 2, 3, 5, 4, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15} | +
const PTransf16 s4 {0, 1, 2, 4, 3, 5, 6, 7, 8, 9, 10, 12, 11, 13, 14, 15} | +
const PTransf16 s5 {0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15} | +
const PTransf16 s6 {0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 13, 15} | +
const PTransf16 s7 {1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14} | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <array>
#include <cassert>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include "simde/x86/sse4.1.h"
#include "hpcombi/perm16.hpp"
+Functions | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, const std::vector< T > &v) |
PTransf16 | act1 (PTransf16 x, PTransf16 y) |
PTransf16 | mult1 (PTransf16 x, PTransf16 y) |
PTransf16 | act0 (PTransf16 x, PTransf16 y) |
std::vector< int > | reduced_word (PTransf16 x) |
PTransf16 | mult0 (PTransf16 x, PTransf16 y) |
std::vector< int > | sym_renner (PTransf16 v, int n) |
int | main () |
+Variables | |
const PTransf16 | id {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s0 {0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s1e {0, 1, 2, 3, 4, 5, 7, 6, 9, 8, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s1f {0, 1, 2, 3, 4, 5, 8, 9, 6, 7, 10, 11, 12, 13, 14, 15} |
const PTransf16 | s2 {0, 1, 2, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 13, 14, 15} |
const PTransf16 | s3 {0, 1, 2, 3, 5, 4, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15} |
const PTransf16 | s4 {0, 1, 2, 4, 3, 5, 6, 7, 8, 9, 10, 12, 11, 13, 14, 15} |
const PTransf16 | s5 {0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15} |
const PTransf16 | s6 {0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 13, 15} |
const PTransf16 | s7 {1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14} |
const uint8_t | FF = 0xff |
const uint8_t | FE = 0xfe |
const PTransf16 | gene |
const PTransf16 | genf |
const vector< PTransf16 > | gens {gene, genf, s1e, s1f, s2, s3, s4, s5} |
const int | nprint = 6 |
unordered_map< PTransf16, std::pair< PTransf16, int > > | elems |
+
|
+ +inline | +
+
|
+ +inline | +
int main | +( | +) | ++ |
+
|
+ +inline | +
+
|
+ +inline | +
std::ostream& operator<< | +( | +std::ostream & | +out, | +
+ | + | const std::vector< T > & | +v | +
+ | ) | ++ |
std::vector<int> reduced_word | +( | +PTransf16 | +x | ) | ++ |
std::vector<int> sym_renner | +( | +PTransf16 | +v, | +
+ | + | int | +n | +
+ | ) | ++ |
const uint8_t FE = 0xfe | +
const uint8_t FF = 0xff | +
const PTransf16 gene | +
const PTransf16 genf | +
const PTransf16 id {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} | +
const int nprint = 6 | +
const PTransf16 s0 {0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14, 15} | +
const PTransf16 s1e {0, 1, 2, 3, 4, 5, 7, 6, 9, 8, 10, 11, 12, 13, 14, 15} | +
const PTransf16 s1f {0, 1, 2, 3, 4, 5, 8, 9, 6, 7, 10, 11, 12, 13, 14, 15} | +
const PTransf16 s2 {0, 1, 2, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 13, 14, 15} | +
const PTransf16 s3 {0, 1, 2, 3, 5, 4, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15} | +
const PTransf16 s4 {0, 1, 2, 4, 3, 5, 6, 7, 8, 9, 10, 12, 11, 13, 14, 15} | +
const PTransf16 s5 {0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15} | +
const PTransf16 s6 {0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 13, 15} | +
const PTransf16 s7 {1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14} | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <array>
#include <cassert>
#include <cstdint>
#include <functional>
#include <iostream>
#include <vector>
#include <unordered_set>
#include "hpcombi/perm16.hpp"
+Functions | |
int | main () |
+Variables | |
const Transf16 | s {1, 0, 2, 3, 4, 5, 6} |
const Transf16 | cy {1, 2, 3, 4, 5, 6, 0} |
const Transf16 | pi {0, 0, 2, 3, 4, 5, 6} |
const std::vector< Transf16 > | gens {s, cy, pi} |
const uint8_t | FE = 0xfe |
int main | +( | +) | ++ |
const Transf16 cy {1, 2, 3, 4, 5, 6, 0} | +
const uint8_t FE = 0xfe | +
const Transf16 pi {0, 0, 2, 3, 4, 5, 6} | +
const Transf16 s {1, 0, 2, 3, 4, 5, 6} | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
▼NHPCombi | |
▼Npower_helper | |
CMonoid< Perm16 > | |
CMonoid | Algebraic monoid structure used by default for type T by the pow function and prod function |
CMonoid< std::string > | |
CBMat8 | Class for fast boolean matrices of dimension up to 8 x 8 |
CTPUBuild | Class for factory object associated to a SIMD packed unsigned integers |
CPTransf16 | Partial transformation of \(\{0\dots 15\}\) |
CTransf16 | Full transformation of \(\{0\dots 15\}\) |
CPPerm16 | Partial permutation of \(\{0, \dots, 15\}\) |
CPerm16 | Permutations of \(\{0\dots 15\}\) |
CPermGeneric | |
CVect16 | |
CVectGeneric | A generic class for combinatorial integer vectors |
▼Nlibsemigroups | |
CTimer | |
▼Nstd | |
Chash< HPCombi::BMat8 > | |
Cequal_to< HPCombi::epu8 > | |
Cnot_equal_to< HPCombi::epu8 > | |
Chash< HPCombi::epu8 > | |
Cless< HPCombi::epu8 > | |
Chash< HPCombi::PTransf16 > | |
Chash< HPCombi::Transf16 > | |
Chash< HPCombi::PPerm16 > | |
Chash< HPCombi::Perm16 > | |
Chash< HPCombi::PermGeneric< Size, Expo > > | |
Chash< HPCombi::Vect16 > | |
Chash< HPCombi::VectGeneric< Size, Expo > > | |
Ccommon_eval16 | Evaluation of a HPCombi::epu8 |
Ccommon_first_diff | The first difference between two HPCombi::epu8 |
Ccommon_horiz_max | Horizontal sum of a HPCombi::epu8 |
Ccommon_horiz_min | Horizontal sum of a HPCombi::epu8 |
Ccommon_horiz_sum | Horizontal sum of a HPCombi::epu8 |
Ccommon_inverse | The inverse permutation |
Ccommon_inverse_pperm | The inverse of a partial permutation |
Ccommon_is_permutation | |
Ccommon_last_diff | The last difference between two HPCombi::epu8 |
Ccommon_left_weak_leq | Compare two permutations for the left weak order |
Ccommon_lehmer | The Lehmer code of a permutation |
Ccommon_length | The Coxeter length (ie: number of inversion) of a permutation |
Ccommon_merge | Merge two sorted epu8 |
Ccommon_nb_cycles | The number of cycles of a permutation |
Ccommon_nb_descent | The number of descent of a permutation |
Ccommon_partial_max | Horizontal partial sum of a HPCombi::epu8 |
Ccommon_partial_min | Horizontal partial sum of a HPCombi::epu8 |
Ccommon_partial_sums | Horizontal partial sum of a HPCombi::epu8 |
Ccommon_permutation_of | Find if a vector is a permutation of one other |
CEqEpu8 |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <array>
#include <bitset>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iostream>
#include <memory>
#include <utility>
#include <vector>
#include "debug.hpp"
#include "epu8.hpp"
#include "perm16.hpp"
#include "bmat8_impl.hpp"
Go to the source code of this file.
++Classes | |
class | HPCombi::BMat8 |
Class for fast boolean matrices of dimension up to 8 x 8. More... | |
struct | std::hash< HPCombi::BMat8 > |
+Namespaces | |
HPCombi | |
std | |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Go to the source code of this file.
++Namespaces | |
HPCombi | |
HPCombi::detail | |
std | |
+Macros | |
#define | FF 0xff |
+Typedefs | |
using | HPCombi::epu64 = uint64_t __attribute__((__vector_size__(16), __may_alias__)) |
+Functions | |
void | HPCombi::detail::row_space_update_bitset (epu8 block, epu8 &set0, epu8 &set1) noexcept |
std::ostream & | std::operator<< (std::ostream &os, HPCombi::BMat8 const &bm) |
+Variables | |
constexpr std::array< epu8, 4 > | HPCombi::masks |
#define FF 0xff | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
This is the complete list of members for EqEpu8, including all inherited members.
+begin() | EqEpu8 | inline |
end() | EqEpu8 | inline |
EqEpu8(epu8 x, uint64_t sz=16) | EqEpu8 | inline |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+Public Member Functions | |
EqEpu8 (epu8 x, uint64_t sz=16) | |
EqEpu8Iterator | begin () |
EqEpu8Iterator | end () |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
This is the complete list of members for HPCombi::BMat8, including all inherited members.
+BMat8() noexcept=default | HPCombi::BMat8 | |
BMat8(uint64_t mat) noexcept | HPCombi::BMat8 | inlineexplicit |
BMat8(std::vector< std::vector< bool >> const &mat) | HPCombi::BMat8 | inlineexplicit |
BMat8(BMat8 const &) noexcept=default | HPCombi::BMat8 | |
BMat8(BMat8 &&) noexcept=default | HPCombi::BMat8 | |
col_permutation_matrix(Perm16 p) noexcept | HPCombi::BMat8 | inlinestatic |
col_permuted(Perm16 p) const noexcept | HPCombi::BMat8 | inline |
col_space_basis() const noexcept | HPCombi::BMat8 | inline |
mult_transpose(BMat8 const &that) const noexcept | HPCombi::BMat8 | inline |
nr_rows() const noexcept | HPCombi::BMat8 | inline |
one(size_t dim=8) noexcept | HPCombi::BMat8 | inlinestatic |
operator!=(BMat8 const &that) const noexcept | HPCombi::BMat8 | inline |
operator()(size_t i, size_t j) const noexcept | HPCombi::BMat8 | inline |
operator*(BMat8 const &that) const noexcept | HPCombi::BMat8 | inline |
operator<(BMat8 const &that) const noexcept | HPCombi::BMat8 | inline |
operator=(BMat8 const &) noexcept=default | HPCombi::BMat8 | |
operator=(BMat8 &&) noexcept=default | HPCombi::BMat8 | |
operator==(BMat8 const &that) const noexcept | HPCombi::BMat8 | inline |
operator>(BMat8 const &that) const noexcept | HPCombi::BMat8 | inline |
random() | HPCombi::BMat8 | inlinestatic |
random(size_t dim) | HPCombi::BMat8 | inlinestatic |
right_perm_action_on_basis(BMat8) const noexcept | HPCombi::BMat8 | inline |
right_perm_action_on_basis_ref(BMat8) const | HPCombi::BMat8 | inline |
row_permutation_matrix(Perm16 p) noexcept | HPCombi::BMat8 | inlinestatic |
row_permuted(Perm16 p) const noexcept | HPCombi::BMat8 | inline |
row_space_basis() const noexcept | HPCombi::BMat8 | inline |
row_space_bitset(epu8 &res1, epu8 &res2) const noexcept | HPCombi::BMat8 | inline |
row_space_bitset_ref() const | HPCombi::BMat8 | inline |
row_space_included(BMat8 other) const noexcept | HPCombi::BMat8 | inline |
row_space_included2(BMat8 a1, BMat8 b1, BMat8 a2, BMat8 b2) | HPCombi::BMat8 | inlinestatic |
row_space_included_bitset(BMat8 other) const noexcept | HPCombi::BMat8 | inline |
row_space_included_ref(BMat8 other) const noexcept | HPCombi::BMat8 | inline |
row_space_mask(epu8 vects) const noexcept | HPCombi::BMat8 | inline |
row_space_size() const noexcept | HPCombi::BMat8 | inline |
row_space_size_bitset() const noexcept | HPCombi::BMat8 | inline |
row_space_size_incl() const noexcept | HPCombi::BMat8 | inline |
row_space_size_incl1() const noexcept | HPCombi::BMat8 | inline |
row_space_size_ref() const | HPCombi::BMat8 | inline |
rows() const | HPCombi::BMat8 | inline |
set(size_t i, size_t j, bool val) noexcept | HPCombi::BMat8 | inline |
swap(BMat8 &that) noexcept | HPCombi::BMat8 | inline |
to_int() const noexcept | HPCombi::BMat8 | inline |
transpose() const noexcept | HPCombi::BMat8 | inline |
transpose2(BMat8 &, BMat8 &) noexcept | HPCombi::BMat8 | inlinestatic |
transpose_mask() const noexcept | HPCombi::BMat8 | inline |
transpose_maskd() const noexcept | HPCombi::BMat8 | inline |
write(std::ostream &os) const | HPCombi::BMat8 | inline |
~BMat8()=default | HPCombi::BMat8 |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Class for fast boolean matrices of dimension up to 8 x 8. + More...
+ +#include <bmat8.hpp>
+Public Member Functions | |
BMat8 () noexcept=default | |
A default constructor. More... | |
BMat8 (uint64_t mat) noexcept | |
A constructor. More... | |
BMat8 (std::vector< std::vector< bool >> const &mat) | |
A constructor. More... | |
BMat8 (BMat8 const &) noexcept=default | |
A constructor. More... | |
BMat8 (BMat8 &&) noexcept=default | |
A constructor. More... | |
BMat8 & | operator= (BMat8 const &) noexcept=default |
A constructor. More... | |
BMat8 & | operator= (BMat8 &&) noexcept=default |
A constructor. More... | |
~BMat8 ()=default | |
A default destructor. More... | |
bool | operator== (BMat8 const &that) const noexcept |
Returns true if this equals that . More... | |
bool | operator!= (BMat8 const &that) const noexcept |
Returns true if this does not equal that . More... | |
bool | operator< (BMat8 const &that) const noexcept |
Returns true if this is less than that . More... | |
bool | operator> (BMat8 const &that) const noexcept |
Returns true if this is greater than that . More... | |
bool | operator() (size_t i, size_t j) const noexcept |
Returns the entry in the (i , j )th position. More... | |
void | set (size_t i, size_t j, bool val) noexcept |
Sets the (i , j )th position to val . More... | |
uint64_t | to_int () const noexcept |
Returns the integer representation of this . More... | |
BMat8 | transpose () const noexcept |
Returns the transpose of this . More... | |
BMat8 | transpose_mask () const noexcept |
Returns the transpose of this . More... | |
BMat8 | transpose_maskd () const noexcept |
Returns the transpose of this . More... | |
BMat8 | mult_transpose (BMat8 const &that) const noexcept |
Returns the matrix product of this and the transpose of that . More... | |
BMat8 | operator* (BMat8 const &that) const noexcept |
Returns the matrix product of this and that . More... | |
BMat8 | row_space_basis () const noexcept |
Returns a canonical basis of the row space of this . More... | |
BMat8 | col_space_basis () const noexcept |
Returns a canonical basis of the col space of this . More... | |
size_t | nr_rows () const noexcept |
Returns the number of non-zero rows of this . More... | |
std::vector< uint8_t > | rows () const |
Returns a std::vector for rows of this . More... | |
uint64_t | row_space_size_ref () const |
Returns the cardinality of the row space of this . More... | |
std::bitset< 256 > | row_space_bitset_ref () const |
Returns the the row space of this . More... | |
void | row_space_bitset (epu8 &res1, epu8 &res2) const noexcept |
Returns the the row space of this as 256 bits. More... | |
uint64_t | row_space_size_bitset () const noexcept |
Returns the cardinality of the row space of this . More... | |
uint64_t | row_space_size_incl () const noexcept |
Returns the cardinality of the row space of this . More... | |
uint64_t | row_space_size_incl1 () const noexcept |
Returns the cardinality of the row space of this . More... | |
uint64_t | row_space_size () const noexcept |
Returns the cardinality of the row space of this . More... | |
bool | row_space_included_ref (BMat8 other) const noexcept |
Returns whether the row space of this is included in other's. More... | |
bool | row_space_included_bitset (BMat8 other) const noexcept |
Returns whether the row space of this is included in other's. More... | |
epu8 | row_space_mask (epu8 vects) const noexcept |
Returns a mask for which vectors of a 16 rows epu8 are in the row space of this . More... | |
bool | row_space_included (BMat8 other) const noexcept |
Returns whether the row space of this is included in other's. More... | |
BMat8 | row_permuted (Perm16 p) const noexcept |
Returns the matrix whose rows have been permuted according to p . More... | |
BMat8 | col_permuted (Perm16 p) const noexcept |
Returns the matrix whose columns have been permuted according to p . More... | |
Perm16 | right_perm_action_on_basis (BMat8) const noexcept |
Give the permutation whose right multiplication change *this to other . More... | |
Perm16 | right_perm_action_on_basis_ref (BMat8) const |
Give the permutation whose right multiplication change *this to other . More... | |
void | swap (BMat8 &that) noexcept |
std::ostream & | write (std::ostream &os) const |
Write this on os . More... | |
+Static Public Member Functions | |
static void | transpose2 (BMat8 &, BMat8 &) noexcept |
Transpose two matrices at once. More... | |
static std::pair< bool, bool > | row_space_included2 (BMat8 a1, BMat8 b1, BMat8 a2, BMat8 b2) |
Returns inclusion of row spaces. More... | |
static BMat8 | row_permutation_matrix (Perm16 p) noexcept |
Returns the matrix associated to the permutation p by rows. More... | |
static BMat8 | col_permutation_matrix (Perm16 p) noexcept |
Returns the matrix associated to the permutation p by columns. More... | |
static BMat8 | one (size_t dim=8) noexcept |
Returns the identity BMat8. More... | |
static BMat8 | random () |
Returns a random BMat8. More... | |
static BMat8 | random (size_t dim) |
Returns a random square BMat8 up to dimension dim . More... | |
Class for fast boolean matrices of dimension up to 8 x 8.
+The methods for these small matrices over the boolean semiring are more optimised than the generic methods for boolean matrices. Note that all BMat8 are represented internally as an 8 x 8 matrix; any entries not defined by the user are taken to be 0. This does not affect the results of any calculations.
+BMat8 is a trivial class.
+
+
|
+ +defaultnoexcept | +
A default constructor.
+This constructor gives no guarantees on what the matrix will contain.
+ +
+
|
+ +inlineexplicitnoexcept | +
A constructor.
+This constructor initializes a BMat8 to have rows equal to the 8 chunks, of 8 bits each, of the binary representation of mat
.
+
|
+ +inlineexplicit | +
A constructor.
+This constructor initializes a matrix where the rows of the matrix are the vectors in mat
.
+
|
+ +defaultnoexcept | +
A constructor.
+This is the copy constructor.
+ +
+
|
+ +defaultnoexcept | +
A constructor.
+This is the move constructor.
+ +
+
|
+ +default | +
A default destructor.
+ +
+
|
+ +inlinestaticnoexcept | +
Returns the matrix associated to the permutation p
by columns.
p | : a permutation fixing the entries 8..15 Note: no verification is performed on p |
+
|
+ +inlinenoexcept | +
Returns the matrix whose columns have been permuted according to p
.
p | : a permutation fixing the entries 8..15 Note: no verification is performed on p |
+
|
+ +inlinenoexcept | +
Returns a canonical basis of the col space of this
.
Any two matrix with the same column row space are guaranteed to have the same column space basis. Uses row_space_basis and transpose.
+ +
+
|
+ +inlinenoexcept | +
Returns the matrix product of this
and the transpose of that
.
This method returns the standard matrix product (over the boolean semiring) of two BMat8 objects. This is faster than transposing that and calling the product of this
with it. Implementation uses vector instructions.
+
|
+ +inlinenoexcept | +
Returns the number of non-zero rows of this
.
+
|
+ +inlinestaticnoexcept | +
+
|
+ +inlinenoexcept | +
Returns true
if this
does not equal that
.
This method checks the mathematical inequality of two BMat8 objects.
+ +
+
|
+ +inlinenoexcept | +
Returns the entry in the (i
, j
)th position.
This method returns the entry in the (i
, j
)th position. Note that since all matrices are internally represented as 8 x 8, it is possible to access entries that you might not believe exist.
+
|
+ +inlinenoexcept | +
Returns the matrix product of this
and that
.
This method returns the standard matrix product (over the boolean semiring) of two BMat8 objects. This is a fast implementation using transposition and vector instructions.
+ +
+
|
+ +inlinenoexcept | +
A constructor.
+This is the move assignment constructor.
+ +
+
|
+ +defaultnoexcept | +
A constructor.
+This is the copy assignment constructor.
+ +
+
|
+ +inlinenoexcept | +
Returns true
if this
equals that
.
This method checks the mathematical equality of two BMat8 objects.
+ +
+
|
+ +inlinenoexcept | +
+
|
+ +inlinestatic | +
+
|
+ +inlinestatic | +
+
|
+ +inlinenoexcept | +
Give the permutation whose right multiplication change *this
to other
.
*this
is suppose to be a row_space matrix (ie. sorted decreasingly) Fast implementation doing a vector binary search.
+
|
+ +inline | +
Give the permutation whose right multiplication change *this
to other
.
*this
is suppose to be a row_space matrix (ie. sorted decreasingly) Reference implementation.
+
|
+ +inlinestaticnoexcept | +
Returns the matrix associated to the permutation p
by rows.
p | : a permutation fixing the entries 8..15 Note: no verification is performed on p |
+
|
+ +inlinenoexcept | +
Returns the matrix whose rows have been permuted according to p
.
p | : a permutation fixing the entries 8..15 Note: no verification is performed on p |
+
|
+ +inlinenoexcept | +
Returns a canonical basis of the row space of this
.
Any two matrix with the same row space are guaranteed to have the same row space basis. This is a fast implementation using vector instructions to compute in parallel the union of the other rows included in a given one.
+ +
+
|
+ +inlinenoexcept | +
Returns the the row space of this
as 256 bits.
The result is stored in two 128 bits registers.
+ +
+
|
+ +inline | +
Returns the the row space of this
.
The result is stored in a c++ bitset
+ +
+
|
+ +inlinenoexcept | +
Returns whether the row space of this
is included in other's.
Uses vector computation of the product of included rows
+ +
+
|
+ +inlinestatic | +
Returns inclusion of row spaces.
+Compute at once if a1 is included in b1 and a2 is included in b2
+ +
+
|
+ +inlinenoexcept | +
Returns whether the row space of this
is included in other's.
Uses a 256 bitset internally
+ +
+
|
+ +inlinenoexcept | +
Returns whether the row space of this
is included in other's.
Uses a 256 bitset internally
+ +
+
|
+ +inlinenoexcept | +
Returns a mask for which vectors of a 16 rows epu8
are in the row space of this
.
Uses vector computation of the product of included rows
+ +
+
|
+ +inlinenoexcept | +
Returns the cardinality of the row space of this
.
Alias to row_space_size_incl
+ +
+
|
+ +inlinenoexcept | +
Returns the cardinality of the row space of this
.
It compute all the product using two 128 bits registers to store the set of elements of the row space.
+ +
+
|
+ +inlinenoexcept | +
Returns the cardinality of the row space of this
.
Uses vector computation of the product of included rows in each 256 possible vectors. Fastest implementation saving a few instructions compared to row_space_size_incl1
+ +
+
|
+ +inlinenoexcept | +
Returns the cardinality of the row space of this
.
Uses vector computation of the product included row in each 256 possible vectors. More optimized in row_space_size_incl
+ +
+
|
+ +inline | +
Returns the cardinality of the row space of this
.
Reference implementation computing all products
+ +
+
|
+ +inline | +
Returns a std::vector
for rows of this
.
+
|
+ +inlinenoexcept | +
Sets the (i
, j
)th position to val
.
This method sets the (i
, j
)th entry of this
to val
. Uses the bit twiddle for setting bits found here.
+
|
+ +inlinenoexcept | +
+
|
+ +inlinenoexcept | +
Returns the integer representation of this
.
Returns an unsigned integer obtained by interpreting an 8 x 8 BMat8 as a sequence of 64 bits (reading rows left to right, from top to bottom) and then this sequence as an unsigned int.
+ +
+
|
+ +inlinenoexcept | +
Returns the transpose of this
.
Returns the standard matrix transpose of a BMat8. Uses the technique found in Knuth AoCP Vol. 4 Fasc. 1a, p. 15.
+ +
+
|
+ +inlinestaticnoexcept | +
Transpose two matrices at once.
+Compute in parallel the standard matrix transpose of two BMat8. Uses the technique found in Knuth AoCP Vol. 4 Fasc. 1a, p. 15.
+ +
+
|
+ +inlinenoexcept | +
Returns the transpose of this
.
Returns the standard matrix transpose of a BMat8. Uses movemask
instruction.
+
|
+ +inlinenoexcept | +
Returns the transpose of this
.
Returns the standard matrix transpose of a BMat8. Uses movemask
instruction.
+
|
+ +inline | +
Write this
on os
.
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Evaluation of a HPCombi::epu8. + More...
+ +#include <epu8.hpp>
Evaluation of a HPCombi::epu8.
+v | : a HPCombi::epu8 |
r
such that r
[i] is the number of occurrence of i
in the input v
{ 1, 1, 2, 1, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 1}
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The first difference between two HPCombi::epu8. + More...
+ +#include <epu8.hpp>
The first difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. first_diff(a, b)
returns 3
, first_diff(a, b, 3)
returns 16
, first_diff(a, b, 4)
returns 3
, first_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Horizontal sum of a HPCombi::epu8. + More...
+ +#include <epu8.hpp>
Horizontal sum of a HPCombi::epu8.
+12
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Horizontal sum of a HPCombi::epu8. + More...
+ +#include <epu8.hpp>
Horizontal sum of a HPCombi::epu8.
+1
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Horizontal sum of a HPCombi::epu8. + More...
+ +#include <epu8.hpp>
Horizontal sum of a HPCombi::epu8.
+110
uint8_t
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The inverse permutation. + More...
+ +#include <perm16.hpp>
The inverse permutation.
+*this
{0,4,2,1,3,5,6,7,8,9,10,11,12,13,14,15}
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The inverse of a partial permutation. + More...
+ +#include <perm16.hpp>
The inverse of a partial permutation.
+*this
. The inverse of \(p\) is the unique partial permutation \(i\) such that \( p * i * p = p\) and \( i * p * i = i\) {0,0xFF,2,1,3,5,6,0xFF,8,9,0xFF,10,12,0xFF,0xFF,0xFF} +*
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <epu8.hpp>
*this
is a permutation. v | the vector to test |
k | the size of *this (default 16) |
If *this
is a permutation of \(0\dots n-1\) for \(n<16\), it should be completed to a permutation of \(0\dots 15\) by adding fixed points. That is the values \(i\geq n\) should be mapped to themself.
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The last difference between two HPCombi::epu8. + More...
+ +#include <epu8.hpp>
The last difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. last_diff(a, b)
returns 11
, last_diff(a, b, 3)
returns 16
, last_diff(a, b, 4)
returns 3
, last_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Compare two permutations for the left weak order. + More...
+ +#include <perm16.hpp>
Compare two permutations for the left weak order.
+true
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The Lehmer code of a permutation. + More...
+ +#include <perm16.hpp>
The Lehmer code of a permutation.
+*this
{0,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0}
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The Coxeter length (ie: number of inversion) of a permutation. + More...
+ +#include <perm16.hpp>
The Coxeter length (ie: number of inversion) of a permutation.
+*this
4
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Merge two sorted epu8. + More...
+ +#include <epu8.hpp>
Merge two sorted epu8.
+a,b | two HPCombi::epu8 |
a
and are
sorted a
[15] <= b
[0]
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The number of cycles of a permutation. + More...
+ +#include <perm16.hpp>
The number of cycles of a permutation.
+*this
10
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
The number of descent of a permutation. + More...
+ +#include <perm16.hpp>
The number of descent of a permutation.
+*this
2
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Horizontal partial sum of a HPCombi::epu8. + More...
+ +#include <epu8.hpp>
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 5, 5, 5, 6,12,12,12,12,12,12,12,13,14,15}
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Horizontal partial sum of a HPCombi::epu8. + More...
+ +#include <epu8.hpp>
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Horizontal partial sum of a HPCombi::epu8. + More...
+ +#include <epu8.hpp>
Horizontal partial sum of a HPCombi::epu8.
+{ 5,10,12,17,18,24,36,40,40,43,45,56,68,81,95,110}
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Find if a vector is a permutation of one other. + More...
+ +#include <epu8.hpp>
Find if a vector is a permutation of one other.
+a,b | two HPCombi::epu8 |
res
[i] is the position in a
of b
[i] if b
[i] appears exactly once in a
, or undefined if not.
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
This is the complete list of members for libsemigroups::Timer, including all inherited members.
+elapsed() const | libsemigroups::Timer | inline |
operator<<(std::ostream &os, Timer const &t) | libsemigroups::Timer | friend |
reset() | libsemigroups::Timer | inline |
string(std::chrono::nanoseconds elapsed) const | libsemigroups::Timer | inline |
string() const | libsemigroups::Timer | inline |
Timer() | libsemigroups::Timer | inline |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <timer.h>
+Public Member Functions | |
Timer () | |
void | reset () |
std::chrono::nanoseconds | elapsed () const |
std::string | string (std::chrono::nanoseconds elapsed) const |
std::string | string () const |
+Friends | |
std::ostream & | operator<< (std::ostream &os, Timer const &t) |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +friend | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
Go to the source code of this file.
++Macros | |
#define | HPCOMBI_ASSERT(x) |
#define HPCOMBI_ASSERT | +( | ++ | x | ) | ++ |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+Files | |
file | arch.hpp [code] |
file | bmat8.hpp [code] |
file | bmat8_impl.hpp [code] |
file | builder.hpp [code] |
file | debug.hpp [code] |
file | epu8.hpp [code] |
file | epu8_impl.hpp [code] |
file | hpcombi.hpp [code] |
file | perm16.hpp [code] |
file | perm16_impl.hpp [code] |
file | perm_generic.hpp [code] |
file | perm_generic_impl.hpp [code] |
file | power.hpp [code] |
Generic compile time power. | |
file | vect16.hpp [code] |
file | vect_generic.hpp [code] |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+Files | |
file | CF.cpp |
file | image.cpp |
file | pattern.cpp |
file | RD.cpp |
file | Renner.cpp |
file | stringmonoid.cpp |
Example of how to use HPCombi::pow with HPCombi::power_helper::Monoid. | |
file | timer.h [code] |
file | Trans.cpp |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+Directories | |
directory | hpcombi |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <array>
#include <cstddef>
#include <cstdint>
#include <ostream>
#include <string>
#include "debug.hpp"
#include "builder.hpp"
#include "vect_generic.hpp"
#include "simde/x86/sse4.1.h"
#include "simde/x86/sse4.2.h"
#include "epu8_impl.hpp"
Go to the source code of this file.
++Namespaces | |
HPCombi | |
std | |
+Typedefs | |
using | HPCombi::epu8 = uint8_t __attribute__((vector_size(16))) |
SIMD vector of 16 unsigned bytes. More... | |
+Functions | |
constexpr uint8_t | HPCombi::operator""_u8 (unsigned long long arg) noexcept |
Unsigned 8 bits int constant. More... | |
bool | HPCombi::is_all_zero (epu8 a) noexcept |
Test whether all the entries of a HPCombi::epu8 are zero. More... | |
bool | HPCombi::is_all_one (epu8 a) noexcept |
Test whether all the entries of a HPCombi::epu8 are one. More... | |
bool | HPCombi::equal (epu8 a, epu8 b) noexcept |
Equality of HPCombi::epu8. More... | |
bool | HPCombi::not_equal (epu8 a, epu8 b) noexcept |
Non equality of HPCombi::epu8. More... | |
epu8 | HPCombi::permuted_ref (epu8 a, epu8 b) noexcept |
Permuting a HPCombi::epu8. More... | |
epu8 | HPCombi::permuted (epu8 a, epu8 b) noexcept |
Permuting a HPCombi::epu8. More... | |
epu8 | HPCombi::shifted_right (epu8 a) noexcept |
Left shifted of a HPCombi::epu8 inserting a 0. More... | |
epu8 | HPCombi::shifted_left (epu8 a) noexcept |
Right shifted of a HPCombi::epu8 inserting a 0. More... | |
epu8 | HPCombi::reverted (epu8 a) noexcept |
Reverting a HPCombi::epu8. More... | |
epu8 | HPCombi::min (epu8 a, epu8 b) noexcept |
Vector min between two HPCombi::epu8 0. More... | |
epu8 | HPCombi::max (epu8 a, epu8 b) noexcept |
Vector max between two HPCombi::epu8 0. More... | |
bool | HPCombi::is_sorted (epu8 a) noexcept |
Testing if a HPCombi::epu8 is sorted. More... | |
epu8 | HPCombi::sorted (epu8 a) noexcept |
Return a sorted HPCombi::epu8. More... | |
epu8 | HPCombi::sorted8 (epu8 a) noexcept |
Return a HPCombi::epu8 with the two half sorted. More... | |
epu8 | HPCombi::revsorted (epu8 a) noexcept |
Return a reverse sorted HPCombi::epu8. More... | |
epu8 | HPCombi::revsorted8 (epu8 a) noexcept |
Return a HPCombi::epu8 with the two half reverse sorted. More... | |
epu8 | HPCombi::sort_perm (epu8 &a) noexcept |
Sort this and return the sorting permutation. More... | |
epu8 | HPCombi::sort8_perm (epu8 &a) noexcept |
Sort this and return the sorting permutation. More... | |
void | HPCombi::merge (epu8 &a, epu8 &b) noexcept |
Merge two sorted epu8. More... | |
epu8 | HPCombi::permutation_of_ref (epu8 a, epu8 b) noexcept |
Find if a vector is a permutation of one other. More... | |
epu8 | HPCombi::permutation_of (epu8 a, epu8 b) noexcept |
Find if a vector is a permutation of one other. More... | |
epu8 | HPCombi::random_epu8 (uint16_t bnd) |
A random HPCombi::epu8. More... | |
epu8 | HPCombi::remove_dups (epu8 a, uint8_t repl=0) noexcept |
Remove duplicates in a sorted HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum (epu8 v) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_sums_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_sums_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_sums_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_sums (epu8 v) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max (epu8 v) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_max_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_max_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_max_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_max (epu8 v) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min (epu8 v) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_min_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_min_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_min_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_min (epu8 v) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_ref (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_arr (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_cycle (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_popcount (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16 (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
uint64_t | HPCombi::first_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept |
The first difference between two HPCombi::epu8. More... | |
uint64_t | HPCombi::first_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept |
The first difference between two HPCombi::epu8. More... | |
uint64_t | HPCombi::first_diff (epu8 a, epu8 b, size_t bound=16) noexcept |
The first difference between two HPCombi::epu8. More... | |
uint64_t | HPCombi::last_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
uint64_t | HPCombi::last_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
uint64_t | HPCombi::last_diff (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
bool | HPCombi::less (epu8 a, epu8 b) noexcept |
Lexicographic comparison between two HPCombi::epu8. More... | |
int8_t | HPCombi::less_partial (epu8 a, epu8 b, int k) noexcept |
Partial lexicographic comparison between two HPCombi::epu8. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
epu8 | HPCombi::popcount16 (epu8 v) noexcept |
a vector popcount function More... | |
bool | HPCombi::is_partial_transformation (epu8 v, const size_t k=16) noexcept |
Test for partial transformation. More... | |
bool | HPCombi::is_transformation (epu8 v, const size_t k=16) noexcept |
Test for transformation. More... | |
bool | HPCombi::is_partial_permutation (epu8 v, const size_t k=16) noexcept |
Test for partial permutations. More... | |
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 TPUBuild< epu8 > | HPCombi::Epu8 {} |
Factory object acting as a class constructor for type HPCombi::epu8. More... | |
constexpr uint64_t | HPCombi::prime = 0x9e3779b97f4a7bb9 |
A prime number good for hashing. More... | |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#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 | |
HPCombi | |
std | |
+Macros | |
#define | FF 0xff |
+Functions | |
epu8 | HPCombi::permuted_ref (epu8 a, epu8 b) noexcept |
Permuting a HPCombi::epu8. More... | |
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. More... | |
uint64_t | HPCombi::first_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept |
The first difference between two HPCombi::epu8. More... | |
uint64_t | HPCombi::last_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
uint64_t | HPCombi::last_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
bool | HPCombi::less (epu8 a, epu8 b) noexcept |
Lexicographic comparison between two HPCombi::epu8. More... | |
int8_t | HPCombi::less_partial (epu8 a, epu8 b, int k) noexcept |
Partial lexicographic comparison between two HPCombi::epu8. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
template<bool Increasing = true, size_t sz> | |
epu8 | HPCombi::network_sort (epu8 res, std::array< epu8, sz > rounds) |
Apply a sorting network. More... | |
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. More... | |
bool | HPCombi::is_sorted (epu8 a) noexcept |
Testing if a HPCombi::epu8 is sorted. More... | |
epu8 | HPCombi::sorted (epu8 a) noexcept |
Return a sorted HPCombi::epu8. More... | |
epu8 | HPCombi::sorted8 (epu8 a) noexcept |
Return a HPCombi::epu8 with the two half sorted. More... | |
epu8 | HPCombi::revsorted (epu8 a) noexcept |
Return a reverse sorted HPCombi::epu8. More... | |
epu8 | HPCombi::revsorted8 (epu8 a) noexcept |
Return a HPCombi::epu8 with the two half reverse sorted. More... | |
epu8 | HPCombi::sort_perm (epu8 &a) noexcept |
Sort this and return the sorting permutation. More... | |
epu8 | HPCombi::sort8_perm (epu8 &a) noexcept |
Sort this and return the sorting permutation. More... | |
void | HPCombi::merge_rev (epu8 &a, epu8 &b) noexcept |
void | HPCombi::merge (epu8 &a, epu8 &b) noexcept |
Merge two sorted epu8. More... | |
epu8 | HPCombi::random_epu8 (uint16_t bnd) |
A random HPCombi::epu8. More... | |
epu8 | HPCombi::remove_dups (epu8 a, uint8_t repl=0) noexcept |
Remove duplicates in a sorted HPCombi::epu8. More... | |
epu8 | HPCombi::permutation_of_ref (epu8 a, epu8 b) noexcept |
Find if a vector is a permutation of one other. More... | |
epu8 | HPCombi::permutation_of (epu8 a, epu8 b) noexcept |
Find if a vector is a permutation of one other. More... | |
uint8_t | HPCombi::horiz_sum_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_sum3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_sums_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_sums_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_sums_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_max3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_max_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_max_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_max_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | HPCombi::horiz_min3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_min_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_min_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::partial_min_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_ref (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_arr (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_gen (epu8 v) noexcept |
epu8 | HPCombi::eval16_cycle (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::eval16_popcount (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | HPCombi::popcount16 (epu8 v) noexcept |
a vector popcount function More... | |
bool | HPCombi::is_partial_transformation (epu8 v, const size_t k=16) noexcept |
Test for partial transformation. More... | |
bool | HPCombi::is_transformation (epu8 v, const size_t k=16) noexcept |
Test for transformation. More... | |
bool | HPCombi::is_partial_permutation (epu8 v, const size_t k=16) noexcept |
Test for partial permutations. More... | |
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. More... | |
constexpr std::array< epu8, 6 > | HPCombi::sorting_rounds8 |
A duplicated 8-way sorting network. More... | |
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. More... | |
constexpr std::array< epu8, 4 > | HPCombi::mining_rounds |
#define FF 0xff | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
▼ examples | |
CF.cpp | |
image.cpp | |
pattern.cpp | |
RD.cpp | |
Renner.cpp | |
stringmonoid.cpp | Example of how to use HPCombi::pow with HPCombi::power_helper::Monoid |
timer.h | |
Trans.cpp | |
▼ include | |
▼ hpcombi | |
arch.hpp | |
bmat8.hpp | |
bmat8_impl.hpp | |
builder.hpp | |
debug.hpp | |
epu8.hpp | |
epu8_impl.hpp | |
hpcombi.hpp | |
perm16.hpp | |
perm16_impl.hpp | |
perm_generic.hpp | |
perm_generic_impl.hpp | |
power.hpp | Generic compile time power |
vect16.hpp | |
vect_generic.hpp |
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include "bmat8.hpp"
#include "debug.hpp"
#include "epu8.hpp"
#include "perm16.hpp"
#include "perm_generic.hpp"
#include "power.hpp"
#include "vect16.hpp"
#include "vect_generic.hpp"
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
#include <array>
#include <cassert>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "hpcombi/perm16.hpp"
#include "timer.h"
+Functions | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, const std::vector< T > &v) |
int | main () |
+Variables | |
const Transf16 | a1 {1, 7, 2, 6, 0, 4, 1, 5} |
const Transf16 | a2 {2, 4, 6, 1, 4, 5, 2, 7} |
const Transf16 | a3 {3, 0, 7, 2, 4, 6, 2, 4} |
const Transf16 | a4 {3, 2, 3, 4, 5, 3, 0, 1} |
const Transf16 | a5 {4, 3, 7, 7, 4, 5, 0, 4} |
const Transf16 | a6 {5, 6, 3, 0, 3, 0, 5, 1} |
const Transf16 | a7 {6, 0, 1, 1, 1, 6, 3, 4} |
const Transf16 | a8 {7, 7, 4, 0, 6, 4, 1, 7} |
const array< Transf16, 8 > | gens {{a1, a2, a3, a4, a5, a6, a7, a8}} |
std::array< std::tuple< uint16_t, uint16_t, std::array< uint16_t, gens.size()> >, 65536 > | res |
int main | +( | +) | ++ |
std::ostream& operator<< | +( | +std::ostream & | +out, | +
+ | + | const std::vector< T > & | +v | +
+ | ) | ++ |
const Transf16 a1 {1, 7, 2, 6, 0, 4, 1, 5} | +
const Transf16 a2 {2, 4, 6, 1, 4, 5, 2, 7} | +
const Transf16 a3 {3, 0, 7, 2, 4, 6, 2, 4} | +
const Transf16 a4 {3, 2, 3, 4, 5, 3, 0, 1} | +
const Transf16 a5 {4, 3, 7, 7, 4, 5, 0, 4} | +
const Transf16 a6 {5, 6, 3, 0, 3, 0, 5, 1} | +
const Transf16 a7 {6, 0, 1, 1, 1, 6, 3, 4} | +
const Transf16 a8 {7, 7, 4, 0, 6, 4, 1, 7} | +
std::array<std::tuple<uint16_t, uint16_t, std::array<uint16_t, gens.size()> >, 65536> res | +
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
High Performance Combinatorics in C++ using vector instructions v0.0.8
+SSE and AVX instruction sets allows for very fast manipulation of combinatorial objects such as transformations, permutations, boolean matrices of small size. The goal of this project is to implement various new algorithms and benchmark them on various compiler and architecture.
+
+ HPCombi
+
+ High Performance Combinatorics in C++ using vector instructions v0.0.6
+ |
+
+Namespaces | |
detail | |
power_helper | |
+Classes | |
class | BMat8 |
Class for fast boolean matrices of dimension up to 8 x 8. More... | |
struct | TPUBuild |
Class for factory object associated to a SIMD packed unsigned integers. More... | |
struct | PTransf16 |
Partial transformation of \(\{0\dots 15\}\). More... | |
struct | Transf16 |
Full transformation of \(\{0\dots 15\}\). More... | |
struct | PPerm16 |
Partial permutation of \(\{0, \dots, 15\}\). More... | |
struct | Perm16 |
Permutations of \(\{0\dots 15\}\). More... | |
struct | PermGeneric |
struct | Vect16 |
struct | VectGeneric |
A generic class for combinatorial integer vectors. More... | |
+Typedefs | |
using | epu64 = uint64_t __attribute__((__vector_size__(16), __may_alias__)) |
using | epu8 = uint8_t __attribute__((vector_size(16))) |
SIMD vector of 16 unsigned bytes. More... | |
+Functions | |
template<class TPU > | |
TPUBuild< TPU >::array & | as_array (TPU &v) noexcept |
Cast a TPU to a c++ std::array . More... | |
template<class TPU > | |
const TPUBuild< TPU >::array & | as_array (const TPU &v) noexcept |
Cast a constant TPU to a constant c++ std::array . More... | |
template<class TPU > | |
VectGeneric< TPUBuild< TPU >::size > & | as_VectGeneric (TPU &v) |
Cast a HPCombi::epu8 to a c++ HPCombi::VectGeneric. More... | |
template<class TPU > | |
const VectGeneric< TPUBuild< TPU >::size > & | as_VectGeneric (const TPU &v) |
Cast a HPCombi::epu8 to a c++ HPCombi::VectGeneric. More... | |
constexpr uint8_t | operator""_u8 (unsigned long long arg) noexcept |
Unsigned 8 bits int constant. More... | |
bool | is_all_zero (epu8 a) noexcept |
Test whether all the entries of a HPCombi::epu8 are zero. More... | |
bool | is_all_one (epu8 a) noexcept |
Test whether all the entries of a HPCombi::epu8 are one. More... | |
bool | equal (epu8 a, epu8 b) noexcept |
Equality of HPCombi::epu8. More... | |
bool | not_equal (epu8 a, epu8 b) noexcept |
Non equality of HPCombi::epu8. More... | |
epu8 | permuted_ref (epu8 a, epu8 b) noexcept |
Permuting a HPCombi::epu8. More... | |
epu8 | permuted (epu8 a, epu8 b) noexcept |
Permuting a HPCombi::epu8. More... | |
epu8 | shifted_right (epu8 a) noexcept |
Left shifted of a HPCombi::epu8 inserting a 0. More... | |
epu8 | shifted_left (epu8 a) noexcept |
Right shifted of a HPCombi::epu8 inserting a 0. More... | |
epu8 | reverted (epu8 a) noexcept |
Reverting a HPCombi::epu8. More... | |
epu8 | min (epu8 a, epu8 b) noexcept |
Vector min between two HPCombi::epu8 0. More... | |
epu8 | max (epu8 a, epu8 b) noexcept |
Vector max between two HPCombi::epu8 0. More... | |
bool | is_sorted (epu8 a) noexcept |
Testing if a HPCombi::epu8 is sorted. More... | |
epu8 | sorted (epu8 a) noexcept |
Return a sorted HPCombi::epu8. More... | |
epu8 | sorted8 (epu8 a) noexcept |
Return a HPCombi::epu8 with the two half sorted. More... | |
epu8 | revsorted (epu8 a) noexcept |
Return a reverse sorted HPCombi::epu8. More... | |
epu8 | revsorted8 (epu8 a) noexcept |
Return a HPCombi::epu8 with the two half reverse sorted. More... | |
epu8 | sort_perm (epu8 &a) noexcept |
Sort this and return the sorting permutation. More... | |
epu8 | sort8_perm (epu8 &a) noexcept |
Sort this and return the sorting permutation. More... | |
void | merge (epu8 &a, epu8 &b) noexcept |
Merge two sorted epu8. More... | |
epu8 | permutation_of_ref (epu8 a, epu8 b) noexcept |
Find if a vector is a permutation of one other. More... | |
epu8 | permutation_of (epu8 a, epu8 b) noexcept |
Find if a vector is a permutation of one other. More... | |
epu8 | random_epu8 (uint16_t bnd) |
A random HPCombi::epu8. More... | |
epu8 | remove_dups (epu8 a, uint8_t repl=0) noexcept |
Remove duplicates in a sorted HPCombi::epu8. More... | |
uint8_t | horiz_sum_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_sum_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_sum4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_sum3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_sum (epu8 v) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | partial_sums_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_sums_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_sums_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_sums (epu8 v) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
uint8_t | horiz_max_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_max_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_max4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_max3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_max (epu8 v) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | partial_max_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_max_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_max_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_max (epu8 v) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
uint8_t | horiz_min_ref (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_min_gen (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_min4 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_min3 (epu8) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
uint8_t | horiz_min (epu8 v) noexcept |
Horizontal sum of a HPCombi::epu8. More... | |
epu8 | partial_min_ref (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_min_gen (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_min_round (epu8) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | partial_min (epu8 v) noexcept |
Horizontal partial sum of a HPCombi::epu8. More... | |
epu8 | eval16_ref (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | eval16_arr (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | eval16_cycle (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | eval16_popcount (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
epu8 | eval16 (epu8 v) noexcept |
Evaluation of a HPCombi::epu8. More... | |
uint64_t | first_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept |
The first difference between two HPCombi::epu8. More... | |
uint64_t | first_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept |
The first difference between two HPCombi::epu8. More... | |
uint64_t | first_diff (epu8 a, epu8 b, size_t bound=16) noexcept |
The first difference between two HPCombi::epu8. More... | |
uint64_t | last_diff_ref (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
uint64_t | last_diff_mask (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
uint64_t | last_diff (epu8 a, epu8 b, size_t bound=16) noexcept |
The last difference between two HPCombi::epu8. More... | |
bool | less (epu8 a, epu8 b) noexcept |
Lexicographic comparison between two HPCombi::epu8. More... | |
int8_t | less_partial (epu8 a, epu8 b, int k) noexcept |
Partial lexicographic comparison between two HPCombi::epu8. More... | |
uint64_t | 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. More... | |
uint64_t | 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. More... | |
uint64_t | 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. More... | |
uint64_t | 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. More... | |
epu8 | popcount16 (epu8 v) noexcept |
a vector popcount function More... | |
bool | is_partial_transformation (epu8 v, const size_t k=16) noexcept |
Test for partial transformation. More... | |
bool | is_transformation (epu8 v, const size_t k=16) noexcept |
Test for transformation. More... | |
bool | is_partial_permutation (epu8 v, const size_t k=16) noexcept |
Test for partial permutations. More... | |
bool | is_permutation_sort (epu8 v, const size_t k=16) noexcept |
bool | is_permutation_eval (epu8 v, const size_t k=16) noexcept |
bool | is_permutation (epu8 v, const size_t k=16) noexcept |
uint64_t | first_mask (epu8 msk, size_t bound) |
uint64_t | last_mask (epu8 msk, size_t bound) |
template<bool Increasing = true, size_t sz> | |
epu8 | network_sort (epu8 res, std::array< epu8, sz > rounds) |
Apply a sorting network. More... | |
template<bool Increasing = true, size_t sz> | |
epu8 | network_sort_perm (epu8 &v, std::array< epu8, sz > rounds) |
Apply a sorting network in place and return the permutation. More... | |
void | merge_rev (epu8 &a, epu8 &b) noexcept |
epu8 | eval16_gen (epu8 v) noexcept |
template<typename T , typename M = power_helper::Monoid<T>> | |
const T | square (const T x) |
A generic compile time squaring function. More... | |
template<unsigned exp, typename T , typename M = power_helper::Monoid<T>> | |
const T | pow (const T x) |
A generic compile time exponentiation function. More... | |
template<size_t Size, typename Expo = uint8_t> | |
std::array< Expo, Size > | sorted_vect (std::array< Expo, Size > v) |
+Variables | |
constexpr std::array< epu8, 4 > | masks |
constexpr TPUBuild< epu8 > | Epu8 {} |
Factory object acting as a class constructor for type HPCombi::epu8. More... | |
constexpr uint64_t | prime = 0x9e3779b97f4a7bb9 |
A prime number good for hashing. More... | |
constexpr std::array< epu8, 9 > | sorting_rounds |
A 16-way sorting network. More... | |
constexpr std::array< epu8, 6 > | sorting_rounds8 |
A duplicated 8-way sorting network. More... | |
constexpr std::array< epu8, 6 > | merge_rounds |
constexpr std::array< epu8, 3 > | inverting_rounds |
constexpr std::array< epu8, 4 > | summing_rounds |
Permutation Round for partial and horizontal sums. More... | |
constexpr std::array< epu8, 4 > | mining_rounds |
using HPCombi::epu64 = typedef uint64_t __attribute__((__vector_size__(16), __may_alias__)) | +
using HPCombi::epu8 = typedef uint8_t __attribute__((vector_size(16))) | +
SIMD vector of 16 unsigned bytes.
+ +
+
|
+ +inlinenoexcept | +
Cast a constant TPU to a constant c++ std::array
.
This is usually faster for algorithm using a lot of indexed access.
+ +
+
|
+ +inlinenoexcept | +
Cast a TPU to a c++ std::array
.
This is usually faster for algorithm using a lot of indexed access.
+ +
+
|
+ +inline | +
Cast a HPCombi::epu8 to a c++ HPCombi::VectGeneric.
+This is usually faster for algorithm using a lot of indexed access.
+ +
+
|
+ +inline | +
Cast a HPCombi::epu8 to a c++ HPCombi::VectGeneric.
+This is usually faster for algorithm using a lot of indexed access.
+ +
+
|
+ +inlinenoexcept | +
Equality of HPCombi::epu8.
+ +Evaluation of a HPCombi::epu8.
+v | : a HPCombi::epu8 |
r
such that r
[i] is the number of occurrence of i
in the input v
{ 1, 1, 2, 1, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 1}
Evaluation of a HPCombi::epu8.
+v | : a HPCombi::epu8 |
r
such that r
[i] is the number of occurrence of i
in the input v
{ 1, 1, 2, 1, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 1}
Evaluation of a HPCombi::epu8.
+v | : a HPCombi::epu8 |
r
such that r
[i] is the number of occurrence of i
in the input v
{ 1, 1, 2, 1, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 1}
Evaluation of a HPCombi::epu8.
+v | : a HPCombi::epu8 |
r
such that r
[i] is the number of occurrence of i
in the input v
{ 1, 1, 2, 1, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 1}
Evaluation of a HPCombi::epu8.
+v | : a HPCombi::epu8 |
r
such that r
[i] is the number of occurrence of i
in the input v
{ 1, 1, 2, 1, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 1}
+
|
+ +inlinenoexcept | +
The first difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. first_diff(a, b)
returns 3
, first_diff(a, b, 3)
returns 16
, first_diff(a, b, 4)
returns 3
, first_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+
|
+ +inlinenoexcept | +
The first difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. first_diff(a, b)
returns 3
, first_diff(a, b, 3)
returns 16
, first_diff(a, b, 4)
returns 3
, first_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+
|
+ +inlinenoexcept | +
The first difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. first_diff(a, b)
returns 3
, first_diff(a, b, 3)
returns 16
, first_diff(a, b, 4)
returns 3
, first_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+
|
+ +inline | +
+
|
+ +inlinenoexcept | +
return the index of the first non zero entry or 16 if there are none Only index smaller than bound are taken into account.
+ +
+
|
+ +inlinenoexcept | +
return the index of the first zero entry or 16 if there are none Only index smaller than bound are taken into account.
+ +
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+12
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+12
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+12
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+12
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+12
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+1
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+1
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+1
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+1
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+1
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+110
uint8_t
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+110
uint8_t
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+110
uint8_t
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+110
uint8_t
+
|
+ +inlinenoexcept | +
Horizontal sum of a HPCombi::epu8.
+110
uint8_t
+
|
+ +inlinenoexcept | +
Test whether all the entries of a HPCombi::epu8 are one.
+ +
+
|
+ +inlinenoexcept | +
Test whether all the entries of a HPCombi::epu8 are zero.
+ +
+
|
+ +inlinenoexcept | +
Test for partial permutations.
+*this
is a partial permutation. v | the vector to test |
k | the size of *this (default 16) |
Points where the function is undefined are mapped to 0xff
. If *this
is a partial permutation of \(0\dots n-1\) for \(n<16\), it should be completed to a partial permutation of \(0\dots 15\) by adding fixed points. That is the values \(i\geq n\) should be mapped to themself.
+
|
+ +inlinenoexcept | +
Test for partial transformation.
+v
is a partial transformation. v | the vector to test |
k | the size of *this (default 16) |
Points where the function is undefined are mapped to 0xff
. If *this
is a transformation of \(0\dots n-1\) for \(n<16\), it should be completed to a transformation of \(0\dots 15\) by adding fixed points. That is the values \(i\geq n\) should be mapped to themself.
+
|
+ +inlinenoexcept | +
*this
is a permutation. v | the vector to test |
k | the size of *this (default 16) |
If *this
is a permutation of \(0\dots n-1\) for \(n<16\), it should be completed to a permutation of \(0\dots 15\) by adding fixed points. That is the values \(i\geq n\) should be mapped to themself.
+
|
+ +inlinenoexcept | +
*this
is a permutation. v | the vector to test |
k | the size of *this (default 16) |
If *this
is a permutation of \(0\dots n-1\) for \(n<16\), it should be completed to a permutation of \(0\dots 15\) by adding fixed points. That is the values \(i\geq n\) should be mapped to themself.
+
|
+ +inlinenoexcept | +
*this
is a permutation. v | the vector to test |
k | the size of *this (default 16) |
If *this
is a permutation of \(0\dots n-1\) for \(n<16\), it should be completed to a permutation of \(0\dots 15\) by adding fixed points. That is the values \(i\geq n\) should be mapped to themself.
+
|
+ +inlinenoexcept | +
Testing if a HPCombi::epu8 is sorted.
+ +
+
|
+ +inlinenoexcept | +
Test for transformation.
+*this
is a transformation. v | the vector to test |
k | the size of *this (default 16) |
If *this
is a transformation of \(0\dots n-1\) for \(n<16\), it should be completed to a transformation of \(0\dots 15\) by adding fixed points. That is the values \(i\geq n\) should be mapped to themself.
+
|
+ +inlinenoexcept | +
The last difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. last_diff(a, b)
returns 11
, last_diff(a, b, 3)
returns 16
, last_diff(a, b, 4)
returns 3
, last_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+
|
+ +inlinenoexcept | +
The last difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. last_diff(a, b)
returns 11
, last_diff(a, b, 3)
returns 16
, last_diff(a, b, 4)
returns 3
, last_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+
|
+ +inlinenoexcept | +
The last difference between two HPCombi::epu8.
+a,b | : two HPCombi::epu8 |
bound | : a size_t |
a
[i] and b
[i] differ, 16 if there is no differences before bound. last_diff(a, b)
returns 11
, last_diff(a, b, 3)
returns 16
, last_diff(a, b, 4)
returns 3
, last_diff(a, b, 7)
returns 3
. bound
is assumed to be smaller or equal than 16
+
|
+ +inline | +
+
|
+ +inlinenoexcept | +
return the index of the last non zero entry or 16 if there are none Only index smaller than bound are taken into account.
+ +
+
|
+ +inlinenoexcept | +
return the index of the last zero entry or 16 if there are none Only index smaller than bound are taken into account.
+ +
+
|
+ +inlinenoexcept | +
Lexicographic comparison between two HPCombi::epu8.
+ +
+
|
+ +inlinenoexcept | +
Partial lexicographic comparison between two HPCombi::epu8.
+a,b | : the vectors to compare |
k | : the bound for the lexicographic comparison |
+
|
+ +inlinenoexcept | +
Vector max between two HPCombi::epu8 0.
+ +
+
|
+ +inlinenoexcept | +
Merge two sorted epu8.
+a,b | two HPCombi::epu8 |
a
and are
sorted a
[15] <= b
[0]
+
|
+ +inlinenoexcept | +
+
|
+ +inlinenoexcept | +
Vector min between two HPCombi::epu8 0.
+ +
+
|
+ +inline | +
Apply a sorting network.
+ +
+
|
+ +inline | +
Apply a sorting network in place and return the permutation.
+ +
+
|
+ +inlinenoexcept | +
Non equality of HPCombi::epu8.
+ +
+
|
+ +inlineconstexprnoexcept | +
Unsigned 8 bits int constant.
+ +Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 5, 5, 5, 6,12,12,12,12,12,12,12,13,14,15}
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 5, 5, 5, 6,12,12,12,12,12,12,12,13,14,15}
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 5, 5, 5, 6,12,12,12,12,12,12,12,13,14,15}
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 5, 5, 5, 6,12,12,12,12,12,12,12,13,14,15}
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}
Horizontal partial sum of a HPCombi::epu8.
+{ 5, 5, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}
Horizontal partial sum of a HPCombi::epu8.
+{ 5,10,12,17,18,24,36,40,40,43,45,56,68,81,95,110}
Horizontal partial sum of a HPCombi::epu8.
+{ 5,10,12,17,18,24,36,40,40,43,45,56,68,81,95,110}
Horizontal partial sum of a HPCombi::epu8.
+{ 5,10,12,17,18,24,36,40,40,43,45,56,68,81,95,110}
Horizontal partial sum of a HPCombi::epu8.
+{ 5,10,12,17,18,24,36,40,40,43,45,56,68,81,95,110}
+
|
+ +inlinenoexcept | +
Find if a vector is a permutation of one other.
+a,b | two HPCombi::epu8 |
res
[i] is the position in a
of b
[i] if b
[i] appears exactly once in a
, or undefined if not.
+
|
+ +inlinenoexcept | +
Find if a vector is a permutation of one other.
+a,b | two HPCombi::epu8 |
res
[i] is the position in a
of b
[i] if b
[i] appears exactly once in a
, or undefined if not.
+
|
+ +inlinenoexcept | +
Permuting a HPCombi::epu8.
+ +
+
|
+ +inlinenoexcept | +
Permuting a HPCombi::epu8.
+Implementation part for inline functions //////////////////////////////////.
+Permuting a HPCombi::epu8
+ +a vector popcount function
+ +const T HPCombi::pow | +( | +const T | +x | ) | ++ |
A generic compile time exponentiation function.
+exp | the power |
x | the number to exponentiate |
Raise x to the exponent exp where exp is known at compile time. We use the classical recursive binary algorithm, but the recursion is unfolded and optimized at compile time giving an assembly code which is just a sequence of multiplication.
+To use for a specific type the user should pass a Monoid structure (see below) as third parameter to the template. Alternatively a default monoid structure can be defined for a given type by specializing the template struct HPCombi::power_helper::Monoid
+ +
+
|
+ +inline | +
A random HPCombi::epu8.
+bnd | : the upper bound for the value of the entries. bnd must verify \( 0 < bnd \leq 256 \). This is not checked. |
+
|
+ +inlinenoexcept | +
Remove duplicates in a sorted HPCombi::epu8.
+a | supposed to be sorted |
repl | the value replacing the duplicate entries (default to 0) |
a
where repeated occurrences of entries are replaced by repl
Reverting a HPCombi::epu8.
+ +Return a reverse sorted HPCombi::epu8.
+Return a HPCombi::epu8 with the two half reverse sorted.
+Right shifted of a HPCombi::epu8 inserting a 0.
+Left shifted of a HPCombi::epu8 inserting a 0.
+Sort this
and return the sorting permutation.
Sort this
and return the sorting permutation.
Return a sorted HPCombi::epu8.
+Return a HPCombi::epu8 with the two half sorted.
+std::array<Expo, Size> HPCombi::sorted_vect | +( | +std::array< Expo, Size > | +v | ) | ++ |
const T HPCombi::square | +( | +const T | +x | ) | ++ |
A generic compile time squaring function.
+x | the number to square |
To use for a specific type the user should pass a monoid structure as second parameter to the template. Alternatively a default monoid structure can be defined for a given type by specializing the template struct HPCombi::power_helper::Monoid
+ +Factory object acting as a class constructor for type HPCombi::epu8.
+see HPCombi::TPUBuild for usage and capability
+ +
+
|
+ +constexpr | +
+
|
+ +constexpr | +
+
|
+ +constexpr | +
+
|
+ +constexpr | +
+
|
+ +constexpr | +
A prime number good for hashing.
+ +
+
|
+ +constexpr | +
A 16-way sorting network.
+Sorting network from Knuth [AoCP3] Fig. 51 p 229. used by the sorted function
+[AoCP3]: "D. Knuth, The art of computer programming vol. 3"
+ +
+
|
+ +constexpr | +
A duplicated 8-way sorting network.
+Batcher odd-Even mergesort sorting network used by the sorted function
+odd–even mergesort"
+ +
+
|
+ +constexpr | +
Permutation Round for partial and horizontal sums.
+ +