Expand description
Memory-efficient operations and views for large arrays.
This module provides utilities for working with large arrays efficiently by:
- Using chunk-wise processing to reduce memory requirements
- Creating memory-efficient views that avoid full data copies
- Implementing lazy evaluation and operation fusion for improved performance
- Supporting out-of-core processing for data that doesn’t fit in RAM
- Smart prefetching for improved performance with predictable access patterns
Modules§
Structs§
- Adaptive
Chunking Builder - Builder for creating adaptive chunking parameters with a fluent API.
- Adaptive
Chunking Params - Parameters for configuring adaptive chunking behavior.
- Adaptive
Chunking Result - Result of adaptive chunking analysis.
- Adaptive
Pattern Tracker - Advanced access pattern detector with dynamic learning.
- Adaptive
Prefetch Config - Extended prefetching configuration with adaptive learning options.
- Adaptive
Prefetch Config Builder - Builder for adaptive prefetch configuration.
- Array
Creation NumPy-compatible array creation functions- Array
Layout - Array layout utilities for working with ndarray
- Buffer
Pool - Buffer pool for efficient memory management
- Buffer
Pool Stats - Statistics for buffer pool
- Chunk
Iter - Iterator over chunks of a memory-mapped array (for 1D arrays only).
- Chunked
Array - A chunked array that provides memory-efficient processing for large datasets
- Compressed
File Metadata - Metadata for a compressed memory-mapped file
- Compressed
MemMap Builder - Builder for compressed memory-mapped arrays.
- Compressed
MemMapped Array - A memory-mapped array with transparent compression.
- Cross
Device Manager - Cross-device manager for handling data transfers and operations
- Cross
File Prefetch Config - Configuration for cross-file prefetching.
- Cross
File Prefetch Config Builder - Builder for cross-file prefetch configuration.
- Cross
File Prefetch Manager - Manager for cross-file prefetching.
- Cross
File Prefetch Registry - A global registry for cross-file prefetching.
- Data
Access - An access to a specific part of a dataset.
- DataId
- Unique identifier for zero-copy data
- Data
Metadata - Metadata about zero-copy data
- Dataset
Id - A unique identifier for a file or array.
- Device
Array - Array residing on a specific device (CPU, GPU, TPU)
- Device
Buffer - Buffer for cross-device operations
- Device
Memory Manager - Device memory manager for cross-device operations
- Device
Memory Pool - Memory pool for efficient allocation on a device
- Device
Stream - Stream for asynchronous operations
- Disk
Backed Array - A specialized out-of-core array that uses memory mapping for efficient access
- Interface
Stats - Statistics for the zero-copy interface
- Layout
Converter - Memory-efficient layout converter for large arrays
- Lazy
Array - A lazy array that stores operations to be performed later
- LazyOp
- Represents an operation in the lazy evaluation graph
- Lock
Free Queue - Lock-free queue for zero-copy buffers
- Memory
Layout - Memory layout information for arrays
- Memory
Mapped Array - Memory-mapped array that efficiently maps file data directly into memory
- Memory
Mapped Slice - A slice of a memory-mapped array that maintains memory-mapping.
- Numa
Node - NUMA node information for work-stealing optimization
- Numa
Topology - NUMA topology information
- OpFusion
- A structure for chaining multiple operations together and optimizing the execution
- OutOf
Core Array - An array that stores data on disk to reduce memory usage
- Pattern
Recognition Config - Configuration for pattern recognition.
- Pattern
Recognizer - Pattern recognition engine for complex access patterns.
- Pattern
Tracker Factory - Factory for creating different types of access pattern trackers.
- Pipeline
- Stream processing pipeline
- Pipeline
Builder - Pipeline builder
- Pipeline
Stats - Pipeline statistics
- Prefetch
Config - Configuration for the prefetching system.
- Prefetch
Config Builder - Builder for prefetch configuration.
- Prefetch
Stats - Statistics about prefetching performance.
- Prefetching
Compressed Array - Recognized
Pattern - A recognized pattern with metadata.
- Resource
Aware Config - Configuration for resource-aware prefetching.
- Resource
Aware Config Builder - Builder for resource-aware configuration.
- Resource
Aware Prefetcher - Resource-aware prefetching manager.
- Resource
Monitor - Resource monitor for tracking system load.
- Resource
Snapshot - Snapshot of system resource usage at a point in time.
- Resource
Summary - Summary of resource usage over time.
- Scheduler
Stats - Overall scheduler statistics
- Stream
Config - Stream processor configuration
- Stream
Config Builder - Builder for stream processor configuration
- Stream
Processor - Stream processor for continuous data flows
- Stream
Stats - Stream processor statistics
- Transfer
Event - Event for tracking asynchronous operations
- Transfer
Options - Options for cross-device memory transfers
- Transfer
Options Builder - Builder for transfer options
- Work
Stealing Config - Configuration for the work-stealing scheduler
- Work
Stealing Config Builder - Builder for work-stealing scheduler configuration
- Work
Stealing Scheduler - Advanced work-stealing scheduler
- Zero
Copy Buffer - Zero-copy buffer that manages memory without copying
- Zero
Copy Config - Configuration for zero-copy streaming
- Zero
Copy Data - Zero-copy data container that can be shared between components
- Zero
Copy Interface - Zero-copy interface for data exchange between components
- Zero
Copy Stats - Statistics for zero-copy processing
- Zero
Copy Stream Processor - Zero-copy stream processor
- Zero
Copy View - A view into a portion of zero-copy data
- Zero
Copy Weak Ref - Weak reference to zero-copy data
- Zero
Copy Work Stealing Scheduler - Work-stealing scheduler for efficient parallel processing
Enums§
- Access
Mode - Access mode for memory-mapped arrays
- Access
Pattern - Types of access patterns that can be detected and prefetched.
- Access
Type - Types of data access.
- Chunking
Strategy - Strategy for chunking arrays for memory-efficient processing
- Complex
Pattern - The different types of complex patterns that can be recognized.
- Compression
Algorithm - Supported compression algorithms
- Confidence
- Confidence level for pattern detection.
- Device
Type - Device types supported by the cross-device memory management
- Kernel
Param - Kernel parameter for GPU execution
- Layout
Order - Memory layout order following
NumPyconventions - Lazy
OpKind - An enumeration of lazy operations that can be performed on arrays
- Memory
Access Pattern - Access pattern for layout optimization
- Prefetch
Strategy - Types of prefetching strategies that can be dynamically selected.
- Processing
Mode - Processing mode for zero-copy streaming
- Resource
Type - Types of system resources that can be monitored.
- Stream
Mode - Stream processing mode
- Stream
Source - Input source for a data stream
- Stream
State - Stream processor state
- Task
Priority - Task priority levels for the work-stealing scheduler
- Transfer
Direction - Memory transfer direction between devices
- Transfer
Mode - Transfer mode for cross-device operations
- Workload
Type - Beta 2: Workload types for optimized chunking strategies
Constants§
- OPTIMAL_
CHUNK_ SIZE - Optimal chunk size in bytes for memory-efficient operations Chosen as 16 MB which is a good trade-off between memory usage and performance
Traits§
- Adaptive
Chunking - Trait for adaptive chunking capabilities.
- Arithmetic
Ops - Extension trait for standard arithmetic operations on memory-mapped arrays.
- Broadcast
Ops - Trait for broadcasting operations between memory-mapped arrays of different shapes.
- Data
Exchange - Trait for types that can participate in zero-copy data exchange
- Dataset
Prefetcher - Interface for dataset-specific prefetchers.
- From
Zero Copy - Helper trait for extracting data from zero-copy containers
- FusedOp
- A trait for operations that can be fused together for better performance
- Into
Zero Copy - Helper trait for converting types to zero-copy data
- Memory
Mapped Chunk Iter - Extension trait for MemoryMappedArray to enable chunked iteration.
- Memory
Mapped Chunks - Extension trait for MemoryMappedArray to enable chunked processing of large datasets.
- Memory
Mapped Chunks Parallel - Extension trait for parallel processing of memory-mapped arrays.
- Memory
Mapped Slicing - Extension trait for adding slicing functionality to MemoryMappedArray.
- Prefetching
- Trait for memory-mapped arrays that support prefetching.
- ToDevice
- Extension trait for arrays to simplify device transfers
- ToHost
- Extension trait for device arrays to simplify host transfers
- Work
Stealing Task - A task that can be executed by the work-stealing scheduler
- Zero
Copy Ops - Trait for zero-copy operations on memory-mapped arrays.
- Zero
Copy Serializable - Trait for zero-copy serializable types.
- Zero
Copy Serialization - An extension trait for MemoryMappedArray to support zero-copy serialization and deserialization.
- Zero
Copy Work Stealing Task - Work-stealing task for the scheduler
Functions§
- chunk_
wise_ binary_ op - Perform a binary operation on two arrays in a chunk-wise manner
- chunk_
wise_ op - Perform an operation on an array in a chunk-wise manner to reduce memory usage
- chunk_
wise_ reduce - Perform a reduction operation on an array in a chunk-wise manner
- create_
cpu_ intensive_ scheduler - Create a work-stealing scheduler optimized for CPU-intensive tasks
- create_
cpuarray - Create a device array on the CPU
- create_
cross_ device_ manager - Create a cross-device manager with default settings
- create_
disk_ array - Create a disk-backed array from the given data and file path
- create_
global_ data_ registry - Create a global zero-copy data registry
- create_
gpuarray - Create a device array on the GPU
- create_
io_ intensive_ scheduler - Create a work-stealing scheduler optimized for I/O-intensive tasks
- create_
mmap - Create a new memory-mapped array file
- create_
pipeline - Create a new pipeline
- create_
stream_ processor - Create a new stream processor with default configuration
- create_
temp_ mmap - Create a new temporary memory-mapped array
- create_
work_ stealing_ scheduler - Create a default work-stealing scheduler
- create_
zero_ copy_ data - Create zero-copy data from a vector
- create_
zero_ copy_ processor - Create a new zero-copy stream processor with default configuration
- diagonal_
view - Create a copy of the diagonal of a 2D array
- evaluate
- Evaluate a lazy array and return a concrete array
- get_
global_ data - Get data globally by name
- global_
interface - Get the global zero-copy interface
- load_
chunks - Load chunks of an out-of-core array into memory
- open_
mmap - Create a memory-mapped array from an existing file
- register_
fusion - Register a fused operation in the global registry
- register_
global_ data - Register data globally by name
- to_
best_ device - Transfer an array to the best available device
- transpose_
view - Create a transposed copy of a 2D array
- view_as⚠
- Create a view of an array with a different element type
- view_
mut_ ⚠as - Create a mutable view of an array with a different element type