#[repr(C)]pub struct starpu_disk_ops {Show 19 fields
pub plug: Option<unsafe extern "C" fn(parameter: *mut c_void, size: starpu_ssize_t) -> *mut c_void>,
pub unplug: Option<unsafe extern "C" fn(base: *mut c_void)>,
pub bandwidth: Option<unsafe extern "C" fn(node: c_uint, base: *mut c_void) -> c_int>,
pub alloc: Option<unsafe extern "C" fn(base: *mut c_void, size: usize) -> *mut c_void>,
pub free: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, size: usize)>,
pub open: Option<unsafe extern "C" fn(base: *mut c_void, pos: *mut c_void, size: usize) -> *mut c_void>,
pub close: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, size: usize)>,
pub read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *mut c_void, offset: off_t, size: usize) -> c_int>,
pub write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *const c_void, offset: off_t, size: usize) -> c_int>,
pub full_read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut *mut c_void, size: *mut usize, dst_node: c_uint) -> c_int>,
pub full_write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut c_void, size: usize) -> c_int>,
pub async_write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *mut c_void, offset: off_t, size: usize) -> *mut c_void>,
pub async_read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *mut c_void, offset: off_t, size: usize) -> *mut c_void>,
pub async_full_read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut *mut c_void, size: *mut usize, dst_node: c_uint) -> *mut c_void>,
pub async_full_write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut c_void, size: usize) -> *mut c_void>,
pub copy: Option<unsafe extern "C" fn(base_src: *mut c_void, obj_src: *mut c_void, offset_src: off_t, base_dst: *mut c_void, obj_dst: *mut c_void, offset_dst: off_t, size: usize) -> *mut c_void>,
pub wait_request: Option<unsafe extern "C" fn(async_channel: *mut c_void)>,
pub test_request: Option<unsafe extern "C" fn(async_channel: *mut c_void) -> c_int>,
pub free_request: Option<unsafe extern "C" fn(async_channel: *mut c_void)>,
}Expand description
Set of functions to manipulate data on disk. See \ref DiskFunctions for more details.
Fields§
§plug: Option<unsafe extern "C" fn(parameter: *mut c_void, size: starpu_ssize_t) -> *mut c_void>Connect a disk memory at location \p parameter with size \p size, and return a base as void*, which will be passed by StarPU to all other methods.
unplug: Option<unsafe extern "C" fn(base: *mut c_void)>Disconnect a disk memory \p base.
bandwidth: Option<unsafe extern "C" fn(node: c_uint, base: *mut c_void) -> c_int>Measure the bandwidth and the latency for the disk \p node and save it. Returns 1 if it could measure it.
alloc: Option<unsafe extern "C" fn(base: *mut c_void, size: usize) -> *mut c_void>Create a new location for data of size \p size. Return an opaque object pointer.
free: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, size: usize)>Free a data \p obj previously allocated with starpu_disk_ops::alloc.
open: Option<unsafe extern "C" fn(base: *mut c_void, pos: *mut c_void, size: usize) -> *mut c_void>Open an existing location of data, at a specific position \p pos dependent on the backend.
close: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, size: usize)>Close, without deleting it, a location of data \p obj.
read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *mut c_void, offset: off_t, size: usize) -> c_int>Read \p size bytes of data from \p obj in \p base, at offset \p offset, and put into \p buf. Return the actual number of read bytes.
write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *const c_void, offset: off_t, size: usize) -> c_int>Write \p size bytes of data to \p obj in \p base, at offset \p offset, from \p buf. Return 0 on success.
full_read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut *mut c_void, size: *mut usize, dst_node: c_uint) -> c_int>Read all data from \p obj of \p base, from offset 0. Returns it in an allocated buffer \p ptr, of size \p size
full_write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut c_void, size: usize) -> c_int>Write data in \p ptr to \p obj of \p base, from offset 0, and truncate \p obj to \p size, so that a \c full_read will get it.
async_write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *mut c_void, offset: off_t, size: usize) -> *mut c_void>Asynchronously write \p size bytes of data to \p obj in \p base, at offset \p offset, from \p buf. Return a void* pointer that StarPU will pass to \c xxx_request methods for testing for the completion.
async_read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, buf: *mut c_void, offset: off_t, size: usize) -> *mut c_void>Asynchronously read \p size bytes of data from \p obj in \p base, at offset \p offset, and put into \p buf. Return a void* pointer that StarPU will pass to \c xxx_request methods for testing for the completion.
async_full_read: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut *mut c_void, size: *mut usize, dst_node: c_uint) -> *mut c_void>Read all data from \p obj of \p base, from offset 0. Return it in an allocated buffer \p ptr, of size \p size
async_full_write: Option<unsafe extern "C" fn(base: *mut c_void, obj: *mut c_void, ptr: *mut c_void, size: usize) -> *mut c_void>Write data in \p ptr to \p obj of \p base, from offset 0, and truncate \p obj to \p size, so that a starpu_disk_ops::full_read will get it.
copy: Option<unsafe extern "C" fn(base_src: *mut c_void, obj_src: *mut c_void, offset_src: off_t, base_dst: *mut c_void, obj_dst: *mut c_void, offset_dst: off_t, size: usize) -> *mut c_void>Copy from offset \p offset_src of disk object \p obj_src in \p base_src to offset \p offset_dst of disk object \p obj_dst in \p base_dst. Return a void* pointer that StarPU will pass to \c xxx_request methods for testing for the completion.
wait_request: Option<unsafe extern "C" fn(async_channel: *mut c_void)>Wait for completion of request \p async_channel returned by a previous asynchronous read, write or copy.
test_request: Option<unsafe extern "C" fn(async_channel: *mut c_void) -> c_int>Test for completion of request \p async_channel returned by a previous asynchronous read, write or copy. Return 1 on completion, 0 otherwise.
free_request: Option<unsafe extern "C" fn(async_channel: *mut c_void)>Free the request allocated by a previous asynchronous read, write or copy.
Trait Implementations§
Source§impl Clone for starpu_disk_ops
impl Clone for starpu_disk_ops
Source§fn clone(&self) -> starpu_disk_ops
fn clone(&self) -> starpu_disk_ops
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more