A high-performance general-purpose compute library

Test if all values in an array are true. More...

Functions

AFAPI array allTrue (const array &in, const int dim=-1)
 C++ Interface for checking all true values in an array.
 
template<typename T >
allTrue (const array &in)
 C++ Interface for checking if all values in an array are true.
 
AFAPI af_err af_all_true (af_array *out, const af_array in, const int dim)
 C Interface for checking all true values in an array.
 
AFAPI af_err af_all_true_all (double *real, double *imag, const af_array in)
 C Interface for checking if all values in an array are true.
 
template<typename T >
alltrue (const array &in)
 
AFAPI array alltrue (const array &in, const int dim=-1)
 

Detailed Description

Test if all values in an array are true.

Find if of all of the values in input are true

Return type is b8 for all input types

This function performs the operation across all batches present in the input simultaneously.

Function Documentation

◆ af_all_true()

AFAPI af_err af_all_true ( af_array out,
const af_array  in,
const int  dim 
)

C Interface for checking all true values in an array.

Parameters
[out]outwill contain the result of "and" operation all values in in along dim
[in]inis the input array
[in]dimThe dimension along which the "and" operation occurs
Returns
AF_SUCCESS if the execution completes properly

◆ af_all_true_all()

AFAPI af_err af_all_true_all ( double *  real,
double *  imag,
const af_array  in 
)

C Interface for checking if all values in an array are true.

Parameters
[out]realis 1 if all values of input in are true, 0 otherwise.
[out]imagis always set to 0.
[in]inis the input array
Returns
AF_SUCCESS if the execution completes properly
Note
imag is always set to 0.

◆ allTrue() [1/2]

T allTrue ( const array in)

C++ Interface for checking if all values in an array are true.

Parameters
[in]inis the input array
Returns
true if all values of in are true, false otherwise
Note
NaN values are ignored

◆ alltrue() [1/2]

T alltrue ( const array in)

C++ Interface for checking if all values in an array are true.

Parameters
[in]inis the input array
Returns
true if all values of in are true, false otherwise
Note
NaN values are ignored
Deprecated:
Use af::allTrue(const array&) instead

◆ allTrue() [2/2]

AFAPI array allTrue ( const array in,
const int  dim = -1 
)

C++ Interface for checking all true values in an array.

Parameters
[in]inis the input array
[in]dimThe dimension along which the values are checked to be all true
Returns
result of checking if values along dimension dim are all true
Note
dim is -1 by default. -1 denotes the first non-singleton dimension.
NaN values are ignored

◆ alltrue() [2/2]

AFAPI array alltrue ( const array in,
const int  dim = -1 
)

C++ Interface for checking all true values in an array.

Parameters
[in]inis the input array
[in]dimThe dimension along which the values are checked to be all true
Returns
result of checking if values along dimension dim are all true
Note
dim is -1 by default. -1 denotes the first non-singleton dimension.
NaN values are ignored
Deprecated:
Use af::allTrue instead