Thrust
|
tuple
is a class template that can be instantiated with up to ten arguments. Each template argument specifies the type of element in the tuple
. Consequently, tuples are heterogeneous, fixed-size collections of values. An instantiation of tuple
with two arguments is similar to an instantiation of pair
with the same two arguments. Individual elements of a tuple
may be accessed with the get
function.
More...
#include <thrust/tuple.h>
Public Member Functions | |
__host__ __device__ | tuple (void) |
__host__ __device__ | tuple (typename access_traits< T0 >::parameter_type t0) |
__host__ __device__ | tuple (typename access_traits< T0 >::parameter_type t0, typename access_traits< T1 >::parameter_type t1) |
template<class U1 , class U2 > | |
__thrust_exec_check_disable__ __host__ __device__ tuple & | operator= (const thrust::pair< U1, U2 > &k) |
__host__ __device__ void | swap (tuple &t) |
tuple
is a class template that can be instantiated with up to ten arguments. Each template argument specifies the type of element in the tuple
. Consequently, tuples are heterogeneous, fixed-size collections of values. An instantiation of tuple
with two arguments is similar to an instantiation of pair
with the same two arguments. Individual elements of a tuple
may be accessed with the get
function.
TN | The type of the N tuple element. Thrust's tuple type currently supports up to ten elements. |
The following code snippet demonstrates how to create a new tuple
object and inspect and modify the value of its elements.