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.
pub const fn as_raw(self) -> CUfunction
pub const fn is_null(self) -> bool
Trait Implementations§
Source§impl Clone for DeviceFunction
impl Clone for DeviceFunction
Source§fn clone(&self) -> DeviceFunction
fn clone(&self) -> DeviceFunction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl 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
Source§fn eq(&self, other: &DeviceFunction) -> bool
fn eq(&self, other: &DeviceFunction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DeviceFunction
Auto Trait Implementations§
impl !Send for DeviceFunction
impl !Sync for DeviceFunction
impl Freeze 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