Tuple class like std::tuple
but suitable for use with offloading devices like GPUs.
More...
#include <Tuple.hpp>
|
constexpr | Tuple ()=default |
|
constexpr | Tuple (FirstElement first, RestElements... rest) |
| Construct a tuple from values of the same types as the tuple stores. More...
|
|
template<typename T , typename... Ts, std::enable_if_t< sizeof...(RestElements)==sizeof...(Ts) &&std::is_constructible_v< FirstElement, T > &&(std::is_constructible_v< RestElements, Ts > &&...), int > = 0> |
constexpr | Tuple (T &&firstArg, Ts &&... restArgs) |
| Construct a tuple from forwarded values of potentially different types as the tuple stores. More...
|
|
constexpr auto | first () -> decltype(auto) |
| Returns the first element of the tuple. More...
|
|
constexpr auto | first () const -> decltype(auto) |
| Returns the first element of the tuple. More...
|
|
constexpr auto | rest () -> RestTuple & |
| Returns a tuple of all but the first element. More...
|
|
constexpr auto | rest () const -> const RestTuple & |
| Returns a tuple of all but the first element. More...
|
|
constexpr auto | value () -> TFirstElement & |
|
constexpr auto | value () const -> const TFirstElement & |
|
template<typename TFirstElement, typename... RestElements>
struct llama::Tuple< TFirstElement, RestElements... >
Tuple class like std::tuple
but suitable for use with offloading devices like GPUs.
Definition at line 54 of file Tuple.hpp.
◆ FirstElement
template<typename TFirstElement , typename... RestElements>
◆ RestTuple
template<typename TFirstElement , typename... RestElements>
◆ Tuple() [1/3]
template<typename TFirstElement , typename... RestElements>
◆ Tuple() [2/3]
template<typename TFirstElement , typename... RestElements>
Construct a tuple from values of the same types as the tuple stores.
Definition at line 68 of file Tuple.hpp.
◆ Tuple() [3/3]
template<typename TFirstElement , typename... RestElements>
template<typename T , typename... Ts, std::enable_if_t< sizeof...(RestElements)==sizeof...(Ts) &&std::is_constructible_v< FirstElement, T > &&(std::is_constructible_v< RestElements, Ts > &&...), int > = 0>
constexpr llama::Tuple< TFirstElement, RestElements... >::Tuple |
( |
T && |
firstArg, |
|
|
Ts &&... |
restArgs |
|
) |
| |
|
inlineexplicitconstexpr |
Construct a tuple from forwarded values of potentially different types as the tuple stores.
Definition at line 84 of file Tuple.hpp.
◆ first() [1/2]
template<typename TFirstElement , typename... RestElements>
constexpr auto llama::Tuple< TFirstElement, RestElements... >::first |
( |
| ) |
-> decltype(auto)
|
|
inlineconstexpr |
Returns the first element of the tuple.
Definition at line 91 of file Tuple.hpp.
◆ first() [2/2]
template<typename TFirstElement , typename... RestElements>
constexpr auto llama::Tuple< TFirstElement, RestElements... >::first |
( |
| ) |
const -> decltype(auto)
|
|
inlineconstexpr |
Returns the first element of the tuple.
Definition at line 97 of file Tuple.hpp.
◆ rest() [1/2]
template<typename TFirstElement , typename... RestElements>
Returns a tuple of all but the first element.
Definition at line 103 of file Tuple.hpp.
◆ rest() [2/2]
template<typename TFirstElement , typename... RestElements>
Returns a tuple of all but the first element.
Definition at line 109 of file Tuple.hpp.
The documentation for this struct was generated from the following file:
- /home/runner/work/llama/llama/include/llama/Tuple.hpp