|
HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.3
|
Given a transformation from 0..15 → 0..15, build at compile-time the array representing the transformation. More...
#include <builder.hpp>
Public Types | |
| using | type_elem = typename std::remove_reference_t<decltype((TPU{})[0])> |
| Type of the elements. | |
| using | array = std::array<type_elem, size> |
| Array equivalent type. | |
Public Member Functions | |
| constexpr TPU | operator() (std::initializer_list< type_elem > il, type_elem def) const |
Construct a TPU from an std::initializer_list and a default value. | |
| template<class Fun> | |
| constexpr TPU | operator() (Fun f) const |
| Construct a TPU from a function giving the values at \(1,2,\dots\). | |
| constexpr TPU | operator() (type_elem c) const |
| Construct a constant TPU. | |
| constexpr TPU | operator() (int c) const |
| explicit overloading for int constants | |
| constexpr TPU | operator() (size_t c) const |
| explicit overloading for size_t constants | |
| constexpr TPU | operator() (array a) const |
| explicit overloading for array | |
| constexpr TPU | id () const |
Return the identity element of type TPU. | |
| constexpr TPU | rev () const |
Return the reversed element of type TPU. | |
| constexpr TPU | left_cycle () const |
Left cycle TPU permutation. | |
| constexpr TPU | right_cycle () const |
Right cycle TPU permutation. | |
| constexpr TPU | left_dup () const |
Left shift TPU, duplicating the rightmost entry. | |
| constexpr TPU | right_dup () const |
Right shift TPU, duplicating the leftmost entry. | |
| constexpr TPU | popcount () const |
Popcount TPU: the ith entry contains the number of bits set in i. | |
Static Public Member Functions | |
| template<class Fun, decltype(size)... Is> | |
| static constexpr TPU | make_helper (Fun f, std::index_sequence< Is... >) |
Static Public Attributes | |
| static constexpr size_t | size_elem = sizeof(type_elem) |
| Size of the elements. | |
| static constexpr size_t | size = sizeof(TPU) / size_elem |
| Number of elements. | |
Given a transformation from 0..15 → 0..15, build at compile-time the array representing the transformation.
Class for factory object associated to a SIMD packed unsigned integers. The main purpose of this class is to be able to construct in a constexpr way various instances of the TPU SIMD vector type. The behavior of an instance of TPUBuild<TPU> is designed to mimic the behavior of TPU if it where a class:
operator() on an instance which acts similarly to a class constructor,| using HPCombi::TPUBuild< TPU >::array = std::array<type_elem, size> |
Array equivalent type.
| using HPCombi::TPUBuild< TPU >::type_elem = typename std::remove_reference_t<decltype((TPU{})[0])> |
Type of the elements.
|
inlineconstexpr |
Return the identity element of type TPU.
|
inlineconstexpr |
Left cycle TPU permutation.
|
inlineconstexpr |
Left shift TPU, duplicating the rightmost entry.
|
inlinestaticconstexpr |
|
inlineconstexpr |
explicit overloading for array
|
inlineconstexpr |
Construct a TPU from a function giving the values at \(1,2,\dots\).
|
inlineconstexpr |
explicit overloading for int constants
|
inlineconstexpr |
explicit overloading for size_t constants
|
inlineconstexpr |
Construct a TPU from an std::initializer_list and a default value.
|
inlineconstexpr |
Construct a constant TPU.
|
inlineconstexpr |
Popcount TPU: the ith entry contains the number of bits set in i.
|
inlineconstexpr |
Return the reversed element of type TPU.
|
inlineconstexpr |
Right cycle TPU permutation.
|
inlineconstexpr |
Right shift TPU, duplicating the leftmost entry.
|
staticconstexpr |
Number of elements.
|
staticconstexpr |
Size of the elements.