[−][src]Struct accel::device::Device
Handler for device and its primary context
Fields
device: CUdevice
Methods
impl Device
[src]
fn init()
[src]
Initializer for CUDA Driver API
pub fn get_count() -> Result<usize>
[src]
Get number of available GPUs
pub fn nth(id: usize) -> Result<Self>
[src]
pub fn total_memory(&self) -> Result<usize>
[src]
Get total memory of GPU
pub fn get_name(&self) -> Result<String>
[src]
Get name of GPU
pub fn create_context(&self) -> Context
[src]
Create a new CUDA context on this device.
let device = Device::nth(0).unwrap(); let ctx = device.create_context();
Trait Implementations
impl Debug for Device
[src]
impl PartialEq<Device> for Device
[src]
impl PartialOrd<Device> for Device
[src]
fn partial_cmp(&self, other: &Device) -> Option<Ordering>
[src]
fn lt(&self, other: &Device) -> bool
[src]
fn le(&self, other: &Device) -> bool
[src]
fn gt(&self, other: &Device) -> bool
[src]
fn ge(&self, other: &Device) -> bool
[src]
impl StructuralPartialEq for Device
[src]
Auto Trait Implementations
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,