Loading...
Searching...
No Matches
Initialize/finalize

## Functions

magma_int_t | magma_init ()
| Initializes the MAGMA library.
magma_int_t | magma_finalize ()
| Frees information used by the MAGMA library.

## Detailed Description

## Function Documentation

## magma_init()

magma_int_t magma_init | ( | void |  | ) |

Initializes the MAGMA library.

Caches information about available CUDA devices.

Every magma_init call must be paired with a magma_finalize call. Only one thread needs to call magma_init and magma_finalize, but every thread may call it. If n threads call magma_init, the n-th call to magma_finalize will release resources.

When renumbering CUDA devices, call cudaSetValidDevices before calling magma_init. When setting CUDA device flags, call cudaSetDeviceFlags before calling magma_init.

Return values

  MAGMA_SUCCESS |
  MAGMA_ERR_UNKNOWN |
  MAGMA_ERR_HOST_ALLOC |

See also
  magma_finalize

## magma_finalize()

magma_int_t magma_finalize | ( | void |  | ) |

Frees information used by the MAGMA library.

See also
  magma_init