Tests if all of the elements of an array are true. More...

Modules

 alltrue
 The C++ interface for alltrue.
 
 af_alltrue
 the C interface for alltrue
 

Detailed Description

Tests if all of the elements of an array are true.

Performs a logical boolean and operation over the elements
of an array.

These functions are particularly useful when utilized with
the result of conditions as parameters. In such a case, the
input array to the function is a boolean array.

Similar to the other reduction operations in ArrayFire,
alltrue can also operate a long a given dimension.
bool hx[] = { true, true, false, true };
array x1(4, 1, hx); // 4x1 vector
printf("%d\n", alltrue<bool>(x1)); // 0