{
if (bUseGpuKernels)
{
- *nb_alloc = &ocl_pmalloc;
- *nb_free = &ocl_pfree;
+ *nb_alloc = &pmalloc;
+ *nb_free = &pfree;
}
else
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
* \param[in,out] h_ptr Pointer where to store the address of the newly allocated buffer.
* \param[in] nbytes Size in bytes of the buffer to be allocated.
*/
-void ocl_pmalloc(void **h_ptr, size_t nbytes)
+void pmalloc(void **h_ptr, size_t nbytes)
{
/* Need a temporary type whose size is 1 byte, so that the
* implementation of snew_aligned can cope without issuing
snew_aligned(*temporary, nbytes, 16);
}
-/*! \brief Frees memory allocated with ocl_pmalloc.
+/*! \brief Frees memory allocated with pmalloc.
*
- * \param[in] h_ptr Buffer allocated with ocl_pmalloc that needs to be freed.
+ * \param[in] h_ptr Buffer allocated with pmalloc that needs to be freed.
*/
-void ocl_pfree(void *h_ptr)
+void pfree(void *h_ptr)
{
if (h_ptr)
cl_command_queue command_queue);
/*! \brief Allocate host memory in malloc style */
-void ocl_pmalloc(void **h_ptr, size_t nbytes);
+void pmalloc(void **h_ptr, size_t nbytes);
/*! \brief Free host memory in malloc style */
-void ocl_pfree(void *h_ptr);
+void pfree(void *h_ptr);
/*! \brief Convert error code to diagnostic string */
std::string ocl_get_error_string(cl_int error);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "gromacs/utility/basedefinitions.h"
+///@cond INTERNAL
+
/*! \brief Allocates nbytes of page-locked memory. */
void pmalloc(void **h_ptr, size_t nbytes);
/*! \brief Frees page locked memory allocated with pmalloc. */
void pfree(void *h_ptr);
+///@endcond
+
#endif
snew(nb->dev_rundata, 1);
/* init nbst */
- ocl_pmalloc((void**)&nb->nbst.e_lj, sizeof(*nb->nbst.e_lj));
- ocl_pmalloc((void**)&nb->nbst.e_el, sizeof(*nb->nbst.e_el));
- ocl_pmalloc((void**)&nb->nbst.fshift, SHIFTS * sizeof(*nb->nbst.fshift));
+ pmalloc((void**)&nb->nbst.e_lj, sizeof(*nb->nbst.e_lj));
+ pmalloc((void**)&nb->nbst.e_el, sizeof(*nb->nbst.e_el));
+ pmalloc((void**)&nb->nbst.fshift, SHIFTS * sizeof(*nb->nbst.fshift));
init_plist(nb->plist[eintLocal]);
}
/* Free nbst */
- ocl_pfree(nb->nbst.e_lj);
+ pfree(nb->nbst.e_lj);
nb->nbst.e_lj = NULL;
- ocl_pfree(nb->nbst.e_el);
+ pfree(nb->nbst.e_el);
nb->nbst.e_el = NULL;
- ocl_pfree(nb->nbst.fshift);
+ pfree(nb->nbst.fshift);
nb->nbst.fshift = NULL;
/* Free command queues */