Loading...
Searching...
No Matches
Miscellaneous utilities
Utilities

## Topics

| make_lwork: Round lwork for float

## Functions

void | magma_version (magma_int_t *major, magma_int_t *minor, magma_int_t *micro)
| Returns version of MAGMA, as defined by MAGMA_VERSION_MAJOR, MAGMA_VERSION_MINOR, MAGMA_VERSION_MICRO constants.
magma_int_t | magma_num_gpus (void)
| Determines the number of GPUs to use, based on \(MAGMA_NUM_GPUS environment variable, and limited to actual number of GPUs available. If \)@_fakenlMAGMA_NUM_GPUS is not set, uses 1.
magma_int_t | magma_is_devptr (const void *A)
| For debugging purposes, determines whether a pointer points to CPU or GPU memory.
magma_int_t | magma_cKrylov_check (magma_solver_type solver)
| Checks whether a solver is among the list of Krylov solvers.
magma_int_t | magma_dKrylov_check (magma_solver_type solver)
| Checks whether a solver is among the list of Krylov solvers.
magma_int_t | magma_sKrylov_check (magma_solver_type solver)
| Checks whether a solver is among the list of Krylov solvers.
magma_int_t | magma_zKrylov_check (magma_solver_type solver)
| Checks whether a solver is among the list of Krylov solvers.

## Detailed Description

## Function Documentation

## magma_version()

void magma_version | ( | magma_int_t * | major,
|  | magma_int_t * | minor,
|  | magma_int_t * | micro )

Returns version of MAGMA, as defined by MAGMA_VERSION_MAJOR, MAGMA_VERSION_MINOR, MAGMA_VERSION_MICRO constants.

Parameters

  [out] | major | Set to major version number.
  [out] | minor | Set to minor version number.
  [out] | micro | Set to micro version number.

## magma_num_gpus()

magma_int_t magma_num_gpus | ( | void |  | ) |

Determines the number of GPUs to use, based on \(MAGMA_NUM_GPUS environment variable, and limited to actual number of GPUs available. If \)@_fakenlMAGMA_NUM_GPUS is not set, uses 1.

Returns
  Number of GPUs to use.

## magma_is_devptr()

magma_int_t magma_is_devptr | ( | const void * | A | ) |

For debugging purposes, determines whether a pointer points to CPU or GPU memory.

On CUDA architecture 2.0 cards with unified addressing, CUDA can tell if it is a device pointer or pinned host pointer. For malloc'd host pointers, cudaPointerGetAttributes returns error, implying it is a (non-pinned) host pointer.

On older cards, this cannot determine if it is CPU or GPU memory.

Parameters

  [in] | A | pointer to test

Returns
  1: if A is a device pointer (definitely),
  0: if A is a host pointer (definitely or inferred from error),
  -1: if unknown.

## magma_cKrylov_check()

magma_int_t magma_cKrylov_check | ( | magma_solver_type | solver | ) |

Checks whether a solver is among the list of Krylov solvers.

The result is passed in info: 1 yes - Krylov solver 0 no - no Krylov solver of the list.

Parameters

  [in] | solver | magma_solver_type

Returns
  error

## magma_dKrylov_check()

magma_int_t magma_dKrylov_check | ( | magma_solver_type | solver | ) |

Checks whether a solver is among the list of Krylov solvers.

The result is passed in info: 1 yes - Krylov solver 0 no - no Krylov solver of the list.

Parameters

  [in] | solver | magma_solver_type

Returns
  error

## magma_sKrylov_check()

magma_int_t magma_sKrylov_check | ( | magma_solver_type | solver | ) |

Checks whether a solver is among the list of Krylov solvers.

The result is passed in info: 1 yes - Krylov solver 0 no - no Krylov solver of the list.

Parameters

  [in] | solver | magma_solver_type

Returns
  error

## magma_zKrylov_check()

magma_int_t magma_zKrylov_check | ( | magma_solver_type | solver | ) |

Checks whether a solver is among the list of Krylov solvers.

The result is passed in info: 1 yes - Krylov solver 0 no - no Krylov solver of the list.

Parameters

  [in] | solver | magma_solver_type

Returns
  error