pub struct DynamicOneSeedBatch<'arena> {
pub base: DynamicOrder2<'arena>,
/* private fields */
}Expand description
Runtime-sized batch of one-seed contractions sharing one order-two base.
Lane l is algebraically identical to a standalone DynamicOneSeed
seeded by direction u_l, but the value/gradient/Hessian base is evaluated
once rather than once per direction. The output lane’s epsilon Hessian is
sum_c d³f/(dx_a dx_b dx_c) u_l[c].
Fields§
§base: DynamicOrder2<'arena>Shared value/gradient/Hessian channels.
Implementations§
Source§impl<'arena> DynamicOneSeedBatch<'arena>
impl<'arena> DynamicOneSeedBatch<'arena>
Sourcepub fn seed_directions(
x: f64,
axis: usize,
dimension: usize,
workspace: &'arena DynamicJetBatchWorkspace,
direction_at: impl FnMut(usize) -> f64,
) -> Self
pub fn seed_directions( x: f64, axis: usize, dimension: usize, workspace: &'arena DynamicJetBatchWorkspace, direction_at: impl FnMut(usize) -> f64, ) -> Self
Seed one primary across every direction lane.
Sourcepub fn contracted_third(&self, lane: usize) -> &[f64]
pub fn contracted_third(&self, lane: usize) -> &[f64]
Row-major contracted-third matrix for one direction lane.
Trait Implementations§
Source§impl<'arena> Clone for DynamicOneSeedBatch<'arena>
impl<'arena> Clone for DynamicOneSeedBatch<'arena>
Source§fn clone(&self) -> DynamicOneSeedBatch<'arena>
fn clone(&self) -> DynamicOneSeedBatch<'arena>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'arena> Copy for DynamicOneSeedBatch<'arena>
Source§impl<'arena> Debug for DynamicOneSeedBatch<'arena>
impl<'arena> Debug for DynamicOneSeedBatch<'arena>
Source§impl<'arena> RuntimeJetScalar<'arena> for DynamicOneSeedBatch<'arena>
impl<'arena> RuntimeJetScalar<'arena> for DynamicOneSeedBatch<'arena>
Source§fn weighted_compose_sum(
lefts: &[Self],
right: &Self,
derivative_stacks: &[[f64; 5]],
addend: &Self,
) -> Self
fn weighted_compose_sum( lefts: &[Self], right: &Self, derivative_stacks: &[[f64; 5]], addend: &Self, ) -> Self
addend + Σ_i L_i · f_i(R) with ONE shared composition point, lane by
lane, on top of the base type’s fused form.
The nilpotent part of f_i(R) is f_i'(R.base)·R.eps_l, so lane l is
addend.eps_l + Σ_i L_i.base·f_i'(R.base)·R.eps_l + Σ_i L_i.eps_l·f_i(R.base)
= R.eps_l · [Σ_i L_i.base·f_i'(R.base)] + Σ_i L_i.eps_l·f_i(R.base)and BOTH bracketed sums are the base type’s weighted_compose_sum at the
same point R.base — the first with the derivative stacks shifted by one,
the second with the stacks themselves. The first does not depend on the
lane, so it is formed once for the whole batch. The loop this replaces
wrote 2N blocks in EVERY lane and in the base; this writes two shared
blocks plus three per lane (gam#979).
Source§type Workspace = DynamicJetBatchWorkspace
type Workspace = DynamicJetBatchWorkspace
Source§fn constant(
c: f64,
dimension: usize,
workspace: &'arena DynamicJetBatchWorkspace,
) -> Self
fn constant( c: f64, dimension: usize, workspace: &'arena DynamicJetBatchWorkspace, ) -> Self
dimension-primary algebra.Source§fn variable(
x: f64,
axis: usize,
dimension: usize,
workspace: &'arena DynamicJetBatchWorkspace,
) -> Self
fn variable( x: f64, axis: usize, dimension: usize, workspace: &'arena DynamicJetBatchWorkspace, ) -> Self
dimension-primary algebra.Source§fn constant_like(&self, c: f64) -> Self
fn constant_like(&self, c: f64) -> Self
self. Read moreSource§fn with_value(&self, value: f64) -> Self
fn with_value(&self, value: f64) -> Self
Source§fn multiply_add(&self, right: &Self, addend: &Self) -> Self
fn multiply_add(&self, right: &Self, addend: &Self) -> Self
self * right + addend in one semantic primitive.Source§fn linear_combination(
inputs: &[Self],
weights: &[f64],
dimension: usize,
workspace: &'arena DynamicJetBatchWorkspace,
) -> Self
fn linear_combination( inputs: &[Self], weights: &[f64], dimension: usize, workspace: &'arena DynamicJetBatchWorkspace, ) -> Self
sum_i weights[i] * inputs[i] in one semantic primitive.Source§fn affine_composed_sum(
inputs: &[Self],
input_scales: &[f64],
derivative_stacks: &[[f64; 5]],
dimension: usize,
workspace: &'arena DynamicJetBatchWorkspace,
) -> Self
fn affine_composed_sum( inputs: &[Self], input_scales: &[f64], derivative_stacks: &[[f64; 5]], dimension: usize, workspace: &'arena DynamicJetBatchWorkspace, ) -> Self
Source§fn compose_unary(&self, derivatives: [f64; 5]) -> Self
fn compose_unary(&self, derivatives: [f64; 5]) -> Self
Source§fn symmetric_quadratic_form<C: SymmetricQuadraticCoefficients>(
inputs: &[Self],
coefficients: &C,
dimension: usize,
workspace: &'arena Self::Workspace,
) -> Self
fn symmetric_quadratic_form<C: SymmetricQuadraticCoefficients>( inputs: &[Self], coefficients: &C, dimension: usize, workspace: &'arena Self::Workspace, ) -> Self
inputs' A inputs from the same universal semantic primitive
as JetScalar::symmetric_quadratic_form.Source§fn add_constant(&self, constant: f64) -> Self
fn add_constant(&self, constant: f64) -> Self
Source§fn composed_sum(
inputs: &[Self],
derivative_stacks: &[[f64; 5]],
dimension: usize,
workspace: &'arena Self::Workspace,
) -> Self
fn composed_sum( inputs: &[Self], derivative_stacks: &[[f64; 5]], dimension: usize, workspace: &'arena Self::Workspace, ) -> Self
Source§fn affine_compose(
&self,
input_scale: f64,
input_shift: f64,
derivative_stack: [f64; 5],
) -> Self
fn affine_compose( &self, input_scale: f64, input_shift: f64, derivative_stack: [f64; 5], ) -> Self
Σ_i f_i(input_scale_i · (left_i · right + addend_scale_i · addend))
from certified derivative stacks. Const expression arity replaces an
implementation-specific term cap, while shared operands expose universal
common-subexpression elimination. If every addend scale is exact zero
(including -0.0), the addend has no dimension, workspace, or
derivative-channel obligations.Source§fn ln(&self) -> Self
fn ln(&self) -> Self
ln(self). Caller guarantees positivity. This is the runtime-width
counterpart of JetScalar::ln and uses the identical certified
derivative stack.Auto Trait Implementations§
impl<'arena> !RefUnwindSafe for DynamicOneSeedBatch<'arena>
impl<'arena> !Send for DynamicOneSeedBatch<'arena>
impl<'arena> !Sync for DynamicOneSeedBatch<'arena>
impl<'arena> !UnwindSafe for DynamicOneSeedBatch<'arena>
impl<'arena> Freeze for DynamicOneSeedBatch<'arena>
impl<'arena> Unpin for DynamicOneSeedBatch<'arena>
impl<'arena> UnsafeUnpin for DynamicOneSeedBatch<'arena>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.