Function ocl_core::enqueue_map_image
[−]
[src]
pub unsafe fn enqueue_map_image<T>(command_queue: &CommandQueue,
image: &Mem,
block: bool,
map_flags: MapFlags,
origin: [usize; 3],
region: [usize; 3],
row_pitch: usize,
slc_pitch: usize,
wait_list: Option<&ClWaitList>,
new_event: Option<&mut ClEventPtrNew>)
-> OclResult<*mut c_void>
[UNTESTED]
Enqueues a command to map a region of the image object given by image
into
the host address space and returns a pointer to this mapped region.
Stability
This function will eventually return a safe wrapper for the mapped host
memory. Until then, just create a Vec
from the returned pointer using
size
/ size_of::
Safety
Caller must ensure that the returned pointer is not used until the map is complete. Use
new_event
to monitor it. [TEMPORARY] It also must be ensured that memory referred to by the returned pointer is not dropped, reused, or otherwise interfered with until enqueue_unmap_mem_object
is called.
TODO: Return a new wrapped type representing the newly mapped memory.