starpu_disk_ops

Struct starpu_disk_ops 

Source
#[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

Source§

fn clone(&self) -> starpu_disk_ops

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for starpu_disk_ops

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for starpu_disk_ops

Source§

fn default() -> starpu_disk_ops

Returns the “default value” for a type. Read more
Source§

impl Copy for starpu_disk_ops

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.