MAGMA  2.7.1
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages
Device management

Functions

magma_int_t magma_getdevice_arch ()
 Returns CUDA architecture capability for the current device. More...
 
void magma_getdevices (magma_device_t *devices, magma_int_t size, magma_int_t *num_dev)
 Fills in devices array with the available devices. More...
 
void magma_getdevice (magma_device_t *device)
 Get the current device. More...
 
void magma_setdevice (magma_device_t device)
 Set the current device. More...
 
magma_int_t magma_getdevice_multiprocessor_count ()
 Returns the multiprocessor count for the current device. More...
 
size_t magma_getdevice_shmem_block ()
 Returns the maximum shared memory per block (in bytes) for the current device. More...
 
size_t magma_getdevice_shmem_multiprocessor ()
 Returns the maximum shared memory multiprocessor (in bytes) for the current device. More...
 

Detailed Description

Function Documentation

magma_int_t magma_getdevice_arch ( )

Returns CUDA architecture capability for the current device.

This requires magma_init() to be called first to cache the information. Version is an integer xyz, where x is major, y is minor, and z is micro, the same as CUDA_ARCH. Thus for architecture 1.3.0 it returns 130.

Returns
CUDA_ARCH for the current device.
void magma_getdevices ( magma_device_t *  devices,
magma_int_t  size,
magma_int_t *  num_dev 
)

Fills in devices array with the available devices.

(This makes much more sense in OpenCL than in CUDA.)

Parameters
[out]devicesArray of dimension (size). On output, devices[0, ..., num_dev-1] contain device IDs. Entries >= num_dev are not touched.
[in]sizeDimension of the array devices.
[out]num_devNumber of devices, limited to size.
void magma_getdevice ( magma_device_t *  device)

Get the current device.

Parameters
[out]deviceOn output, device ID of the current device. Each thread has its own current device.
void magma_setdevice ( magma_device_t  device)

Set the current device.

Parameters
[in]deviceDevice ID to set as the current device. Each thread has its own current device.
magma_int_t magma_getdevice_multiprocessor_count ( )

Returns the multiprocessor count for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the multiprocessor count for the current device.
size_t magma_getdevice_shmem_block ( )

Returns the maximum shared memory per block (in bytes) for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the maximum shared memory per block (in bytes) for the current device.
size_t magma_getdevice_shmem_multiprocessor ( )

Returns the maximum shared memory multiprocessor (in bytes) for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the maximum shared memory per multiprocessor (in bytes) for the current device.