Template Struct project1st¶
Defined in File functional.h
Struct Documentation¶
-
template<typename
T1
, typenameT2
>
structproject1st
¶ project1st
is a function object that takes two arguments and returns its first argument; the second 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::project1st<int> pj1; assert(x == pj1(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 T1& thrust::project1st::operator()(const T1 & lhs, const T2 &) const
Function call operator. The return value is
lhs
.