![]() |
MAGMA
1.5.0
Matrix Algebra for GPU and Multicore Architectures
|
General (non-matrix) auxiliary functions. More...
Functions | |
magma_int_t | magma_is_devptr (const void *A) |
For debugging purposes, determines whether a pointer points to CPU or GPU memory. More... | |
void | magma_xerbla (const char *srname, magma_int_t minfo) |
magma_xerbla is an error handler for the MAGMA routines. More... | |
General (non-matrix) auxiliary functions.
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.
A | pointer to test |
void magma_xerbla | ( | const char * | srname, |
magma_int_t | minfo | ||
) |
magma_xerbla is an error handler for the MAGMA routines.
It is called by a MAGMA routine if an input parameter has an invalid value. It prints an error message.
Installers may consider modifying it to call system-specific exception-handling facilities.
[in] | srname | CHAR* The name of the subroutine that called XERBLA. In C/C++ it is convenient to use "__func__". |
[in] | minfo | INTEGER Note minfo's sign is opposite info's normal sign. |
Normally:
These conditions are also reported, but normally code should not call xerbla for these runtime errors: