Template Struct unary_negate¶
Defined in File functional.h
Inheritance Relationships¶
Base Type¶
public thrust::unary_function< Predicate::argument_type, bool >(Template Struct unary_function)
Struct Documentation¶
-
template<typename
Predicate>
structunary_negate: public thrust::unary_function<Predicate::argument_type, bool>¶ unary_negateis a function object adaptor: it is an Adaptable Predicate that represents the logical negation of some other Adaptable Predicate. That is: iffis an object of classunary_negate<AdaptablePredicate>, then there exists an objectpredof classAdaptablePredicatesuch thatf(x)always returns the same value as!pred(x). There is rarely any reason to construct aunary_negatedirectly; it is almost always easier to use the helper function not1.Public Functions
-
__host__ __device__ thrust::unary_negate::unary_negate(Predicate p) Constructor takes a
Predicateobject to negate.- Parameters
p: ThePredicateobject to negate.
-
__host__ __device__ bool thrust::unary_negate::operator()(const typename Predicate::argument_type & x) Function call operator. The return value is
!pred(x).
-