thrust::unary_negate
Defined in thrust/functional.h
-
template<typename Predicate>
struct unary_negate unary_negate
is a function object adaptor: it is an Adaptable Predicate that represents the logical negation of some other Adaptable Predicate. That is: iff
is an object of classunary_negate<AdaptablePredicate>
, then there exists an objectpred
of classAdaptablePredicate
such thatf(x)
always returns the same value as!pred(x)
. There is rarely any reason to construct aunary_negate
directly; it is almost always easier to use the helper function not1.deprecated [Since 2.6]
See also
not1