pub struct MemoryOps;Expand description
Memory-efficient operations for large arrays
Implementations§
Source§impl MemoryOps
impl MemoryOps
Sourcepub fn chunked_dot<T>(
a: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>,
b: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>,
chunk_size: Option<usize>,
) -> Result<T, SklearsError>where
T: FloatBounds,
pub fn chunked_dot<T>(
a: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>,
b: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>,
chunk_size: Option<usize>,
) -> Result<T, SklearsError>where
T: FloatBounds,
Compute dot product in chunks to reduce memory usage
Sourcepub fn streaming_stats<T>(values: impl Iterator<Item = T>) -> (T, T, usize)where
T: FloatBounds,
pub fn streaming_stats<T>(values: impl Iterator<Item = T>) -> (T, T, usize)where
T: FloatBounds,
Streaming statistics computation for large datasets
Auto Trait Implementations§
impl Freeze for MemoryOps
impl RefUnwindSafe for MemoryOps
impl Send for MemoryOps
impl Sync for MemoryOps
impl Unpin for MemoryOps
impl UnwindSafe for MemoryOps
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> 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