Enqueues a command to fill \p buffer with \p pattern. \see_opencl_ref{clEnqueueFillBuffer} \opencl_version_warning{1,2} \see fill()
| 728 | /// |
| 729 | /// \see fill() |
| 730 | event enqueue_fill_buffer(const buffer &buffer, |
| 731 | const void *pattern, |
| 732 | size_t pattern_size, |
| 733 | size_t offset, |
| 734 | size_t size, |
| 735 | const wait_list &events = wait_list()) |
| 736 | { |
| 737 | BOOST_ASSERT(m_queue != 0); |
| 738 | BOOST_ASSERT(offset + size <= buffer.size()); |
| 739 | BOOST_ASSERT(buffer.get_context() == this->get_context()); |
| 740 | |
| 741 | event event_; |
| 742 | |
| 743 | cl_int ret = clEnqueueFillBuffer( |
| 744 | m_queue, |
| 745 | buffer.get(), |
| 746 | pattern, |
| 747 | pattern_size, |
| 748 | offset, |
| 749 | size, |
| 750 | events.size(), |
| 751 | events.get_event_ptr(), |
| 752 | &event_.get() |
| 753 | ); |
| 754 | |
| 755 | if(ret != CL_SUCCESS){ |
| 756 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 757 | } |
| 758 | |
| 759 | return event_; |
| 760 | } |
| 761 | #endif // BOOST_COMPUTE_CL_VERSION_1_2 |
| 762 | |
| 763 | /// Enqueues a command to map \p buffer into the host address space. |
no test coverage detected