return false;
}
- GMX_ASSERT(stat != cudaErrorInvalidResourceHandle, "Stream idnetifier not valid");
+ GMX_ASSERT(stat != cudaErrorInvalidResourceHandle, "Stream identifier not valid");
// cudaSuccess and cudaErrorNotReady are the expected return values
CU_RET_ERR(stat, "Unexpected cudaStreamQuery failure");
std::string ocl_get_error_string(cl_int error);
//! A debug checker to track cl_events being released correctly
-inline void ensureReferenceCount(const cl_event& event, unsigned int refCount)
+inline void ensureReferenceCount(const cl_event& event, unsigned int expectedRefCount)
{
#ifndef NDEBUG
+ cl_uint refCount;
cl_int clError = clGetEventInfo(event, CL_EVENT_REFERENCE_COUNT, sizeof(refCount), &refCount, nullptr);
GMX_ASSERT(CL_SUCCESS == clError, ocl_get_error_string(clError).c_str());
- GMX_ASSERT(refCount == refCount, "Unexpected reference count");
+ GMX_ASSERT(refCount == expectedRefCount, "Unexpected reference count");
#else
GMX_UNUSED_VALUE(event);
- GMX_UNUSED_VALUE(refCount);
+ GMX_UNUSED_VALUE(expectedRefCount);
#endif
}