|
Gromacs
2025.3
|
#include "gmxpre.h"#include <cstdlib>#include "gromacs/gpu_utils/hiputils.h"#include "gromacs/utility/cstringutil.h"#include "pmalloc.h"
Include dependency graph for pmalloc_hip.cpp:Define functions for host-side memory handling when using AMD with HIP devices.
Functions | |
| void | pmalloc (void **h_ptr, size_t nbytes, const DeviceContext *) |
| void | pfree (void *h_ptr, const DeviceContext *) |
| void | pmallocSetDefaultDeviceContext (const DeviceContext *) |
| void | pmallocClearDefaultDeviceContext () |
| void pfree | ( | void * | h_ptr, |
| const DeviceContext * | |||
| ) |
Frees page locked memory allocated with pmalloc. This function can safely be called also with a pointer to a page-locked memory allocated directly with HIP API calls.
| void pmalloc | ( | void ** | h_ptr, |
| size_t | nbytes, | ||
| const DeviceContext * | |||
| ) |
Allocates nbytes of page-locked memory. This memory should always be freed using pfree (or with the page-locked free functions provied by the HIP library).
1.8.5