[−][src]Struct cuda::runtime::CudaDevice
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]
fn eq(&self, other: &CudaDevice) -> bool
[src]
fn ne(&self, other: &CudaDevice) -> bool
[src]
impl Clone for CudaDevice
[src]
fn clone(&self) -> 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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,