#[repr(C)]pub struct DeviceBufferView {
pub ptr: *const c_void,
pub size: usize,
}
Expand description
A struct that packs a pointer with a size in bytes to pass on CUDA.
It holds *const c_void
for being a universal simple type that can be read by CUDA.
Since it is hard to enforce immutability preservation, it just holds *const
,
but has two separate constructors for more robustness from the usage perspective.
This is essentially a DeviceBuffer but without owning the data.
Fields§
§ptr: *const c_void
§size: usize
Trait Implementations§
Source§impl Clone for DeviceBufferView
impl Clone for DeviceBufferView
Source§fn clone(&self) -> DeviceBufferView
fn clone(&self) -> DeviceBufferView
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceBufferView
impl Debug for DeviceBufferView
impl Copy for DeviceBufferView
Auto Trait Implementations§
impl Freeze for DeviceBufferView
impl RefUnwindSafe for DeviceBufferView
impl !Send for DeviceBufferView
impl !Sync for DeviceBufferView
impl Unpin for DeviceBufferView
impl UnwindSafe for DeviceBufferView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more