Template Struct logical_and

Struct Documentation

template<typename T>
struct logical_and

logical_and is a function object. Specifically, it is an Adaptable Binary Predicate, which means it is a function object that tests the truth or falsehood of some condition. If f is an object of class logical_and<T> and x and y are objects of class T (where T is convertible to bool) then f(x,y) returns true if and only if both x and y are true.

See

http://www.sgi.com/tech/stl/logical_and.html

See

binary_function

Template Parameters
  • T: must be convertible to bool.

Public Types

typedef first_argument_type

The type of the function object’s first argument.

typedef second_argument_type

The type of the function object’s second argument.

typedef result_type

The type of the function object’s result;.

Public Functions

__host__ __device__ bool thrust::logical_and::operator()(const T & lhs, const T & rhs) const

Function call operator. The return value is lhs && rhs.