Struct Tape
pub struct Tape<T: TapeStorage> {
data: Box<TapeData<T>>,
}Fields§
§data: Box<TapeData<T>>Implementations§
§impl<T: TapeStorage> Tape<T>
impl<T: TapeStorage> Tape<T>
pub const UNIT: u32
pub const NEG: u32
pub const SLOT_MASK: u32
pub const MAX_VARIABLES: u32
pub const DEFAULT_STATEMENTS: usize = 256
pub const DEFAULT_OPERATIONS: usize = 512
pub fn new(_activate: bool) -> Self
pub fn with_capacity(n_statements: usize, n_operations: usize) -> Self
fn data_ptr(&self) -> *mut TapeData<T>
pub fn activate(&mut self)
pub fn deactivate(&mut self)
pub fn is_active(&self) -> bool
pub(crate) fn get_active() -> Option<*mut TapeData<T>>
pub fn deactivate_all()
pub fn activate_guard(&mut self) -> TapeGuard<T>
pub fn record(&mut self) -> TapeGuard<T>
Methods from Deref<Target = 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
Trait Implementations§
§impl<T: TapeStorage> Deref for Tape<T>
impl<T: TapeStorage> Deref for Tape<T>
§impl<T: TapeStorage> DerefMut for Tape<T>
impl<T: TapeStorage> DerefMut for Tape<T>
§impl<T: TapeStorage> Drop for Tape<T>
impl<T: TapeStorage> Drop for Tape<T>
Auto Trait Implementations§
impl<T> Freeze for Tape<T>
impl<T> RefUnwindSafe for Tape<T>where
T: RefUnwindSafe,
impl<T> Send for Tape<T>
impl<T> Sync for Tape<T>
impl<T> Unpin for Tape<T>
impl<T> UnsafeUnpin for Tape<T>
impl<T> UnwindSafe for Tape<T>where
T: UnwindSafe,
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