fupermod: Functional Performance Models of heterogeneous processors
Wrappers for memory management
Enumerations | |
enum | fupermod_mem_mode { FUPERMOD_MEM_DEFAULT = -0x01, FUPERMOD_MEM_PAGELOCKED = 0x00, FUPERMOD_MEM_PORTABLE = 0x01, FUPERMOD_MEM_MAPPED = 0x02, FUPERMOD_MEM_WRITECOMBINED = 0x04 } |
Functions | |
void * | fupermod_malloc (size_t size, fupermod_process_conf *conf) |
void | fupermod_free (void *ptr, fupermod_process_conf *conf) |
Detailed Description
API to handle data that can be allocated either in main or in GPU memory: for example, blocks of matrices in hybrid (CPU/GPU) matrix multiplication.
Enumeration Type Documentation
enum fupermod_mem_mode |
Memory allocation modes, including C standard malloc and CUDA memory allocation. CUDA flags can be combined with "|"
- Enumerator:
Function Documentation
void* fupermod_malloc | ( | size_t | size, | |
fupermod_process_conf * | conf | |||
) |
Allocate a block of size bytes of memory. If NULL is returned, then there is something wrong
- Parameters:
-
size size of memory to be allocated conf process configuration
- Returns:
- a pointer to the beginning of the memory block
void fupermod_free | ( | void * | ptr, | |
fupermod_process_conf * | conf | |||
) |
Free memory
- Parameters:
-
ptr the beginning of the memory block to be freed conf process configuration