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

Method enqueue_fill_buffer

include/boost/compute/command_queue.hpp:685–715  ·  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

683 ///
684 /// \see fill()
685 event enqueue_fill_buffer(const buffer &buffer,
686 const void *pattern,
687 size_t pattern_size,
688 size_t offset,
689 size_t size,
690 const wait_list &events = wait_list())
691 {
692 BOOST_ASSERT(m_queue != 0);
693 BOOST_ASSERT(offset + size <= buffer.size());
694 BOOST_ASSERT(buffer.get_context() == this->get_context());
695
696 event event_;
697
698 cl_int ret = clEnqueueFillBuffer(
699 m_queue,
700 buffer.get(),
701 pattern,
702 pattern_size,
703 offset,
704 size,
705 events.size(),
706 events.get_event_ptr(),
707 &event_.get()
708 );
709
710 if(ret != CL_SUCCESS){
711 BOOST_THROW_EXCEPTION(opencl_error(ret));
712 }
713
714 return event_;
715 }
716 #endif // CL_VERSION_1_2
717
718 /// 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