{
StatePropagatorDataGpu::Impl::Impl(gmx_unused const void *commandStream,
- gmx_unused const void *gpuContext,
+ gmx_unused const void *deviceContext,
GpuApiCallBehavior transferKind,
int paddingSize) :
transferKind_(transferKind),
{
commandStream_ = *static_cast<const CommandStream*>(commandStream);
}
- if (gpuContext != nullptr)
+ if (deviceContext != nullptr)
{
- gpuContext_ = *static_cast<const Context*>(gpuContext);
+ deviceContext_ = *static_cast<const DeviceContext*>(deviceContext);
}
#endif
void StatePropagatorDataGpu::Impl::reinit(int numAtomsLocal, int numAtomsAll)
{
#if GMX_GPU == GMX_GPU_OPENCL
- GMX_ASSERT(gpuContext_ != nullptr, "GPU context should be set in OpenCL builds.");
+ GMX_ASSERT(deviceContext_ != nullptr, "GPU context should be set in OpenCL builds.");
#endif
numAtomsLocal_ = numAtomsLocal;
numAtomsAll_ = numAtomsAll;
numAtomsPadded = numAtomsAll_;
}
- reallocateDeviceBuffer(&d_x_, DIM*numAtomsPadded, &d_xSize_, &d_xCapacity_, gpuContext_);
+ reallocateDeviceBuffer(&d_x_, DIM*numAtomsPadded, &d_xSize_, &d_xCapacity_, deviceContext_);
const size_t paddingAllocationSize = numAtomsPadded - numAtomsAll_;
if (paddingAllocationSize > 0)
clearDeviceBufferAsync(&d_x_, DIM*numAtomsAll_, DIM*paddingAllocationSize, commandStream_);
}
- reallocateDeviceBuffer(&d_v_, DIM*numAtomsAll_, &d_vSize_, &d_vCapacity_, gpuContext_);
- reallocateDeviceBuffer(&d_f_, DIM*numAtomsAll_, &d_fSize_, &d_fCapacity_, gpuContext_);
+ reallocateDeviceBuffer(&d_v_, DIM*numAtomsAll_, &d_vSize_, &d_vCapacity_, deviceContext_);
+ reallocateDeviceBuffer(&d_f_, DIM*numAtomsAll_, &d_fSize_, &d_fCapacity_, deviceContext_);
}
{
#if GMX_GPU == GMX_GPU_OPENCL
- GMX_ASSERT(gpuContext_ != nullptr, "GPU context should be set in OpenCL builds.");
+ GMX_ASSERT(deviceContext_ != nullptr, "GPU context should be set in OpenCL builds.");
#endif
GMX_UNUSED_VALUE(dataSize);
{
#if GMX_GPU == GMX_GPU_OPENCL
- GMX_ASSERT(gpuContext_ != nullptr, "GPU context should be set in OpenCL builds.");
+ GMX_ASSERT(deviceContext_ != nullptr, "GPU context should be set in OpenCL builds.");
#endif
GMX_UNUSED_VALUE(dataSize);
StatePropagatorDataGpu::StatePropagatorDataGpu(const void *commandStream,
- const void *gpuContext,
+ const void *deviceContext,
GpuApiCallBehavior transferKind,
int paddingSize)
: impl_(new Impl(commandStream,
- gpuContext,
+ deviceContext,
transferKind,
paddingSize))
{