thrust::greater

Defined in thrust/functional.h

template<typename T = void>
struct greater

greater is a function object. Specifically, it is an Adaptable Binary Predicate, which means it is a function object that tests the truth or falsehood of some condition. If f is an object of class greater<T> and x and y are objects of class T, then f(x,y) returns true if x > y and false otherwise.

See also

binary_function

Template Parameters

T – is a model of LessThan Comparable.

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 bool result_type

The type of the function object’s result;.

Public Functions

inline constexpr bool operator()(const T &lhs, const T &rhs) const

Function call operator. The return value is lhs > rhs.