Skip to main content

TapeData

Struct TapeData 

pub struct TapeData<T: TapeStorage> {
    statements: Vec<u32>,
    operations: Vec<Operation<T>>,
    derivatives: Vec<T>,
}

Fields§

§statements: Vec<u32>§operations: Vec<Operation<T>>§derivatives: Vec<T>

Implementations§

§

impl<T: TapeStorage> TapeData<T>

pub fn register_variable(&mut self) -> u32

pub fn push_nullary(&mut self) -> u32

pub fn push_unary_unit(&mut self, operand_slot: u32, neg: bool) -> u32

pub fn push_binary_unit( &mut self, s1: u32, neg1: bool, s2: u32, neg2: bool, ) -> u32

pub fn push_operands_unit_bounded( &mut self, n_max: usize, operands: impl IntoIterator<Item = (u32, bool)>, )

pub fn push_unary(&mut self, multiplier: T, operand_slot: u32) -> u32

pub fn push_binary(&mut self, m1: T, s1: u32, m2: T, s2: u32) -> u32

pub fn push_operand(&mut self, multiplier: T, operand_slot: u32)

pub fn push_operands_bounded( &mut self, n_max: usize, operands: impl IntoIterator<Item = (T, u32)>, )

pub fn end_statement(&mut self) -> u32

pub fn new_recording(&mut self)

pub fn compute_adjoints(&mut self)

pub fn compute_adjoints_vector(&self, n_dir: usize, derivs: &mut [T])

fn compute_adjoints_to_impl(&mut self, target_pos: u32, start: u32)

pub fn clear_derivatives(&mut self)

pub fn derivative(&self, slot: u32) -> T

pub fn set_derivative(&mut self, slot: u32, value: T)

pub fn num_variables(&self) -> u32

pub fn num_operations(&self) -> usize

pub fn num_statements(&self) -> usize

pub fn memory(&self) -> usize

Auto Trait Implementations§

§

impl<T> Freeze for TapeData<T>

§

impl<T> RefUnwindSafe for TapeData<T>
where T: RefUnwindSafe,

§

impl<T> Send for TapeData<T>

§

impl<T> Sync for TapeData<T>

§

impl<T> Unpin for TapeData<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for TapeData<T>

§

impl<T> UnwindSafe for TapeData<T>
where T: UnwindSafe,

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.