afError af_info ()
 Print diagnostic information on driver, runtime, memory, and devices. More...
 
afError af_deviceprop (char *d_name, char *d_platform, char *d_toolkit, char *d_compute)
 
afError af_cuda_info (char *driverVersion, double *runtimeVersion, int buflen)
 
afError af_deviceset (int index, bool use_graphics=true, char sort_mode='f')
 Switch to specified device. More...
 
afError af_deviceget (int *dev)
 Fetch current device index (sorted by estimated FLOPs). More...
 
afError af_devicegetreal (int dev, int *devreal)
 Translate sorted device index into real CUDA device index. More...
 
afError af_devicepush (int index)
 Save current device on stack and switch to specified device. More...
 
afError af_devicepop ()
 Pop last device off stack and switch to it. More...
 
afError af_devicecount (int *count)
 

Detailed Description

Function Documentation

afError af_info ( )

Print diagnostic information on driver, runtime, memory, and devices.

afError af_deviceprop ( char *  d_name,
char *  d_platform,
char *  d_toolkit,
char *  d_compute 
)
afError af_cuda_info ( char *  driverVersion,
double *  runtimeVersion,
int  buflen 
)
afError af_deviceset ( int  index,
bool  use_graphics = true,
char  sort_mode = 'f' 
)

Switch to specified device.

Requires ArrayFire Pro to index beyond first device.

Parameters
[in]indexIndex of device to select (zero-based).
[in]use_graphicsIndicate if graphics should be enabled (default: true)
[in]sort_modeTo sort devices based on theoretical FLOPs (sort_mode = 'f'), Memory(sort_mode = 'm'), or Compute(sort_mode = 'c'). Any other option does not sort gpus
afError af_deviceget ( int *  dev)

Fetch current device index (sorted by estimated FLOPs).

Parameters
[out]devDevice index (zero-based). -1 if not yet initialized.
afError af_devicegetreal ( int  dev,
int *  devreal 
)

Translate sorted device index into real CUDA device index.

Parameters
[in]devSorted index as seen in info() (zero-based)
[out]devrealCUDA device index (zero-based). -1 if not yet initialized or dev beyond range.
afError af_devicepush ( int  index)

Save current device on stack and switch to specified device.

Parameters
[in]indexIndex of device to select.
See Also
af_devicepop(), af_deviceset()
afError af_devicepop ( )

Pop last device off stack and switch to it.

See Also
af_devicepush()
afError af_devicecount ( int *  count)
Returns
Number of devices
See Also
af_deviceget()