pub struct Device {
pub name: String,
pub cc: String,
pub driver_version: String,
/* private fields */
}Fields§
§name: String§cc: String§driver_version: StringImplementations§
Source§impl Device
impl Device
pub fn open() -> Result<Self, String>
pub fn load_module(&self, ptx: &str, entry: &str) -> Result<Module<'_>, String>
pub fn alloc(&self, bytes: usize) -> Result<Buffer<'_>, String>
pub fn copy_in(&self, buffer: &Buffer<'_>, data: &[u8]) -> Result<(), String>
pub fn copy_out( &self, buffer: &Buffer<'_>, out: &mut [u8], ) -> Result<(), String>
pub fn synchronize(&self) -> Result<(), String>
Trait Implementations§
Auto Trait Implementations§
impl !Send for Device
impl !Sync for Device
impl Freeze for Device
impl RefUnwindSafe for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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