Trait WriteMemory

Source
pub trait WriteMemory<T: Default + Debug>: AsMutVoidPtr {
    // Required methods
    fn memcpy(&mut self, p: *const T, len: usize) -> Result<usize, Error>;
    fn memcpy_repeat(
        &mut self,
        p: *const T,
        len: usize,
        count: usize,
    ) -> Result<usize, Error>;
}
Expand description

Trait to implement cuda synchronous memory write operations

Required Methods§

Source

fn memcpy(&mut self, p: *const T, len: usize) -> Result<usize, Error>

Memory Copy

§Arguments
  • p - Pointer to source memory
  • len - Number of elements of the value to be copied
§Errors

This function may return the following errors

Source

fn memcpy_repeat( &mut self, p: *const T, len: usize, count: usize, ) -> Result<usize, Error>

Repeatedly copy the contents of memory

§Arguments
  • p - Pointer to source memory
  • len - Number of elements of the value to be copied
  • count - Number of times to copy repeatedly
§Errors

This function may return the following errors

Implementors§