A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

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

Get the current device ID More...

## Functions
AFAPI int | deviceget ()
| Gets the current device ID.
AFAPI int | getDevice ()
| Gets the current device ID.

## Detailed Description

Get the current device ID

Gets the ID of the current device

## Function Documentation

## ◆ deviceget()

AFAPI int deviceget | ( |  | ) |

Gets the current device ID.

Get the current device ID

Gets the ID of the current device

Returns
  the device ID of the current device

Deprecated
  Use getDevice() instead

## ◆ getDevice()

AFAPI int getDevice | ( |  | ) |

Gets the current device ID.

Get the current device ID

Gets the ID of the current device

Returns
  the device ID of the current device