A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

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

## Functions
array | ceil (const array &in)
| C++ Interface to ceil numbers.
af_err | af_ceil (af_array *out, const af_array in)
| C Interface to ceil numbers.

## Detailed Description

Rounds up to the least integer greater than or equal to x.

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

## Function Documentation

## ◆ af_ceil()

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

C Interface to ceil numbers.

Parameters

  [out] | out | nearest integer greater than or equal to `in`
  [in] | in | input array

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

## ◆ ceil()

array ceil | ( | const array & | in | ) |

C++ Interface to ceil numbers.

Parameters

  [in] | in | input array

Returns
  nearest integer greater than or equal to `in`