A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
abs
ArrayFire Functions | ArrayFire Functions by Category » Mathematical functions » Numeric functions

## Functions
array | abs (const array &in)
| C++ Interface to calculate the absolute value.
af_err | af_abs (af_array *out, const af_array in)
| C Interface to calculate the absolute value.

## Detailed Description

Calculate the absolute value.

## Function Documentation

## ◆ abs()

array abs | ( | const array & | in | ) |

C++ Interface to calculate the absolute value.

Parameters

  [in] | in | input array

Returns
  absolute value

## ◆ af_abs()

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

C Interface to calculate the absolute value.

Parameters

  [out] | out | absolute value
  [in] | in | input array

Returns
  AF_SUCCESS, if function returns successfully, else an af_err code is given