2
0
mirror of https://github.com/boostorg/compute.git synced 2026-02-23 15:42:17 +00:00

check result of flush and finish

This commit is contained in:
Dmitry Trifonov
2016-09-14 12:02:41 -07:00
parent 86211062a7
commit 9b2e9d05ab

View File

@@ -1511,7 +1511,10 @@ public:
{
BOOST_ASSERT(m_queue != 0);
clFlush(m_queue);
cl_int ret = clFlush(m_queue);
if(ret != CL_SUCCESS){
BOOST_THROW_EXCEPTION(opencl_error(ret));
}
}
/// Blocks until all outstanding commands in the queue have finished.
@@ -1521,7 +1524,10 @@ public:
{
BOOST_ASSERT(m_queue != 0);
clFinish(m_queue);
cl_int ret = clFinish(m_queue);
if(ret != CL_SUCCESS){
BOOST_THROW_EXCEPTION(opencl_error(ret));
}
}
/// Enqueues a barrier in the queue.