A high-performance general-purpose compute library

Check if all values along a given dimension are true. More...

Functions

array allTrue (const array &in, const int dim=-1)
 C++ Interface to check if all values along a given dimension are true.
 
template<typename T >
allTrue (const array &in)
 C++ Interface to check if all values along the first non-singleton dimension are true.
 
af_err af_all_true (af_array *out, const af_array in, const int dim)
 C Interface to check if all values along a given dimension are true.
 
af_err af_all_true_all (double *real, double *imag, const af_array in)
 C Interface to check if all values over all dimensions are true.
 
af_err af_all_true_all_array (af_array *out, const af_array in)
 C Interface to check if all values over all dimensions are true.
 
template<typename T >
alltrue (const array &in)
 C++ Interface to check if all values along the first non-singleton dimension are true.
 
AFAPI array alltrue (const array &in, const int dim=-1)
 C++ Interface to check if all values along a given dimension are true.
 

Detailed Description

Check if all values along a given dimension are true.

Return type is b8 for all input types.

This function runs across all batches in the input simultaneously.

Function Documentation

◆ af_all_true()

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

C Interface to check if all values along a given dimension are true.

NaN values are ignored.

Parameters
[out]outarray containing 1's if all true; 0's otherwise
[in]ininput array
[in]dimdimention along which the check occurs
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given

◆ af_all_true_all()

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

C Interface to check if all values over all dimensions are true.

Parameters
[out]real1 if all true; 0 otherwise
[out]imag0
[in]ininput array
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given

◆ af_all_true_all_array()

af_err af_all_true_all_array ( af_array * out,
const af_array in )

C Interface to check if all values over all dimensions are true.

Parameters
[out]out1 if all true; 0 otherwise
[in]ininput array
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given

◆ allTrue() [1/2]

template<typename T >
T allTrue ( const array & in)

C++ Interface to check if all values along the first non-singleton dimension are true.

NaN values are ignored.

Parameters
[in]ininput array
Returns
array containing 1's if all true; 0's otherwise

◆ allTrue() [2/2]

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

C++ Interface to check if all values along a given dimension are true.

NaN values are ignored.

Parameters
[in]ininput array
[in]dimdimension along which the check occurs, -1 denotes the first non-singleton dimension
Returns
array containing 1's if all true; 0's otherwise

◆ alltrue() [1/2]

template<typename T >
T alltrue ( const array & in)

C++ Interface to check if all values along the first non-singleton dimension are true.

NaN values are ignored.

Parameters
[in]ininput array
Returns
array containing 1's if all true; 0's otherwise
Deprecated
Use af::allTrue(const array&) instead

◆ alltrue() [2/2]

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

C++ Interface to check if all values along a given dimension are true.

NaN values are ignored.

Parameters
[in]ininput array
[in]dimdimension along which the check occurs, -1 denotes the first non-singleton dimension
Returns
array containing 1's if all true; 0's otherwise
Deprecated
Use af::allTrue instead