pub struct DeviceFunction(/* private fields */);Expand description
CUDA device function handle.
CUDA owns the underlying function as part of a module, library, or runtime registration. This wrapper is a copyable handle value and does not unload or destroy the function.
Implementations§
Source§impl DeviceFunction
impl DeviceFunction
Sourcepub const unsafe fn new(raw: CUfunction) -> Self
pub const unsafe fn new(raw: CUfunction) -> Self
Wraps a raw CUDA device function handle.
§Safety
raw must be a valid CUDA function handle whose owning module, library, or runtime registration remains loaded for every operation that uses the returned handle.
Sourcepub const unsafe fn from_raw(raw: CUfunction) -> Self
pub const unsafe fn from_raw(raw: CUfunction) -> Self
Wraps a raw CUDA device function handle.
§Safety
raw must be a valid CUDA function handle whose owning module, library, or runtime registration remains loaded for every operation that uses the returned handle.
Sourcepub const fn as_raw(self) -> CUfunction
pub const fn as_raw(self) -> CUfunction
Returns the stored native CUDA device function handle without transferring ownership.
Trait Implementations§
Source§impl Clone for DeviceFunction
impl Clone for DeviceFunction
impl Copy for DeviceFunction
Source§impl Debug for DeviceFunction
impl Debug for DeviceFunction
impl Eq for DeviceFunction
Source§impl From<DeviceFunction> for CUfunction
impl From<DeviceFunction> for CUfunction
Source§fn from(value: DeviceFunction) -> Self
fn from(value: DeviceFunction) -> Self
Converts to this type from the input type.
Source§impl Hash for DeviceFunction
impl Hash for DeviceFunction
Source§impl PartialEq for DeviceFunction
impl PartialEq for DeviceFunction
impl StructuralPartialEq for DeviceFunction
Auto Trait Implementations§
impl !Send for DeviceFunction
impl !Sync for DeviceFunction
impl Forget for DeviceFunction
impl Freeze for DeviceFunction
impl Move for DeviceFunction
impl RefUnwindSafe for DeviceFunction
impl Unpin for DeviceFunction
impl UnsafeUnpin for DeviceFunction
impl UnwindSafe for DeviceFunction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.