thrust
Public Types | Public Member Functions | List of all members
thrust::project2nd< T1, T2 > Struct Template Reference

#include <thrust/functional.h>

Public Types

typedef T1 first_argument_type
 The type of the function object's first argument.
 
typedef T2 second_argument_type
 The type of the function object's second argument.
 
typedef T2 result_type
 The type of the function object's result;.
 

Public Member Functions

__host__ __device__ const T2 & operator() (const T1 &, const T2 &rhs) const
 

Detailed Description

template<typename T1, typename T2>
struct thrust::project2nd< T1, T2 >

project2nd is a function object that takes two arguments and returns its second argument; the first argument is unused. It is essentially a generalization of identity to the case of a Binary Function.

#include <assert.h>
...
int x = 137;
int y = -137;
assert(y == pj2(x,y));
See also
identity
project1st
binary_function

The documentation for this struct was generated from the following file: