A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
upper
ArrayFire Functions | ArrayFire Functions by Category » Functions to create and modify Arrays » Functions to create arrays.

## Functions
AFAPI array | upper (const array &in, bool is_unit_diag=false)
| C++ Interface to return the upper triangle array.
AFAPI af_err | af_upper (af_array *out, const af_array in, bool is_unit_diag)
| C Interface to return the upper triangle array.

## Detailed Description

Return the upper triangular matrix from an input array.

## Function Documentation

## ◆ af_upper()

AFAPI af_err af_upper | ( | af_array * | out,
|  | const af_array | in,
|  | bool | is_unit_diag )

C Interface to return the upper triangle array.

Parameters

  [out] | out | upper triangle array
  [in] | in | input array
  [in] | is_unit_diag | boolean specifying if diagonal elements are 1's

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

## ◆ upper()

AFAPI array upper | ( | const array & | in,
|  | bool | is_unit_diag = false )

C++ Interface to return the upper triangle array.

Parameters

  [in] | in | input array
  [in] | is_unit_diag | boolean specifying if diagonal elements are 1's

Returns
  upper triangle matrix