A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
isHalfAvailable
ArrayFire Functions | ArrayFire Functions by Category » Functions to create and modify Arrays » Managing devices in ArrayFire

Check if half(16-bit) precision floating point support is available for specified device More...

## Functions
AFAPI bool | isHalfAvailable (const int device)
| Queries the current device for half precision floating point support.
AFAPI af_err | af_get_half_support (bool *available, const int device)

## Detailed Description

Check if half(16-bit) precision floating point support is available for specified device

These functions check if a device has support to perform half precision floating point operations

## Function Documentation

## ◆ af_get_half_support()

AFAPI af_err af_get_half_support | ( | bool * | available,
|  | const int | device )

## ◆ isHalfAvailable()

AFAPI bool isHalfAvailable | ( | const int | device | ) |

Queries the current device for half precision floating point support.

Parameters

  [in] | device | the ID of the device to query

Returns
  true if the `device` supports half precision operations. false otherwise

Examples
  machine_learning/neural_network.cpp.