Skip to main content

RowNllProgramRowJet

Trait RowNllProgramRowJet 

Source
pub trait RowNllProgramRowJet<const K: usize>: Send + Sync {
    // Required methods
    fn n_rows(&self) -> usize;
    fn primaries(&self, row: usize) -> Result<[f64; K], String>;
    fn row_nll<R: RowJet<K>>(
        &self,
        rows: &[usize],
        p: &[R; K],
    ) -> Result<R, String>;
}
Expand description

A family’s row negative log-likelihood written ONCE over the RowJet bridge, so the SAME body instantiates at the scalar jets (for the (v, g, H) and contracted-tensor channels) AND at the f64x4 lane towers (for the 4-rows-per-pass SIMD batch). This is the lane-capable successor to RowNllProgramGeneric: a body written here gets the scalar channels through rowjet_row_kernel / rowjet_third_contracted / rowjet_fourth_contracted and the batched channels through generic_batched_fourth_tower / generic_batched_third_tower, all from a single source.

Required Methods§

Source

fn n_rows(&self) -> usize

Number of observations the program covers.

Source

fn primaries(&self, row: usize) -> Result<[f64; K], String>

Current primary-scalar values for row (where to seed each lane).

Source

fn row_nll<R: RowJet<K>>(&self, rows: &[usize], p: &[R; K]) -> Result<R, String>

The row NLL evaluated on the RowJet bridge. rows is the lane→row map (length 1 for a scalar instantiation, length 4 for a batch); p[a] arrives pre-seeded by the caller (base value plus, for the directional scalars, the nilpotent contraction directions). The body uses ONLY RowJet ops and per-row data entering through rows/self as constants.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§