HiPipe
0.7.0
C++17 data pipeline with Python bindings.
|
Classes | |
struct | hipipe::utility::variadic_find< T1, T2, Ts > |
Get the first index of a type in a variadic template list. More... | |
struct | hipipe::utility::maybe_tuple_impl< N, Ts > |
Wrap variadic template pack in a tuple if there is more than one type. More... | |
struct | hipipe::utility::tuple_contains< T, Tuple > |
Check whether a tuple contains a given type. More... | |
Typedefs | |
template<std::size_t Offset, std::size_t N> | |
using | hipipe::utility::make_offset_index_sequence = decltype(plus< Offset >(std::make_index_sequence< N >{})) |
Make std::index_sequence with the given offset. More... | |
Functions | |
template<std::size_t Value, std::size_t... Is> | |
constexpr std::index_sequence<(Value+Is)... > | hipipe::utility::plus (std::index_sequence< Is... >) |
Add a number to all values in std::index_sequence. More... | |
template<typename Tuple , typename Fun > | |
constexpr auto | hipipe::utility::tuple_for_each (Tuple &&tuple, Fun &&fun) |
Apply a function on each element of a tuple. More... | |
template<typename Tuple , typename Fun > | |
constexpr auto | hipipe::utility::tuple_transform (Tuple &&tuple, Fun &&fun) |
Transform each element of a tuple. More... | |
template<typename Tuple , size_t... Is> | |
std::ostream & | hipipe::utility::tuple_print (std::ostream &out, const Tuple &tuple, std::index_sequence< Is... >) |
Tuple pretty printing to std::ostream. | |
template<typename... Ts> | |
std::ostream & | hipipe::utility::operator<< (std::ostream &out, const std::tuple< Ts... > &tuple) |
Tuple pretty printing to std::ostream. | |
hipipe::utility::CPP_template (class Rng)(requires ranges | |
Unzips a range of tuples to a tuple of std::vectors. More... | |
template<bool Enable, typename RangeT > | |
decltype(auto) | hipipe::utility::unzip_if (RangeT &&range) |
Unzips a range of tuples to a tuple of ranges if a constexpr condition holds. More... | |
template<typename Tuple > | |
decltype(auto) | hipipe::utility::maybe_untuple (Tuple &&tuple) |
Extract a value from a tuple if the tuple contains only a single value. More... | |
template<std::size_t N, typename Fun > | |
constexpr Fun | hipipe::utility::times_with_index (Fun &&fun) |
Repeat a function N times in compile time. More... | |
template<typename Tuple , typename Fun > | |
constexpr auto | hipipe::utility::tuple_for_each_with_index (Tuple &&tuple, Fun &&fun) |
Similar to tuple_for_each(), but with index available. More... | |
template<typename Tuple , typename Fun > | |
constexpr auto | hipipe::utility::tuple_transform_with_index (Tuple &&tuple, Fun &&fun) |
Similar to tuple_transform(), but with index available. More... | |
using hipipe::utility::make_offset_index_sequence = typedef decltype(plus<Offset>(std::make_index_sequence<N>{})) |
hipipe::utility::CPP_template | ( | class Rng | ) |
Unzips a range of tuples to a tuple of std::vectors.
Specialization of unzip function for views.
Example:
decltype(auto) hipipe::utility::maybe_untuple | ( | Tuple && | tuple | ) |
Extract a value from a tuple if the tuple contains only a single value.
If the tuple contains zero or more than one element, this is an identity.
Example:
|
constexpr |
|
constexpr |
|
constexpr |
Apply a function on each element of a tuple.
The order of application is from the first to the last element.
Example:
|
constexpr |
Similar to tuple_for_each(), but with index available.
Example:
|
constexpr |
Transform each element of a tuple.
The order of application is unspecified.
Example:
|
constexpr |
Similar to tuple_transform(), but with index available.
Example:
decltype(auto) hipipe::utility::unzip_if | ( | RangeT && | range | ) |
Unzips a range of tuples to a tuple of ranges if a constexpr condition holds.
This method is enabled or disabled by its first template parameter. If disabled, it returns identity. If enabled, it returns the same thing as unzip() would return.
Example: