A high-performance general-purpose compute library

Return the sign of elements in an array. More...

Functions

AFAPI array sign (const array &in)
 C++ Interface to return the sign of elements in an array. More...
 
AFAPI af_err af_sign (af_array *out, const af_array in)
 C Interface to calculate the sign of elements in an array. More...
 

Detailed Description

Return the sign of elements in an array.

Note
This function only supports real inputs; complex inputs are not yet supported.

Function Documentation

◆ af_sign()

AFAPI af_err af_sign ( af_array out,
const af_array  in 
)

C Interface to calculate the sign of elements in an array.

Parameters
[out]outarray containing 1's for negative values; 0's otherwise
[in]ininput array
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given

◆ sign()

AFAPI array sign ( const array in)

C++ Interface to return the sign of elements in an array.

Parameters
[in]ininput array
Returns
array containing 1's for negative values; 0's otherwise