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