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}
| 967 | /// |
| 968 | /// \see_opencl_ref{clEnqueueMapImage} |
| 969 | void* enqueue_map_image(const image_object &image, |
| 970 | cl_map_flags flags, |
| 971 | const size_t *origin, |
| 972 | const size_t *region, |
| 973 | size_t &output_row_pitch, |
| 974 | size_t &output_slice_pitch, |
| 975 | event &map_image_event, |
| 976 | const wait_list &events = wait_list()) |
| 977 | { |
| 978 | BOOST_ASSERT(m_queue != 0); |
| 979 | BOOST_ASSERT(image.get_context() == this->get_context()); |
| 980 | |
| 981 | cl_int ret = 0; |
| 982 | void *pointer = clEnqueueMapImage( |
| 983 | m_queue, |
| 984 | image.get(), |
| 985 | CL_TRUE, |
| 986 | flags, |
| 987 | origin, |
| 988 | region, |
| 989 | &output_row_pitch, |
| 990 | &output_slice_pitch, |
| 991 | events.size(), |
| 992 | events.get_event_ptr(), |
| 993 | &map_image_event.get(), |
| 994 | &ret |
| 995 | ); |
| 996 | |
| 997 | if(ret != CL_SUCCESS){ |
| 998 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 999 | } |
| 1000 | |
| 1001 | return pointer; |
| 1002 | } |
| 1003 | |
| 1004 | /// \overload |
| 1005 | void* enqueue_map_image(const image_object &image, |