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§impl<'de> Deserialize<'de> for ExpressionCache
impl<'de> Deserialize<'de> for ExpressionCache
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !Freeze for ExpressionCache
impl !Sync for ExpressionCache
impl RefUnwindSafe for ExpressionCache
impl Send for ExpressionCache
impl Unpin for ExpressionCache
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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