abs

- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
abs
Complete List of ArrayFire Functions ArrayFire Functions by Category » Mathematical functions » | Numeric functions

Absolute value. More...

## Functions
AFAPI array | abs (const array &in)
| C++ Interface for absolute value. More...
AFAPI af_err | af_abs (af_array *out, const af_array in)
| C Interface for absolute value. More...

## Detailed Description

Absolute value.

## Function Documentation

AFAPI array af::abs | ( | const array & | in | ) |

C++ Interface for absolute value.

Parameters

  [in] | in | is input array

Returns
  absolute value of `in`

Examples:
  adaptive_thresholding.cpp, bagging.cpp, brain_segmentation.cpp, convolve.cpp, fft.cpp, fractal.cpp, histogram.cpp, image_demo.cpp, kmeans.cpp, knn.cpp, logistic_regression.cpp, perceptron.cpp, rbm.cpp, softmax_regression.cpp, surface.cpp, and vectorize.cpp.

AFAPI af_err af_abs | ( | af_array * | out,
|  | const af_array | in
| ) |  |

C Interface for absolute value.

Parameters

  [out] | out | will contain the absolute value of `in`
  [in] | in | is input array

Returns
  AF_SUCCESS if the execution completes properly