A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

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

Gets the number of compute devices on the system More...

## Functions
AFAPI int | devicecount ()
| Gets the number of devices.
AFAPI int | getDeviceCount ()
| Gets the number of devices.
AFAPI af_err | af_get_device_count (int *num_of_devices)

## Detailed Description

Gets the number of compute devices on the system

Get the number of devices available for the current backend

## Function Documentation

## ◆ af_get_device_count()

AFAPI af_err af_get_device_count | ( | int * | num_of_devices | ) |

## ◆ devicecount()

AFAPI int devicecount | ( |  | ) |

Gets the number of devices.

Gets the number of compute devices on the system

Get the number of devices available for the current backend

Returns
  the number of devices on the system

Deprecated
  Use getDeviceCount() instead

## ◆ getDeviceCount()

AFAPI int getDeviceCount | ( |  | ) |

Gets the number of devices.

Gets the number of compute devices on the system

Get the number of devices available for the current backend

Returns
  the number of devices on the system