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

Method enqueue_read_image

include/boost/compute/command_queue.hpp:893–924  ·  view source on GitHub ↗

Enqueues a command to read data from \p image to host memory. \see_opencl_ref{clEnqueueReadImage}

Source from the content-addressed store, hash-verified

891 ///
892 /// \see_opencl_ref{clEnqueueReadImage}
893 event enqueue_read_image(const image_object& image,
894 const size_t *origin,
895 const size_t *region,
896 size_t row_pitch,
897 size_t slice_pitch,
898 void *host_ptr,
899 const wait_list &events = wait_list())
900 {
901 BOOST_ASSERT(m_queue != 0);
902
903 event event_;
904
905 cl_int ret = clEnqueueReadImage(
906 m_queue,
907 image.get(),
908 CL_TRUE,
909 origin,
910 region,
911 row_pitch,
912 slice_pitch,
913 host_ptr,
914 events.size(),
915 events.get_event_ptr(),
916 &event_.get()
917 );
918
919 if(ret != CL_SUCCESS){
920 BOOST_THROW_EXCEPTION(opencl_error(ret));
921 }
922
923 return event_;
924 }
925
926 /// \overload
927 template<size_t N>

Callers 4

BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
opencv_copy_image_to_matFunction · 0.80

Calls 8

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

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64