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

Method enqueue_read_image

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

846 ///
847 /// \see_opencl_ref{clEnqueueReadImage}
848 event enqueue_read_image(const image_object& image,
849 const size_t *origin,
850 const size_t *region,
851 size_t row_pitch,
852 size_t slice_pitch,
853 void *host_ptr,
854 const wait_list &events = wait_list())
855 {
856 BOOST_ASSERT(m_queue != 0);
857
858 event event_;
859
860 cl_int ret = clEnqueueReadImage(
861 m_queue,
862 image.get(),
863 CL_TRUE,
864 origin,
865 region,
866 row_pitch,
867 slice_pitch,
868 host_ptr,
869 events.size(),
870 events.get_event_ptr(),
871 &event_.get()
872 );
873
874 if(ret != CL_SUCCESS){
875 BOOST_THROW_EXCEPTION(opencl_error(ret));
876 }
877
878 return event_;
879 }
880
881 /// \overload
882 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