Having two getters for the same device buffer is confusing and
polutes the name space. This removes the extra getter and
change to the calls to the other one where it was used.
Refs #2608
stateGpu->fReducedOnDevice());
// register forces and add dependencies
stateGpu->fReducedOnDevice());
// register forces and add dependencies
- fr->gpuForceReduction[gmx::AtomLocality::Local]->registerNbnxmForce(nbv->getGpuForces());
+ fr->gpuForceReduction[gmx::AtomLocality::Local]->registerNbnxmForce(Nbnxm::gpu_get_f(nbv->gpu_nbv));
if (runScheduleWork->simulationWork.useGpuPme
&& (thisRankHasDuty(cr, DUTY_PME) || runScheduleWork->simulationWork.useGpuPmePpCommunication))
if (runScheduleWork->simulationWork.useGpuPme
&& (thisRankHasDuty(cr, DUTY_PME) || runScheduleWork->simulationWork.useGpuPmePpCommunication))
accumulate);
// register forces and add dependencies
accumulate);
// register forces and add dependencies
- fr->gpuForceReduction[gmx::AtomLocality::NonLocal]->registerNbnxmForce(nbv->getGpuForces());
+ fr->gpuForceReduction[gmx::AtomLocality::NonLocal]->registerNbnxmForce(
+ Nbnxm::gpu_get_f(nbv->gpu_nbv));
if (runScheduleWork->domainWork.haveCpuBondedWork || runScheduleWork->domainWork.haveFreeEnergyWork)
{
fr->gpuForceReduction[gmx::AtomLocality::NonLocal]->addDependency(
if (runScheduleWork->domainWork.haveCpuBondedWork || runScheduleWork->domainWork.haveFreeEnergyWork)
{
fr->gpuForceReduction[gmx::AtomLocality::NonLocal]->addDependency(
-DeviceBuffer<gmx::RVec> nonbonded_verlet_t::getGpuForces() const
-{
- return Nbnxm::getGpuForces(gpu_nbv);
-}
-
real nonbonded_verlet_t::pairlistInnerRadius() const
{
return pairlistSets_->params().rlistInner;
real nonbonded_verlet_t::pairlistInnerRadius() const
{
return pairlistSets_->params().rlistInner;
*/
int getNumAtoms(gmx::AtomLocality locality) const;
*/
int getNumAtoms(gmx::AtomLocality locality) const;
- /*! \brief Get the pointer to the GPU nonbonded force buffer
- *
- * \returns A pointer to the force buffer in GPU memory
- */
- DeviceBuffer<gmx::RVec> getGpuForces() const;
-
//! Return the kernel setup
const Nbnxm::KernelSetup& kernelSetup() const { return kernelSetup_; }
//! Return the kernel setup
const Nbnxm::KernelSetup& kernelSetup() const { return kernelSetup_; }
bool haveGpuShortRangeWork(const NbnxmGpu gmx_unused* nb, gmx::InteractionLocality gmx_unused interactionLocality)
GPU_FUNC_TERM_WITH_RETURN(false);
bool haveGpuShortRangeWork(const NbnxmGpu gmx_unused* nb, gmx::InteractionLocality gmx_unused interactionLocality)
GPU_FUNC_TERM_WITH_RETURN(false);
-/*! \brief Get the pointer to the GPU nonbonded force buffer
- *
- * \param[in] nb The nonbonded data GPU structure
- * \returns A pointer to the force buffer in GPU memory
- */
-GPU_FUNC_QUALIFIER
-DeviceBuffer<gmx::RVec> getGpuForces(NbnxmGpu gmx_unused* nb)
- GPU_FUNC_TERM_WITH_RETURN(DeviceBuffer<gmx::RVec>{});
-
} // namespace Nbnxm
#endif
} // namespace Nbnxm
#endif
-DeviceBuffer<Float3> getGpuForces(NbnxmGpu* nb)
-{
- return nb->atdat->f;
-}
-
GMX_RELEASE_ASSERT(false, "nbnxn_gpu_x_to_nbat_x only supported with CUDA");
}
GMX_RELEASE_ASSERT(false, "nbnxn_gpu_x_to_nbat_x only supported with CUDA");
}
-DeviceBuffer<gmx::RVec> getGpuForces(NbnxmGpu* /*nb*/)
-{
- GMX_RELEASE_ASSERT(false, "getGpuForces only supported with CUDA");
- return DeviceBuffer<gmx::RVec>{};
-}
-
} // namespace Nbnxm
#endif // !GMX_GPU_CUDA
} // namespace Nbnxm
#endif // !GMX_GPU_CUDA