Remove now usused GPU alloc/free functions
authorBerk Hess <hess@kth.se>
Fri, 4 Jan 2019 21:57:35 +0000 (22:57 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 22 Jan 2019 14:48:54 +0000 (15:48 +0100)
Change-Id: Ifbb424162dd642ecca662ac6a5cb476c24649f0f

src/gromacs/gpu_utils/gpu_utils.cpp
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/gpu_utils/gpu_utils.h
src/gromacs/gpu_utils/gpu_utils_ocl.cpp

index 7105b498c2ec16ef74aaf77eddcb0ff938ee925d..81778c01117dab175d108695b609017c04d32b09 100644 (file)
 #include "gromacs/utility/stringutil.h"
 
 #if !GMX_GPU
-/*! \brief Set allocation functions used by the GPU host
- *
- * Since GPU support is not configured, there is no host memory to
- * allocate. */
-void gpu_set_host_malloc_and_free(bool /*unused*/,
-                                  gmx_host_alloc_t **nb_alloc,
-                                  gmx_host_free_t  **nb_free)
-{
-    *nb_alloc = nullptr;
-    *nb_free  = nullptr;
-}
-
 int gpu_info_get_stat(const gmx_gpu_info_t & /*unused*/, int /*unused*/)
 {
     return egpuNonexistent;
index 9fbde4f09aa287368e70c8abb5ff6be091f6c4eb..17288e9bfb80045c4d5eceb4588cc09ca40402d7 100644 (file)
@@ -498,22 +498,6 @@ size_t sizeof_gpu_dev_info(void)
     return sizeof(gmx_device_info_t);
 }
 
-void gpu_set_host_malloc_and_free(bool               bUseGpuKernels,
-                                  gmx_host_alloc_t **nb_alloc,
-                                  gmx_host_free_t  **nb_free)
-{
-    if (bUseGpuKernels)
-    {
-        *nb_alloc = &pmalloc;
-        *nb_free  = &pfree;
-    }
-    else
-    {
-        *nb_alloc = nullptr;
-        *nb_free  = nullptr;
-    }
-}
-
 void startGpuProfiler(void)
 {
     /* The NVPROF_ID environment variable is set by nvprof and indicates that
index 6755f1c587929412e3d8ce0f7ab26a4e84184618..8869338e47e4aad1e06b23a0a65fedc3a30c68f6 100644 (file)
@@ -227,25 +227,6 @@ OPENCL_FUNC_TERM_WITH_RETURN(false)
 GPU_FUNC_QUALIFIER
 size_t sizeof_gpu_dev_info() GPU_FUNC_TERM_WITH_RETURN(0)
 
-/*! \brief Returns a pointer *ptr to page-locked memory of size nbytes.
- *
- * The allocated memory is suitable to be used for data transfers between host
- * and GPU.
- * Error handling should be done within this function.
- */
-typedef void gmx_host_alloc_t (void **ptr, size_t nbytes);
-
-/*! \brief Frees page-locked memory pointed to by *ptr.
- *
- * NULL should not be passed to this function.
- */
-typedef void gmx_host_free_t (void *ptr);
-
-/*! \brief Set page-locked memory allocation functions used by the GPU host. */
-void gpu_set_host_malloc_and_free(bool               bUseGpuKernels,
-                                  gmx_host_alloc_t **nb_alloc,
-                                  gmx_host_free_t  **nb_free);
-
 //! Get status of device with specified index
 int gpu_info_get_stat(const gmx_gpu_info_t &info, int index);
 
index 83536a257113b5abeab70085377ff92ad0b7c0ac..d3ce8e0a88c32033c8139ee32515c994cee68f16 100644 (file)
@@ -600,22 +600,6 @@ size_t sizeof_gpu_dev_info()
     return sizeof(gmx_device_info_t);
 }
 
-void gpu_set_host_malloc_and_free(bool               bUseGpuKernels,
-                                  gmx_host_alloc_t **nb_alloc,
-                                  gmx_host_free_t  **nb_free)
-{
-    if (bUseGpuKernels)
-    {
-        *nb_alloc = &pmalloc;
-        *nb_free  = &pfree;
-    }
-    else
-    {
-        *nb_alloc = nullptr;
-        *nb_free  = nullptr;
-    }
-}
-
 int gpu_info_get_stat(const gmx_gpu_info_t &info, int index)
 {
     return info.gpu_dev[index].stat;