thrust

◆ not1()

template<typename Predicate >
__host__ __device__ unary_negate<Predicate> thrust::not1 ( const Predicate &  pred)

not1 is a helper function to simplify the creation of Adaptable Predicates: it takes an Adaptable Predicate pred as an argument and returns a new Adaptable Predicate that represents the negation of pred. That is: if pred is an object of a type which models Adaptable Predicate, then the the type of the result npred of not1(pred) is also a model of Adaptable Predicate and npred(x) always returns the same value as !pred(x).

Parameters
predThe Adaptable Predicate to negate.
Returns
A new object, npred such that npred(x) always returns the same value as !pred(x).
Template Parameters
Predicateis a model of Adaptable Predicate.
See also
unary_negate
not2

Referenced by thrust::unary_negate< Predicate >::operator()().