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.
 
AFAPI af_err af_sign (af_array *out, const af_array in)
 C Interface to calculate the sign of elements in an array.
 

Detailed Description

Return the sign of elements in an array.

Note
This function supports real inputs only. 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 the execution completes properly

◆ 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