Loading...
Searching...
No Matches
Allocate pinned CPU host memory
Utilities

imalloc_pinned, smalloc_pinned, etc. More...

## Macros

#define | magma_free_pinned(ptr)
| Frees CPU pinned memory previously allocated by magma_malloc_pinned().

## Functions

static magma_int_t | magma_imalloc_pinned (magma_int_t **ptr_ptr, size_t n)
| Type-safe version of magma_malloc_pinned(), for magma_int_t arrays. Allocates n*sizeof(magma_int_t) bytes.
static magma_int_t | magma_index_malloc_pinned (magma_index_t **ptr_ptr, size_t n)
| Type-safe version of magma_malloc_pinned(), for magma_index_t arrays. Allocates n*sizeof(magma_index_t) bytes.
static magma_int_t | magma_smalloc_pinned (float **ptr_ptr, size_t n)
| Type-safe version of magma_malloc_pinned(), for float arrays. Allocates n*sizeof(float) bytes.
static magma_int_t | magma_dmalloc_pinned (double **ptr_ptr, size_t n)
| Type-safe version of magma_malloc_pinned(), for double arrays. Allocates n*sizeof(double) bytes.
static magma_int_t | magma_cmalloc_pinned (magmaFloatComplex **ptr_ptr, size_t n)
| Type-safe version of magma_malloc_pinned(), for magmaFloatComplex arrays. Allocates n*sizeof(magmaFloatComplex) bytes.
static magma_int_t | magma_zmalloc_pinned (magmaDoubleComplex **ptr_ptr, size_t n)
| Type-safe version of magma_malloc_pinned(), for magmaDoubleComplex arrays. Allocates n*sizeof(magmaDoubleComplex) bytes.
magma_int_t | magma_malloc_pinned (void **ptrPtr, size_t size)
| Allocates memory on the CPU in pinned memory.

## Detailed Description

imalloc_pinned, smalloc_pinned, etc.

## Macro Definition Documentation

## magma_free_pinned

#define magma_free_pinned | ( |  | ptr | ) |

Frees CPU pinned memory previously allocated by magma_malloc_pinned().

Parameters

  [in] | ptr | Pointer to free.

Returns
  MAGMA_SUCCESS
  MAGMA_ERR_INVALID_PTR on failure

## Function Documentation

## magma_malloc_pinned()

magma_int_t magma_malloc_pinned | ( | void ** | ptrPtr,
|  | size_t | size )

Allocates memory on the CPU in pinned memory.

Use magma_free_pinned() to free this memory.

Parameters

  [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.

Returns
  MAGMA_SUCCESS
  MAGMA_ERR_HOST_ALLOC on failure

Type-safe versions avoid the need for a (void**) cast and explicit sizeof.

See also
  magma_smalloc_pinned
  magma_dmalloc_pinned
  magma_cmalloc_pinned
  magma_zmalloc_pinned
  magma_imalloc_pinned
  magma_index_malloc_pinned