Skip to main content

TinyXgcfDevice

Struct TinyXgcfDevice 

Source
pub struct TinyXgcfDevice {
    pub num_nodes: usize,
    pub num_vars: usize,
    pub root: u32,
    /* private fields */
}
Expand description

Device-resident XGCF circuit + reusable buffers.

This is used by certification categories that validate transfer efficiency and circuit reuse. The key property: circuit structure is uploaded once; repeated evaluations reuse device buffers.

Fields§

§num_nodes: usize§num_vars: usize§root: u32

Implementations§

Source§

impl TinyXgcfDevice

Source

pub fn upload(ctx: &TestContext, spec: &TinyXgcfSpec) -> Result<Self>

Source

pub fn set_weights( &mut self, ctx: &TestContext, log_true: &[f64], log_false: &[f64], ) -> Result<()>

Source

pub fn forward_launch(&mut self, _ctx: &TestContext) -> Result<()>

Launch forward kernels (no sync, no host transfers).

Source

pub fn forward_download_values(&mut self, ctx: &TestContext) -> Result<Vec<f64>>

Source

pub fn forward_download_root(&mut self, ctx: &TestContext) -> Result<f64>

Source

pub fn backward_only_launch(&mut self, ctx: &TestContext) -> Result<()>

Launch backward kernels using existing d_values (no sync, no host transfers).

Source

pub fn forward_then_backward_launch(&mut self, ctx: &TestContext) -> Result<()>

Convenience helper: forward + backward in one launch sequence (no sync, no host transfers).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V