[][src]Struct cuda::runtime::CudaDevice

pub struct CudaDevice(pub i32);

Methods

impl CudaDevice[src]

pub fn count() -> CudaResult<i32>[src]

Count the number of devices.

Corresponds to cudaGetDeviceCount.

pub fn reset_current() -> CudaResult[src]

Reset the current device.

Corresponds to cudaDeviceReset.

pub fn synchronize_current() -> CudaResult[src]

Synchronize all work on the current device.

Corresponds to cudaDeviceSynchronize.

pub fn set_flags_current(flags: u32) -> CudaResult[src]

Set flags for the current device.

Corresponds to cudaSetDeviceFlags.

pub fn get_current() -> CudaResult<CudaDevice>[src]

Query the current device.

Corresponds to cudaGetDevice.

pub fn set_current(&self) -> CudaResult[src]

Set the current device.

Corresponds to cudaSetDevice.

pub fn get_properties(&self) -> CudaResult<cudaDeviceProp>[src]

Query the cudaDeviceProp properties struct for the given device.

Corresponds to cudaGetDeviceProperties.

pub fn get_attribute(&self, attr: cudaDeviceAttr) -> CudaResult<i32>[src]

Query the given attribute for the given device.

Corresponds to cudaGetDeviceAttribute.

pub fn can_access_peer(&self, peer_dev: i32) -> CudaResult<bool>[src]

Check whether peer device access to peer_dev can be enabled.

Corresponds to cudaDeviceCanAccessPeer.

pub fn enable_peer_access_current(peer_dev: i32) -> CudaResult<bool>[src]

Enable peer device access from the current device to peer_dev. Returns whether or not peer device access was previously enabled.

Corresponds to cudaDeviceEnablePeerAccess.

pub fn disable_peer_access_current(peer_dev: i32) -> CudaResult<bool>[src]

Disable peer device access from the current device to peer_dev. Returns whether or not peer device access was previously enabled.

Corresponds to cudaDeviceDisablePeerAccess.

pub fn get_mem_info_current() -> CudaResult<MemInfo>[src]

Returns the free and total device memory in bytes for the current device.

Corresponds to cudaMemGetInfo.

Trait Implementations

impl Eq for CudaDevice[src]

impl Copy for CudaDevice[src]

impl PartialEq<CudaDevice> for CudaDevice[src]

impl Clone for CudaDevice[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for CudaDevice[src]

Auto Trait Implementations

impl Send for CudaDevice

impl Sync for CudaDevice

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]