|
constexpr | tuple ()=default |
| Default constructor.
|
|
constexpr | tuple (const tuple &)=default |
| Default copy constructor.
|
|
constexpr | tuple (tuple &&) noexcept=default |
| Default move constructor.
|
|
template<typename U , typename... Us, std::enable_if_t< vecmem::details::conjunction< std::is_constructible< T, std::decay_t< U > >, std::is_constructible< Ts, std::decay_t< Us > >... >::value, bool > = true> |
VECMEM_HOST_AND_DEVICE constexpr | tuple (const tuple< U, Us... > &parent) |
| Copy constructor.
|
|
template<typename U , typename... Us, std::enable_if_t< vecmem::details::conjunction< vecmem::details::negation< std::is_same< tuple< T, Ts... >, U > >, std::is_constructible< T, U && >, std::is_constructible< Ts, Us && >... >::value, bool > = true> |
VECMEM_HOST_AND_DEVICE constexpr | tuple (U &&head, Us &&... tail) |
| Main constructor, from a list of tuple elements.
|
|
template<typename U , typename... Us, std::enable_if_t< vecmem::details::conjunction< std::is_constructible< T, U && >, std::is_constructible< Ts, Us && >... >::value, bool > = true> |
VECMEM_HOST_AND_DEVICE constexpr | tuple (U &&head, tuple< Us... > &&tail) |
| "Concatenation" constructor
|
|
VECMEM_HOST_AND_DEVICE constexpr tuple & | operator= (const tuple &parent) |
| Assignment operator.
|
|
template<typename U , typename... Us, std::enable_if_t<(sizeof...(Ts)==sizeof...(Us)) &&vecmem::details::conjunction< std::is_assignable< T, U && >, std::is_assignable< Ts, Us && >... >::value, bool > = true> |
VECMEM_HOST_AND_DEVICE constexpr tuple & | operator= (const tuple< U, Us... > &parent) |
| Assignment operator from a (slightly) different tuple type.
|
|
template<
typename T, typename... Ts>
struct vecmem::tuple< T, Ts... >
Simple tuple implementation for the vecmem EDM classes.
The vecmem EDM classes require something analogous to std::tuple
, but that type is not officially supported by CUDA in device code. Worse yet, std::tuple
actively generates invalid code with nvcc
at the time of writing (up to CUDA 12.3.0).
This is a very simple implementation for a tuple type, which can do exactly as much as we need from it.
- Template Parameters
-
T | The first type to be stored in the tuple |
...Ts | The rest of the types to be stored in the tuple |