Rename synchronous GPU transfer functions to match the asynchronous ones
authorAleksei Iupinov <a.yupinov@gmail.com>
Thu, 9 Nov 2017 18:07:30 +0000 (19:07 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 9 Nov 2017 22:33:42 +0000 (23:33 +0100)
Change-Id: I5cb8e9cab208c1d0c62f985ec3140540ea427fb2

src/gromacs/gpu_utils/cudautils.cu
src/gromacs/gpu_utils/cudautils.cuh
src/gromacs/gpu_utils/oclutils.cpp
src/gromacs/gpu_utils/oclutils.h
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_data_mgmt.cpp

index 28316f8ba9f11b7b04c21ed484a12e37a3702642..caba44f3cc7a19344199622d53c986a8086fc1ba 100644 (file)
@@ -74,7 +74,7 @@ static int cu_copy_D2H_generic(void * h_dest, void * d_src, size_t bytes,
     return 0;
 }
 
-int cu_copy_D2H(void * h_dest, void * d_src, size_t bytes)
+int cu_copy_D2H_sync(void * h_dest, void * d_src, size_t bytes)
 {
     return cu_copy_D2H_generic(h_dest, d_src, bytes, false);
 }
@@ -115,7 +115,7 @@ static int cu_copy_H2D_generic(void * d_dest, void * h_src, size_t bytes,
     return 0;
 }
 
-int cu_copy_H2D(void * d_dest, void * h_src, size_t bytes)
+int cu_copy_H2D_sync(void * d_dest, void * h_src, size_t bytes)
 {
     return cu_copy_H2D_generic(d_dest, h_src, bytes, false);
 }
@@ -204,7 +204,7 @@ void cu_realloc_buffered(void **d_dest, void *h_src,
         }
         else
         {
-            cu_copy_H2D(*d_dest, h_src,  *curr_size * type_size);
+            cu_copy_H2D_sync(*d_dest, h_src,  *curr_size * type_size);
         }
     }
 }
@@ -290,7 +290,7 @@ void initParamLookupTable(T                        * &d_ptr,
     const size_t sizeInBytes = numElem * sizeof(*d_ptr);
     cudaError_t  stat        = cudaMalloc((void **)&d_ptr, sizeInBytes);
     CU_RET_ERR(stat, "cudaMalloc failed in initParamLookupTable");
-    cu_copy_H2D(d_ptr, (void *)h_ptr, sizeInBytes);
+    cu_copy_H2D_sync(d_ptr, (void *)h_ptr, sizeInBytes);
 
     if (!c_disableCudaTextures)
     {
index feb241d59336b7db6475a52355d4c90da2746cb2..b05cf65f997b8f773566ef76094a21a444b4710b 100644 (file)
@@ -135,14 +135,14 @@ struct gmx_device_info_t
 };
 
 
-/*! Launches asynchronous host to device memory copy in stream 0. */
-int cu_copy_D2H(void * /*h_dest*/, void * /*d_src*/, size_t /*bytes*/);
+/*! Launches synchronous host to device memory copy in stream 0. */
+int cu_copy_D2H_sync(void * /*h_dest*/, void * /*d_src*/, size_t /*bytes*/);
 
 /*! Launches asynchronous host to device memory copy in stream s. */
 int cu_copy_D2H_async(void * /*h_dest*/, void * /*d_src*/, size_t /*bytes*/, cudaStream_t /*s = 0*/);
 
 /*! Launches synchronous host to device memory copy. */
-int cu_copy_H2D(void * /*d_dest*/, void * /*h_src*/, size_t /*bytes*/);
+int cu_copy_H2D_sync(void * /*d_dest*/, void * /*h_src*/, size_t /*bytes*/);
 
 /*! Launches asynchronous host to device memory copy in stream s. */
 int cu_copy_H2D_async(void * /*d_dest*/, void * /*h_src*/, size_t /*bytes*/, cudaStream_t /*s = 0*/);
index 0e38ddb8eabd91ac4922624885bfe1ad25967ad0..384242f82743230c7aa2bb17ca29d30f9b349ecd 100644 (file)
@@ -102,9 +102,9 @@ int ocl_copy_H2D_async(cl_mem d_dest, void * h_src,
 
 /*! \brief Launches synchronous host to device memory copy.
  */
-int ocl_copy_H2D(cl_mem d_dest, void * h_src,
-                 size_t offset, size_t bytes,
-                 cl_command_queue command_queue)
+int ocl_copy_H2D_sync(cl_mem d_dest, void * h_src,
+                      size_t offset, size_t bytes,
+                      cl_command_queue command_queue)
 {
     return ocl_copy_H2D_generic(d_dest, h_src, offset, bytes, false, command_queue, NULL);
 }
index 0ca91f7b59d7213ebd29d76116839d10a8ca4d10..232ad4f5fea7567b91ddfca34c8d748408e0e495 100644 (file)
@@ -115,9 +115,9 @@ int ocl_copy_D2H_async(void * h_dest, cl_mem d_src,
                        cl_event *copy_event);
 
 /*! \brief Launches synchronous host to device memory copy. */
-int ocl_copy_H2D(cl_mem d_dest, void * h_src,
-                 size_t offset, size_t bytes,
-                 cl_command_queue command_queue);
+int ocl_copy_H2D_sync(cl_mem d_dest, void * h_src,
+                      size_t offset, size_t bytes,
+                      cl_command_queue command_queue);
 
 /*! \brief Allocate host memory in malloc style */
 void ocl_pmalloc(void **h_ptr, size_t nbytes);
index 6174281e3dab4574ab8720033d762cc48044eeba..e6d2cb15b9b44b22d1b7ae0f25f7628db028ea9a 100644 (file)
@@ -178,7 +178,7 @@ static void ocl_realloc_buffered(cl_mem *d_dest, void *h_src,
         }
         else
         {
-            ocl_copy_H2D(*d_dest, h_src,  0, *curr_size * type_size, s);
+            ocl_copy_H2D_sync(*d_dest, h_src,  0, *curr_size * type_size, s);
         }
     }
 }