pub struct ExpressionCache { /* private fields */ }Implementations§
Source§impl ExpressionCache
impl ExpressionCache
pub fn new() -> Self
pub fn get(&self, expr_id: ExpressionId) -> Option<TensorExpression>
pub fn lookup(&self, expr: impl AsRef<NamedExpression>) -> Option<ExpressionId>
pub fn contains(&self, expr: impl AsRef<NamedExpression>) -> bool
pub fn remove(&mut self, expr_id: ExpressionId)
pub fn insert(&mut self, expr: impl Into<TensorExpression>) -> ExpressionId
pub fn indices(&self, expr_id: ExpressionId) -> Vec<TensorIndex>
pub fn num_elements(&self, expr_id: ExpressionId) -> usize
pub fn generation_shape(&self, expr_id: ExpressionId) -> GenerationShape
pub fn base_name(&self, expr_id: ExpressionId) -> String
pub fn name(&self, expr_id: ExpressionId) -> String
pub fn num_params(&self, expr_id: ExpressionId) -> usize
pub fn trace( &mut self, expr_id: ExpressionId, pairs: Vec<(usize, usize)>, ) -> ExpressionId
pub fn permute_reshape( &mut self, expr_id: ExpressionId, perm: Vec<usize>, reshape: GenerationShape, ) -> ExpressionId
pub fn is_compiled<R: RealScalar>(&self) -> bool
pub fn prepare(&mut self, diff_level: DifferentiationLevel)
pub fn compile<R: RealScalar>(&mut self)
pub fn get_fn<R: RealScalar>( &mut self, expr_id: ExpressionId, diff_level: DifferentiationLevel, ) -> WriteFunc<R>
pub fn get_output_map<R: RealScalar>( &self, expr_id: ExpressionId, row_stride: u64, col_stride: u64, mat_stride: u64, ) -> Vec<u64>
Trait Implementations§
Source§impl Default for ExpressionCache
impl Default for ExpressionCache
Source§fn default() -> ExpressionCache
fn default() -> ExpressionCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ExpressionCache
impl RefUnwindSafe for ExpressionCache
impl Send for ExpressionCache
impl !Sync for ExpressionCache
impl Unpin for ExpressionCache
impl UnwindSafe for ExpressionCache
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more