MCPcopy Create free account
hub / github.com/boostorg/compute / enqueue_fill_buffer

Method enqueue_fill_buffer

include/boost/compute/command_queue.hpp:730–760  ·  view source on GitHub ↗

Enqueues a command to fill \p buffer with \p pattern. \see_opencl_ref{clEnqueueFillBuffer} \opencl_version_warning{1,2} \see fill()

Source from the content-addressed store, hash-verified

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.

Callers 2

dispatch_fillFunction · 0.80
dispatch_fill_asyncFunction · 0.80

Calls 6

get_contextMethod · 0.95
wait_listClass · 0.85
opencl_errorClass · 0.85
get_event_ptrMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected