|
thrust
|
#include <functional.h>
Public Member Functions | |
| __host__ __device__ const T & | operator() (const T &x) const |
identity is a Unary Function that represents the identity function: it takes a single argument x, and returns x.
| T | No requirements on T. |
The following code snippet demonstrates that identity returns its argument.
#include <thrust/functional.h> #include <assert.h> ... int x = 137; thrust::identity<int> id; assert(x == id(x));
| __host__ __device__ const T& thrust::identity< T >::operator() | ( | const T & | x | ) | const [inline] |
Function call operator. The return value is x.
1.7.4