pub struct VisionHandle { /* private fields */ }Expand description
Lightweight session descriptor for vision model operations.
A VisionHandle does not open a CUDA context; it merely records which
device and SM version are targeted so that PTX kernel generators can
emit architecture-appropriate code, and carries an LCG RNG for
deterministic CPU-side sampling and parameter initialisation.
Implementations§
Source§impl VisionHandle
impl VisionHandle
Sourcepub fn new(device: u32, sm: SmVersion, seed: u64) -> Self
pub fn new(device: u32, sm: SmVersion, seed: u64) -> Self
Create a new handle for the given device, SM version, and RNG seed.
Sourcepub fn default_handle() -> Self
pub fn default_handle() -> Self
Convenience constructor for unit-test / CPU environments (device 0, SM 8.0, seed 42).
Sourcepub fn sm_version(&self) -> SmVersion
pub fn sm_version(&self) -> SmVersion
Return the SM version.
Trait Implementations§
Source§impl Clone for VisionHandle
impl Clone for VisionHandle
Source§fn clone(&self) -> VisionHandle
fn clone(&self) -> VisionHandle
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 moreAuto Trait Implementations§
impl Freeze for VisionHandle
impl RefUnwindSafe for VisionHandle
impl Send for VisionHandle
impl Sync for VisionHandle
impl Unpin for VisionHandle
impl UnsafeUnpin for VisionHandle
impl UnwindSafe for VisionHandle
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