MAGMA
2.7.1
Matrix Algebra for GPU and Multicore Architectures
|
imalloc, smalloc, etc. More...
Macros | |
#define | magma_free(ptr) |
Frees GPU memory previously allocated by magma_malloc(). More... | |
Functions | |
static magma_int_t | magma_imalloc (magmaInt_ptr *ptr_ptr, size_t n) |
Type-safe version of magma_malloc(), for magma_int_t arrays. Allocates n*sizeof(magma_int_t) bytes. | |
static magma_int_t | magma_index_malloc (magmaIndex_ptr *ptr_ptr, size_t n) |
Type-safe version of magma_malloc(), for magma_index_t arrays. Allocates n*sizeof(magma_index_t) bytes. | |
static magma_int_t | magma_uindex_malloc (magmaUIndex_ptr *ptr_ptr, size_t n) |
Type-safe version of magma_malloc(), for magma_uindex_t arrays. Allocates n*sizeof(magma_uindex_t) bytes. | |
static magma_int_t | magma_smalloc (magmaFloat_ptr *ptr_ptr, size_t n) |
Type-safe version of magma_malloc(), for float arrays. Allocates n*sizeof(float) bytes. | |
static magma_int_t | magma_dmalloc (magmaDouble_ptr *ptr_ptr, size_t n) |
Type-safe version of magma_malloc(), for double arrays. Allocates n*sizeof(double) bytes. | |
static magma_int_t | magma_cmalloc (magmaFloatComplex_ptr *ptr_ptr, size_t n) |
Type-safe version of magma_malloc(), for magmaFloatComplex arrays. Allocates n*sizeof(magmaFloatComplex) bytes. | |
static magma_int_t | magma_zmalloc (magmaDoubleComplex_ptr *ptr_ptr, size_t n) |
Type-safe version of magma_malloc(), for magmaDoubleComplex arrays. Allocates n*sizeof(magmaDoubleComplex) bytes. | |
magma_int_t | magma_malloc (magma_ptr *ptrPtr, size_t size) |
Allocates memory on the GPU. More... | |
imalloc, smalloc, etc.
magma_free | ( | ptr | ) |
Frees GPU memory previously allocated by magma_malloc().
[in] | ptr | Pointer to free. |
magma_int_t magma_malloc | ( | magma_ptr * | ptrPtr, |
size_t | size | ||
) |
Allocates memory on the GPU.
CUDA imposes a synchronization. Use magma_free() to free this memory.
[out] | ptrPtr | On output, set to the pointer that was allocated. NULL on failure. |
[in] | size | Size in bytes to allocate. If size = 0, allocates some minimal size. |
Type-safe versions avoid the need for a (void**) cast and explicit sizeof.