Removed unused host-side allocation code
authorMark Abraham <mark.j.abraham@gmail.com>
Sun, 6 Aug 2017 10:17:13 +0000 (12:17 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Sun, 6 Aug 2017 10:23:59 +0000 (12:23 +0200)
Even though the code is not called ever, compiling with gcc 6 and CUDA
9.0 triggers our static assertion preventing the inadvertent use of
smalloc on a C++ type with a constructor.

Fixes #2227

Change-Id: I2cb66e3f9e90cd809467f2c9b42c07b97e2b19ca

src/gromacs/gpu_utils/cudautils.cu
src/gromacs/gpu_utils/cudautils.cuh

index 5a43f00963ba9a528252fd6f697788570574e014..dde0bb3669e6150f87ea0c3d703ab8bc0e34b956 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017, 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.
@@ -85,18 +85,6 @@ int cu_copy_D2H_async(void * h_dest, void * d_src, size_t bytes, cudaStream_t s
     return cu_copy_D2H_generic(h_dest, d_src, bytes, true, s);
 }
 
-int cu_copy_D2H_alloc(void ** h_dest, void * d_src, size_t bytes)
-{
-    if (h_dest == NULL || d_src == NULL || bytes == 0)
-    {
-        return -1;
-    }
-
-    smalloc(*h_dest, bytes);
-
-    return cu_copy_D2H(*h_dest, d_src, bytes);
-}
-
 /*! Launches synchronous or asynchronous device to host memory copy.
  *
  *  The copy is launched in stream s or if not specified, in stream 0.
index 5daa040d28f5e00e964766c351ed7af57917c991..f26d134f84e494b105e4336f003b832a6a346375 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2016,2017, 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.
@@ -137,10 +137,6 @@ int cu_copy_D2H(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*/);
 
-/*! Allocates host memory and launches synchronous host to device memory copy. */
-int cu_copy_D2H_alloc(void ** /*h_dest*/, void * /*d_src*/, size_t /*bytes*/);
-
-
 /*! Launches synchronous host to device memory copy. */
 int cu_copy_H2D(void * /*d_dest*/, void * /*h_src*/, size_t /*bytes*/);