thrust
Classes | Functions

Classes

struct  thrust::pair< T1, T2 >
 
struct  thrust::tuple_element< N, T >
 
struct  thrust::tuple_size< Pair >
 

Functions

template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator== (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator< (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator!= (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator> (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator<= (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator>= (const pair< T1, T2 > &x, const pair< T1, T2 > &y)
 
template<typename T1 , typename T2 >
__host__ __device__ void thrust::swap (pair< T1, T2 > &x, pair< T1, T2 > &y)
 
template<typename T1 , typename T2 >
__host__ __device__ pair< T1, T2 > thrust::make_pair (T1 x, T2 y)
 

Detailed Description

Function Documentation

template<typename T1 , typename T2 >
__host__ __device__ pair<T1,T2> thrust::make_pair ( T1  x,
T2  y 
)
inline

This convenience function creates a pair from two objects.

Parameters
xThe first object to copy from.
yThe second object to copy from.
Returns
A newly-constructed pair copied from a and b.
Template Parameters
T1There are no requirements on the type of T1.
T2There are no requirements on the type of T2.
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator!= ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline

This operator tests two pairs for inequality.

Parameters
xThe first pair to compare.
yThe second pair to compare.
Returns
true if and only if !(x == y).
Template Parameters
T1is a model of Equality Comparable.
T2is a model of Equality Comparable.
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator< ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline

This operator tests two pairs for ascending ordering.

Parameters
xThe first pair to compare.
yThe second pair to compare.
Returns
true if and only if x.first < y.first || (!(y.first < x.first) && x.second < y.second).
Template Parameters
T1is a model of LessThan Comparable.
T2is a model of LessThan Comparable.
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator<= ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline

This operator tests two pairs for ascending ordering or equivalence.

Parameters
xThe first pair to compare.
yThe second pair to compare.
Returns
true if and only if !(y < x).
Template Parameters
T1is a model of LessThan Comparable.
T2is a model of LessThan Comparable.
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator== ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline

This operator tests two pairs for equality.

Parameters
xThe first pair to compare.
yThe second pair to compare.
Returns
true if and only if x.first == y.first && x.second == y.second.
Template Parameters
T1is a model of Equality Comparable.
T2is a model of Equality Comparable.
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator> ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline

This operator tests two pairs for descending ordering.

Parameters
xThe first pair to compare.
yThe second pair to compare.
Returns
true if and only if y < x.
Template Parameters
T1is a model of LessThan Comparable.
T2is a model of LessThan Comparable.
template<typename T1 , typename T2 >
__host__ __device__ bool thrust::operator>= ( const pair< T1, T2 > &  x,
const pair< T1, T2 > &  y 
)
inline

This operator tests two pairs for descending ordering or equivalence.

Parameters
xThe first pair to compare.
yThe second pair to compare.
Returns
true if and only if !(x < y).
Template Parameters
T1is a model of LessThan Comparable.
T2is a model of LessThan Comparable.
template<typename T1 , typename T2 >
__host__ __device__ void thrust::swap ( pair< T1, T2 > &  x,
pair< T1, T2 > &  y 
)
inline

swap swaps the contents of two pairs.

Parameters
xThe first pair to swap.
yThe second pair to swap.