Extend GPU traits class
[alexxy/gromacs.git] / src / gromacs / gpu_utils / devicebuffer.h
index 7e0ff99e7723de8a98da8e71d0e52856f358646d..5c469cead9b2bb02f3cfd8ecb2223f8bb69bc0eb 100644 (file)
@@ -65,7 +65,7 @@
  *  Allocation is buffered and therefore freeing is only needed
  *  if the previously allocated space is not enough.
  *  \p currentNumValues and \p currentMaxNumValues are updated.
- *  TODO: \p currentNumValues, \p currentMaxNumValues, \p context
+ *  TODO: \p currentNumValues, \p currentMaxNumValues, \p deviceContext
  *  should all be encapsulated in a host-side class together with the buffer.
  *
  *  \tparam        ValueType            Raw value type of the \p buffer.
  *  \param[in]     numValues            Number of values to accommodate.
  *  \param[in,out] currentNumValues     The pointer to the buffer's number of values.
  *  \param[in,out] currentMaxNumValues  The pointer to the buffer's capacity.
- *  \param[in]     context              The buffer's context.
+ *  \param[in]     deviceContext        The buffer's device context.
  */
 template <typename ValueType>
 void reallocateDeviceBuffer(DeviceBuffer<ValueType> *buffer,
                             size_t                   numValues,
                             int                     *currentNumValues,
                             int                     *currentMaxNumValues,
-                            Context                  context)
+                            DeviceContext            deviceContext)
 {
     GMX_ASSERT(buffer, "needs a buffer pointer");
     GMX_ASSERT(currentNumValues, "needs a size pointer");
@@ -95,7 +95,7 @@ void reallocateDeviceBuffer(DeviceBuffer<ValueType> *buffer,
         }
 
         *currentMaxNumValues = over_alloc_large(numValues);
-        allocateDeviceBuffer(buffer, *currentMaxNumValues, context);
+        allocateDeviceBuffer(buffer, *currentMaxNumValues, deviceContext);
     }
     /* size could have changed without actual reallocation */
     *currentNumValues = numValues;