/** * Advanced memory management and profiling for matrix operations * Implements memory streaming, pooling, and cache optimization */ export interface MemoryStats { totalAllocated: number; totalReleased: number; currentUsage: number; peakUsage: number; poolStats: Record; gcCount: number; cacheHitRate: number; } export interface CacheConfig { maxSize: number; ttl: number; evictionPolicy: 'lru' | 'lfu' | 'fifo'; } export declare class MemoryStreamManager { private cache; private arrayPool; private gcCount; private streamingThreshold; constructor(cacheConfig?: CacheConfig, streamingThreshold?: number); streamMatrixChunks(data: T[], chunkSize: number, processor: (chunk: T[]) => Promise): AsyncGenerator; scheduleOperation(operation: () => Promise, estimatedMemory: number): Promise; private freeMemory; private getCurrentMemoryUsage; acquireTypedArray(type: 'float64' | 'uint32' | 'uint8', length: number): any; releaseTypedArray(array: Float64Array | Uint32Array | Uint8Array): void; getMemoryStats(): MemoryStats; profileOperation(name: string, operation: () => Promise): Promise<{ result: T; profile: MemoryProfile; }>; optimizeCache(): void; cleanup(): void; } export interface MemoryProfile { name: string; duration: number; memoryDelta: number; peakMemory: number; allocations: number; deallocations: number; cacheHitRate: number; } export declare class SIMDMemoryOptimizer { private static readonly SIMD_WIDTH; private static readonly CACHE_LINE_SIZE; static alignForSIMD(length: number): number; static optimizeLayout(arrays: T[][], accessPattern: 'row' | 'column'): T[][]; static padForCacheLines(array: T[], padValue: T): T[]; static blockMatrixMultiply(a: number[][], b: number[][], result: number[][], blockSize?: number): void; } export declare const globalMemoryManager: MemoryStreamManager;