thrust
Public Member Functions | List of all members
thrust::unary_negate< Predicate > Struct Template Reference

#include <thrust/functional.h>

Inheritance diagram for thrust::unary_negate< Predicate >:
thrust::unary_function< Predicate::argument_type, bool >

Public Member Functions

__host__ __device__ unary_negate (Predicate p)
 
__thrust_exec_check_disable__ __host__ __device__ bool operator() (const typename Predicate::argument_type &x)
 

Additional Inherited Members

- Public Types inherited from thrust::unary_function< Predicate::argument_type, bool >
typedef Predicate::argument_type argument_type
 The type of the function object's argument.
 
typedef bool result_type
 The type of the function object's result.
 

Detailed Description

template<typename Predicate>
struct thrust::unary_negate< Predicate >

unary_negate is a function object adaptor: it is an Adaptable Predicate that represents the logical negation of some other Adaptable Predicate. That is: if f is an object of class unary_negate<AdaptablePredicate>, then there exists an object pred of class AdaptablePredicate such that f(x) always returns the same value as !pred(x). There is rarely any reason to construct a unary_negate directly; it is almost always easier to use the helper function not1.

See also
http://www.sgi.com/tech/stl/unary_negate.html
not1

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