A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
flat
ArrayFire Functions | ArrayFire Functions by Category » Functions to create and modify Arrays » Move and Reorder array content

## Functions
AFAPI array | flat (const array &in)
| C++ Interface to flatten an array.
AFAPI af_err | af_flat (af_array *out, const af_array in)
| C Interface to flatten an array.

## Detailed Description

Flatten an array.

Simply returns the array as a vector. This is a NOOP.

## Function Documentation

## ◆ af_flat()

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

C Interface to flatten an array.

Parameters

  [out] | out | flat array
  [in] | in | input array

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

## ◆ flat()

AFAPI array flat | ( | const array & | in | ) |

C++ Interface to flatten an array.

Parameters

  [in] | in | input array

Returns
  flat array