pub struct ChunkedArray<A, D>{
pub data: Array<A, D>,
pub strategy: ChunkingStrategy,
/* private fields */
}Expand description
A chunked array that provides memory-efficient processing for large datasets
Fields§
§data: Array<A, D>The underlying array data
strategy: ChunkingStrategyThe chunking strategy
Implementations§
Source§impl<A, D> ChunkedArray<A, D>
impl<A, D> ChunkedArray<A, D>
Sourcepub fn new<S: Data<Elem = A>>(
data: ArrayBase<S, D>,
strategy: ChunkingStrategy,
) -> Self
pub fn new<S: Data<Elem = A>>( data: ArrayBase<S, D>, strategy: ChunkingStrategy, ) -> Self
Create a new chunked array with the given data and chunking strategy
Sourcepub fn with_memory_optimization<S: Data<Elem = A>>(
data: ArrayBase<S, D>,
strategy: AdvancedChunkingStrategy,
) -> Self
pub fn with_memory_optimization<S: Data<Elem = A>>( data: ArrayBase<S, D>, strategy: AdvancedChunkingStrategy, ) -> Self
Create a chunked array with advanced memory optimization
Sourcepub fn optimizer(&self) -> Option<&MemoryPatternOptimizer>
pub fn optimizer(&self) -> Option<&MemoryPatternOptimizer>
Get access to the memory pattern optimizer (if available)
Sourcepub fn optimizer_mut(&mut self) -> Option<&mut MemoryPatternOptimizer>
pub fn optimizer_mut(&mut self) -> Option<&mut MemoryPatternOptimizer>
Get mutable access to the memory pattern optimizer (if available)
Sourcepub fn record_processing_time(&mut self, duration: Duration)
pub fn record_processing_time(&mut self, duration: Duration)
Record processing time for adaptive optimization
Sourcepub fn update_access_pattern_stats(&mut self, stats: &AccessPatternStats)
pub fn update_access_pattern_stats(&mut self, stats: &AccessPatternStats)
Update access pattern statistics
Sourcepub fn map<F, B>(&self, f: F) -> Array<B, Ix1>
pub fn map<F, B>(&self, f: F) -> Array<B, Ix1>
Apply a function to each chunk of the array and collect the results
Returns a 1D array where each element is the result of applying the function to a chunk
Sourcepub fn par_map<F, B>(&self, f: F) -> Array<B, Ix1>
pub fn par_map<F, B>(&self, f: F) -> Array<B, Ix1>
Apply a function to each chunk of the array in parallel and collect the results
Returns a 1D array where each element is the result of applying the function to a chunk
Sourcepub fn map_withmonitoring<F, B>(&mut self, f: F) -> Array<B, Ix1>
pub fn map_withmonitoring<F, B>(&mut self, f: F) -> Array<B, Ix1>
Apply a function to each chunk with performance monitoring and adaptive optimization
Sourcepub fn map_numa_aware<F, B>(&self, f: F) -> Array<B, Ix1>
pub fn map_numa_aware<F, B>(&self, f: F) -> Array<B, Ix1>
Apply a function to each chunk with NUMA-aware processing
Sourcepub fn map_cache_optimized<F, B>(&self, f: F) -> Array<B, Ix1>
pub fn map_cache_optimized<F, B>(&self, f: F) -> Array<B, Ix1>
Apply a function to each chunk with cache-optimized processing
Sourcepub fn mapbandwidth_aware<F, B>(&self, f: F) -> Array<B, Ix1>
pub fn mapbandwidth_aware<F, B>(&self, f: F) -> Array<B, Ix1>
Apply a function to each chunk with bandwidth-aware processing
Sourcepub fn map_power_aware<F, B>(&self, f: F) -> Array<B, Ix1>
pub fn map_power_aware<F, B>(&self, f: F) -> Array<B, Ix1>
Apply a function to each chunk with power-aware processing (for mobile/embedded)
Sourcepub fn measure_memorybandwidth(&mut self) -> Option<usize>
pub fn measure_memorybandwidth(&mut self) -> Option<usize>
Measure and update memory bandwidth for the optimizer
Sourcepub fn map_optimized<F, B>(&mut self, f: F) -> Array<B, Ix1>
pub fn map_optimized<F, B>(&mut self, f: F) -> Array<B, Ix1>
Apply a function using the best available optimization strategy
Sourcepub fn update_access_pattern_statistics(&mut self, processingtimes: &[Duration])
pub fn update_access_pattern_statistics(&mut self, processingtimes: &[Duration])
Update access pattern statistics based on processing performance
Sourcepub fn num_chunks(&self) -> usize
pub fn num_chunks(&self) -> usize
Get the number of chunks
Sourcepub fn chunk_size(&self) -> usize
pub fn chunk_size(&self) -> usize
Get the chunk size in elements
Trait Implementations§
Auto Trait Implementations§
impl<A, D> !Freeze for ChunkedArray<A, D>
impl<A, D> RefUnwindSafe for ChunkedArray<A, D>where
A: RefUnwindSafe,
D: RefUnwindSafe,
impl<A, D> Send for ChunkedArray<A, D>where
A: Send,
impl<A, D> Sync for ChunkedArray<A, D>where
A: Sync,
impl<A, D> Unpin for ChunkedArray<A, D>
impl<A, D> UnwindSafe for ChunkedArray<A, D>
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.