Thrust
|
#include <thrust/functional.h>
Public Types | |
typedef T | first_argument_type |
The type of the function object's first argument. | |
typedef T | second_argument_type |
The type of the function object's second argument. | |
typedef T | result_type |
The type of the function object's result;. | |
Public Member Functions | |
__thrust_exec_check_disable__ __host__ __device__ constexpr T | operator() (const T &lhs, const T &rhs) const |
maximum
is a function object that takes two arguments and returns the greater of the two. Specifically, it is an Adaptable Binary Function. If f
is an object of class maximum<T>
and x
and y
are objects of class T
f(x,y)
returns x
if x > y
and y
, otherwise.
T | is a model of LessThan Comparable. |
The following code snippet demonstrates that maximum
returns its greater argument.