pub struct CpuRes { /* private fields */ }Expand description
CPU evaluation of residual graphs (the interpreter; one per thread).
Implementations§
Source§impl CpuRes
impl CpuRes
Sourcepub fn new(g: &IntGraph, outs: &[IId], learned: bool, off: [u32; 2]) -> Self
pub fn new(g: &IntGraph, outs: &[IId], learned: bool, off: [u32; 2]) -> Self
A static graph (off_init into mt) or a learned one
(off_sig, off_pow).
Sourcepub fn new_ad(g: &IntGraph, outs: &[IId], off: [u32; 2], ad: AdCfg) -> Self
pub fn new_ad(g: &IntGraph, outs: &[IId], off: [u32; 2], ad: AdCfg) -> Self
The adaptive learned role with settings ad (off as for a learned
graph; the stretch table follows the 2^x table, see cpu_mt).
Sourcepub fn res_static(
&mut self,
l: &mut Lane,
mt: &[u32],
stream: &[u32],
sig: u32,
e: u32,
cls: u32,
sctx: u32,
) -> i32
pub fn res_static( &mut self, l: &mut Lane, mt: &[u32], stream: &[u32], sig: u32, e: u32, cls: u32, sctx: u32, ) -> i32
Decode one static-prior residual.
Sourcepub fn res_learned(
&mut self,
l: &mut Lane,
mt: &[u32],
stream: &[u32],
o: &[i32; 5],
adt: &mut [u32],
) -> i32
pub fn res_learned( &mut self, l: &mut Lane, mt: &[u32], stream: &[u32], o: &[i32; 5], adt: &mut [u32], ) -> i32
Decode one learned residual from the net outputs; adt is the lane’s
adaptive state (crate::lmodel3::ad_init, unused by the plain role).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CpuRes
impl RefUnwindSafe for CpuRes
impl Send for CpuRes
impl Sync for CpuRes
impl Unpin for CpuRes
impl UnsafeUnpin for CpuRes
impl UnwindSafe for CpuRes
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