Enqueues a marker in the queue and returns an event that can be used to track its progress.
| 1620 | /// Enqueues a marker in the queue and returns an event that can be |
| 1621 | /// used to track its progress. |
| 1622 | event enqueue_marker() |
| 1623 | { |
| 1624 | event event_; |
| 1625 | cl_int ret = CL_SUCCESS; |
| 1626 | |
| 1627 | #ifdef BOOST_COMPUTE_CL_VERSION_1_2 |
| 1628 | if(get_device().check_version(1, 2)){ |
| 1629 | ret = clEnqueueMarkerWithWaitList(m_queue, 0, 0, &event_.get()); |
| 1630 | } else |
| 1631 | #endif |
| 1632 | { |
| 1633 | // Suppress deprecated declarations warning |
| 1634 | BOOST_COMPUTE_DISABLE_DEPRECATED_DECLARATIONS(); |
| 1635 | ret = clEnqueueMarker(m_queue, &event_.get()); |
| 1636 | BOOST_COMPUTE_ENABLE_DEPRECATED_DECLARATIONS(); |
| 1637 | } |
| 1638 | |
| 1639 | if(ret != CL_SUCCESS){ |
| 1640 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 1641 | } |
| 1642 | |
| 1643 | return event_; |
| 1644 | } |
| 1645 | |
| 1646 | #if defined(BOOST_COMPUTE_CL_VERSION_1_2) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED) |
| 1647 | /// Enqueues a marker after \p events in the queue and returns an |