#include "gromacs/gpu_utils/gputraits.h"
#include "gromacs/utility/classhelpers.h"
+class DeviceContext;
struct DeviceInformation;
/*! \internal
/*! \brief
* This is a handle to the GPU context, which is just a dummy in CUDA,
* but is created/destroyed by this class in OpenCL.
- * TODO: Later we want to be able to own the context at a higher level and not here,
- * but this class would still need the non-owning context handle to build the kernels.
*/
- DeviceContext deviceContext_;
+ const DeviceContext& deviceContext_;
//! Conveniently all the PME kernels use the same single argument type
#if GMX_GPU == GMX_GPU_CUDA
PmeGpuProgramImpl() = delete;
//! Constructor for the given device
- explicit PmeGpuProgramImpl(const DeviceInformation& deviceInfo);
+ explicit PmeGpuProgramImpl(const DeviceInformation& deviceInfo, const DeviceContext& deviceContext);
~PmeGpuProgramImpl();
GMX_DISALLOW_COPY_AND_ASSIGN(PmeGpuProgramImpl);