Round to nearest integer. More...

Functions

AFAPI array round (const array &in)
 C++ Interface for rounding an array of numbers. More...
 
AFAPI af_err af_sign (af_array *out, const af_array in)
 C Interface for finding the sign of the input. More...
 
AFAPI af_err af_round (af_array *out, const af_array in)
 C Interface for rounding an array of numbers. More...
 

Detailed Description

Round to nearest integer.

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

Function Documentation

AFAPI af_err af_round ( af_array out,
const af_array  in 
)

C Interface for rounding an array of numbers.

Parameters
[out]outwill contain values rounded to nearest integer
[in]inis input array
Returns
AF_SUCCESS if the execution completes properly
Note
The values are rounded to nearest integer
AFAPI af_err af_sign ( af_array out,
const af_array  in 
)

C Interface for finding the sign of the input.

Parameters
[out]outwill contain the sign of each element of the input arrays
[in]inis input array
Returns
AF_SUCCESS if the execution completes properly
Note
output is 1 for negative numbers and 0 for positive numbers
AFAPI array af::round ( const array in)

C++ Interface for rounding an array of numbers.

Parameters
[in]inis input array
Returns
values rounded to nearest integer
Note
The values are rounded to nearest integer
Examples:
machine_learning/rbm.cpp.