Struct thrust::binary_negate

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

Inherits From: thrust:: binary_function< Predicate::first_argument_type, Predicate::second_argument_type, bool >

See: https://en.cppreference.com/w/cpp/utility/functional/binary_negate

#include <thrust/functional.h>
template <typename Predicate> struct thrust::binary_negate { public:  explicit _CCCL_HOST_DEVICE   binary_negate(Predicate p);
  _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE bool   operator()(const typename Predicate::first_argument_type & x,     const typename Predicate::second_argument_type & y); };

Member Functions

Function thrust::binary_negate::binary_negate

explicit _CCCL_HOST_DEVICE binary_negate(Predicate p); Constructor takes a Predicate object to negate.

Function Parameters: p: The Predicate object to negate.

Function thrust::binary_negate::operator()

_CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE bool 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).