Template Struct project2nd¶
Defined in File functional.h
Struct Documentation¶
-
template<typename
T1
, typenameT2
>
structproject2nd
¶ 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 <thrust/functional.h> #include <assert.h> ... int x = 137; int y = -137; thrust::project2nd<int> pj2; assert(y == pj2(x,y));
- See
- See
- See
Public Types
-
typedef
first_argument_type
¶ The type of the function object’s first argument.
-
typedef
second_argument_type
¶ The type of the function object’s second argument.
-
typedef
result_type
¶ The type of the function object’s result;.
Public Functions
-
__host__ __device__ const T2& thrust::project2nd::operator()(const T1 &, const T2 & rhs) const
Function call operator. The return value is
rhs
.