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

Method enqueue_map_image

include/boost/compute/command_queue.hpp:1014–1047  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1012 ///
1013 /// \see_opencl_ref{clEnqueueMapImage}
1014 void* enqueue_map_image(const image_object &image,
1015 cl_map_flags flags,
1016 const size_t *origin,
1017 const size_t *region,
1018 size_t &output_row_pitch,
1019 size_t &output_slice_pitch,
1020 event &map_image_event,
1021 const wait_list &events = wait_list())
1022 {
1023 BOOST_ASSERT(m_queue != 0);
1024 BOOST_ASSERT(image.get_context() == this->get_context());
1025
1026 cl_int ret = 0;
1027 void *pointer = clEnqueueMapImage(
1028 m_queue,
1029 image.get(),
1030 CL_TRUE,
1031 flags,
1032 origin,
1033 region,
1034 &output_row_pitch,
1035 &output_slice_pitch,
1036 events.size(),
1037 events.get_event_ptr(),
1038 &map_image_event.get(),
1039 &ret
1040 );
1041
1042 if(ret != CL_SUCCESS){
1043 BOOST_THROW_EXCEPTION(opencl_error(ret));
1044 }
1045
1046 return pointer;
1047 }
1048
1049 /// \overload
1050 void* enqueue_map_image(const image_object &image,

Callers 1

BOOST_AUTO_TEST_CASEFunction · 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 1

BOOST_AUTO_TEST_CASEFunction · 0.64