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

Method enqueue_map_buffer

include/boost/compute/command_queue.hpp:723–753  ·  view source on GitHub ↗

Enqueues a command to map \p buffer into the host address space. Event associated with map operation is returned through \p map_buffer_event parameter. \see_opencl_ref{clEnqueueMapBuffer}

Source from the content-addressed store, hash-verified

721 ///
722 /// \see_opencl_ref{clEnqueueMapBuffer}
723 void* enqueue_map_buffer(const buffer &buffer,
724 cl_map_flags flags,
725 size_t offset,
726 size_t size,
727 event &map_buffer_event,
728 const wait_list &events = wait_list())
729 {
730 BOOST_ASSERT(m_queue != 0);
731 BOOST_ASSERT(offset + size <= buffer.size());
732 BOOST_ASSERT(buffer.get_context() == this->get_context());
733
734 cl_int ret = 0;
735 void *pointer = clEnqueueMapBuffer(
736 m_queue,
737 buffer.get(),
738 CL_TRUE,
739 flags,
740 offset,
741 size,
742 events.size(),
743 events.get_event_ptr(),
744 &map_buffer_event.get(),
745 &ret
746 );
747
748 if(ret != CL_SUCCESS){
749 BOOST_THROW_EXCEPTION(opencl_error(ret));
750 }
751
752 return pointer;
753 }
754
755 /// \overload
756 void* enqueue_map_buffer(const buffer &buffer,

Callers 3

test_transform.cppFile · 0.80
mapMethod · 0.80
find_extrema_with_reduceFunction · 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