|
HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.1
|
Class for factory object associated to a SIMD packed unsigned integers. 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. | |
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,Array equivalent type.
Type of the elements.
Return the identity element of type TPU.
Left cycle TPU permutation.
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.
Popcount TPU: the ith entry contains the number of bits set in i.
Return the reversed element of type TPU.
Right cycle TPU permutation.
Right shift TPU, duplicating the leftmost entry.
Number of elements.
Size of the elements.