Gromacs
2021.4
|
#include "gmxpre.h"
#include "oclutils.h"
#include <stdlib.h>
#include <cassert>
#include <cstdio>
#include <string>
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
Define utility routines for OpenCL.
Functions | |
void | pmalloc (void **h_ptr, size_t nbytes) |
Allocates nbytes of host memory. Use ocl_free to free memory allocated with this function. More... | |
void | pfree (void *h_ptr) |
Frees memory allocated with pmalloc. More... | |
std::string | ocl_get_error_string (cl_int error) |
Convert error code to diagnostic string. | |
void pfree | ( | void * | h_ptr | ) |
Frees memory allocated with pmalloc.
Free host memory in malloc style.
[in] | h_ptr | Buffer allocated with pmalloc that needs to be freed. |
void pmalloc | ( | void ** | h_ptr, |
size_t | nbytes | ||
) |
Allocates nbytes of host memory. Use ocl_free to free memory allocated with this function.
Allocate host memory in malloc style.
[in,out] | h_ptr | Pointer where to store the address of the newly allocated buffer. |
[in] | nbytes | Size in bytes of the buffer to be allocated. |