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

Method enqueue_copy_buffer

include/boost/compute/command_queue.hpp:595–627  ·  view source on GitHub ↗

Enqueues a command to copy data from \p src_buffer to \p dst_buffer. \see_opencl_ref{clEnqueueCopyBuffer} \see copy()

Source from the content-addressed store, hash-verified

593 ///
594 /// \see copy()
595 event enqueue_copy_buffer(const buffer &src_buffer,
596 const buffer &dst_buffer,
597 size_t src_offset,
598 size_t dst_offset,
599 size_t size,
600 const wait_list &events = wait_list())
601 {
602 BOOST_ASSERT(m_queue != 0);
603 BOOST_ASSERT(src_offset + size <= src_buffer.size());
604 BOOST_ASSERT(dst_offset + size <= dst_buffer.size());
605 BOOST_ASSERT(src_buffer.get_context() == this->get_context());
606 BOOST_ASSERT(dst_buffer.get_context() == this->get_context());
607
608 event event_;
609
610 cl_int ret = clEnqueueCopyBuffer(
611 m_queue,
612 src_buffer.get(),
613 dst_buffer.get(),
614 src_offset,
615 dst_offset,
616 size,
617 events.size(),
618 events.get_event_ptr(),
619 &event_.get()
620 );
621
622 if(ret != CL_SUCCESS){
623 BOOST_THROW_EXCEPTION(opencl_error(ret));
624 }
625
626 return event_;
627 }
628
629 #if defined(CL_VERSION_1_1) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED)
630 /// Enqueues a command to copy a rectangular region from

Callers 3

cloneMethod · 0.80
dispatch_copyFunction · 0.80
dispatch_copy_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