Thrust
Public Types | Public Member Functions | List of all members
thrust::project1st< 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 T1 result_type
 The type of the function object's result;.
 

Public Member Functions

__host__ __device__ constexpr const T1 & operator() (const T1 &lhs, const T2 &) const
 

Detailed Description

template<typename T1 = void, typename T2 = void>
struct thrust::project1st< T1, T2 >

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 <assert.h>
...
int x = 137;
int y = -137;
assert(x == pj1(x,y));
See also
identity
project2nd
binary_function

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