This is to folow general naming conventions across the code.
Refs #2887, #2888.
Change-Id: Ia090c0479f1960fe34d1144e3bd173015d157e62
gmx_add_libgromacs_sources(
lincs_cuda.cu
settle_cuda.cu
- leapfrog_cuda.cu
+ leapfrog_gpu.cu
update_constrain_cuda_impl.cu
)
endif()
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020, 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.
* using CUDA, including class initialization, data-structures management
* and GPU kernel.
*
- * \todo Reconsider naming towards using "gpu" suffix instead of "cuda".
- *
* \author Artem Zhmurov <zhmurov@gmail.com>
*
* \ingroup module_mdlib
*/
#include "gmxpre.h"
-#include "leapfrog_cuda.cuh"
+#include "leapfrog_gpu.cuh"
#include <assert.h>
#include <stdio.h>
return kernelPtr;
}
-void LeapFrogCuda::integrate(const float3* d_x,
- float3* d_xp,
- float3* d_v,
- const float3* d_f,
- const real dt,
- const bool doTemperatureScaling,
- gmx::ArrayRef<const t_grp_tcstat> tcstat,
- const bool doParrinelloRahman,
- const float dtPressureCouple,
- const matrix prVelocityScalingMatrix)
+void LeapFrogGpu::integrate(const float3* d_x,
+ float3* d_xp,
+ float3* d_v,
+ const float3* d_f,
+ const real dt,
+ const bool doTemperatureScaling,
+ gmx::ArrayRef<const t_grp_tcstat> tcstat,
+ const bool doParrinelloRahman,
+ const float dtPressureCouple,
+ const matrix prVelocityScalingMatrix)
{
ensureNoPendingCudaError("In CUDA version of Leap-Frog integrator");
return;
}
-LeapFrogCuda::LeapFrogCuda(CommandStream commandStream) : commandStream_(commandStream)
+LeapFrogGpu::LeapFrogGpu(CommandStream commandStream) : commandStream_(commandStream)
{
numAtoms_ = 0;
kernelLaunchConfig_.stream = commandStream_;
}
-LeapFrogCuda::~LeapFrogCuda()
+LeapFrogGpu::~LeapFrogGpu()
{
freeDeviceBuffer(&d_inverseMasses_);
}
-void LeapFrogCuda::set(const t_mdatoms& md, const int numTempScaleValues, const unsigned short* tempScaleGroups)
+void LeapFrogGpu::set(const t_mdatoms& md, const int numTempScaleValues, const unsigned short* tempScaleGroups)
{
numAtoms_ = md.nr;
kernelLaunchConfig_.gridSize[0] = (numAtoms_ + c_threadsPerBlock - 1) / c_threadsPerBlock;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020, 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.
*/
/*! \libinternal \file
*
- * \brief Declarations for CUDA implementation of Leap-Frog.
- *
- * \todo Reconsider naming towards using "gpu" suffix instead of "cuda".
+ * \brief Declarations for GPU implementation of Leap-Frog.
*
* \author Artem Zhmurov <zhmurov@gmail.com>
*
* \ingroup module_mdlib
* \inlibraryapi
*/
-#ifndef GMX_MDLIB_LEAPFROG_CUDA_CUH
-#define GMX_MDLIB_LEAPFROG_CUDA_CUH
+#ifndef GMX_MDLIB_LEAPFROG_GPU_CUH
+#define GMX_MDLIB_LEAPFROG_GPU_CUH
#include "gromacs/gpu_utils/gputraits.cuh"
#include "gromacs/gpu_utils/hostallocator.h"
namespace gmx
{
-class LeapFrogCuda
+class LeapFrogGpu
{
public:
*
* \param[in] commandStream Device command stream to use.
*/
- LeapFrogCuda(CommandStream commandStream);
- ~LeapFrogCuda();
+ LeapFrogGpu(CommandStream commandStream);
+ ~LeapFrogGpu();
/*! \brief Integrate
*
class Impl;
private:
- //! CUDA stream
+ //! GPU stream
CommandStream commandStream_;
- //! CUDA kernel launch config
+ //! GPU kernel launch config
KernelLaunchConfig kernelLaunchConfig_;
//! Number of atoms
int numAtoms_;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020, 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/gpu_utils/devicebuffer.cuh"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/math/vec.h"
-#include "gromacs/mdlib/leapfrog_cuda.cuh"
+#include "gromacs/mdlib/leapfrog_gpu.cuh"
#include "gromacs/mdlib/stat.h"
#include "gromacs/mdtypes/group.h"
copyToDeviceBuffer(&d_v, h_v, 0, numAtoms, nullptr, GpuApiCallBehavior::Sync, nullptr);
copyToDeviceBuffer(&d_f, h_f, 0, numAtoms, nullptr, GpuApiCallBehavior::Sync, nullptr);
- auto integrator = std::make_unique<LeapFrogCuda>(nullptr);
+ auto integrator = std::make_unique<LeapFrogGpu>(nullptr);
integrator->set(testData->mdAtoms_, testData->numTCoupleGroups_, testData->mdAtoms_.cTC);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020, 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.
*/
void integrateLeapFrogSimple(LeapFrogTestData* testData, int numSteps);
-/*! \brief Integrate using CUDA version of Leap-Frog
+/*! \brief Integrate using GPU version of Leap-Frog
*
* Copies data from CPU to GPU, integrates the equation of motion
* for requested number of steps using Leap-Frog algorithm, copies
#include "gromacs/gpu_utils/devicebuffer.h"
#include "gromacs/gpu_utils/gputraits.cuh"
#include "gromacs/gpu_utils/vectype_ops.cuh"
-#include "gromacs/mdlib/leapfrog_cuda.cuh"
+#include "gromacs/mdlib/leapfrog_gpu.cuh"
#include "gromacs/mdlib/lincs_cuda.cuh"
#include "gromacs/mdlib/settle_cuda.cuh"
#include "gromacs/mdlib/update_constrain_cuda.h"
: commandStream_ = nullptr;
- integrator_ = std::make_unique<LeapFrogCuda>(commandStream_);
+ integrator_ = std::make_unique<LeapFrogGpu>(commandStream_);
lincsCuda_ = std::make_unique<LincsCuda>(ir.nLincsIter, ir.nProjOrder, commandStream_);
settleCuda_ = std::make_unique<SettleCuda>(mtop, commandStream_);
#include "gmxpre.h"
#include "gromacs/gpu_utils/gpueventsynchronizer.cuh"
-#include "gromacs/mdlib/leapfrog_cuda.cuh"
+#include "gromacs/mdlib/leapfrog_gpu.cuh"
#include "gromacs/mdlib/lincs_cuda.cuh"
#include "gromacs/mdlib/settle_cuda.cuh"
#include "gromacs/mdlib/update_constrain_cuda.h"
int numInverseMassesAlloc_ = -1;
//! Leap-Frog integrator
- std::unique_ptr<LeapFrogCuda> integrator_;
+ std::unique_ptr<LeapFrogGpu> integrator_;
//! LINCS CUDA object to use for non-water constraints
std::unique_ptr<LincsCuda> lincsCuda_;
//! SETTLE CUDA object for water constrains