/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,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.
/*! \brief Marks the synchronization point in the \p stream.
* Should be called first and then followed by waitForEvent().
*/
- inline void markEvent(CommandStream stream)
+ inline void markEvent(const DeviceStream& deviceStream)
{
GMX_ASSERT(nullptr == event_, "Do not call markEvent more than once!");
- cl_int clError = clEnqueueMarkerWithWaitList(stream, 0, nullptr, &event_);
+ cl_int clError = clEnqueueMarkerWithWaitList(deviceStream.stream(), 0, nullptr, &event_);
if (CL_SUCCESS != clError)
{
GMX_THROW(gmx::InternalError("Failed to enqueue the GPU synchronization event: "
* After enqueue, the associated event is released, so this method should
* be only called once per markEvent() call.
*/
- inline void enqueueWaitEvent(CommandStream stream)
+ inline void enqueueWaitEvent(const DeviceStream& deviceStream)
{
- cl_int clError = clEnqueueBarrierWithWaitList(stream, 1, &event_, nullptr);
+ cl_int clError = clEnqueueBarrierWithWaitList(deviceStream.stream(), 1, &event_, nullptr);
if (CL_SUCCESS != clError)
{
GMX_THROW(gmx::InternalError("Failed to enqueue device barrier for the GPU event: "