getDeviceId

Functions
getDeviceId
Complete List of ArrayFire Functions ArrayFire Functions by Category » | Unified API Functions

Get's the id of the device an array was created on. More...

## Functions
AFAPI af_err | af_get_device_id (int *device, const af_array in)
AFAPI int | getDeviceId (const array &in)

## Detailed Description

Get's the id of the device an array was created on.

=======================================================================

## Function Documentation

## § af_get_device_id()

AFAPI af_err af_get_device_id | ( | int * | device,
|  | const af_array | in
| ) |  |

Parameters

  [out] | device | contains the device on which `in` was created.
  [in] | in | is the array who's device is to be queried.

Returns
  af_err error code

## § getDeviceId()

AFAPI int af::getDeviceId | ( | const array & | in | ) |

Parameters

  [in] | in | is the array who's device is to be queried.

Returns
  The id of the device on which this array was created.

Note
  Device ID can be the same for arrays belonging to different backends.