Enqueues a marker in the queue and returns an event that can be used to track its progress.
| 1566 | /// Enqueues a marker in the queue and returns an event that can be |
| 1567 | /// used to track its progress. |
| 1568 | event enqueue_marker() |
| 1569 | { |
| 1570 | event event_; |
| 1571 | cl_int ret = CL_SUCCESS; |
| 1572 | |
| 1573 | #ifdef CL_VERSION_1_2 |
| 1574 | if(get_device().check_version(1, 2)){ |
| 1575 | ret = clEnqueueMarkerWithWaitList(m_queue, 0, 0, &event_.get()); |
| 1576 | } else |
| 1577 | #endif |
| 1578 | { |
| 1579 | ret = clEnqueueMarker(m_queue, &event_.get()); |
| 1580 | } |
| 1581 | |
| 1582 | if(ret != CL_SUCCESS){ |
| 1583 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 1584 | } |
| 1585 | |
| 1586 | return event_; |
| 1587 | } |
| 1588 | |
| 1589 | #if defined(CL_VERSION_1_2) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED) |
| 1590 | /// Enqueues a marker after \p events in the queue and returns an |