mirror of
https://github.com/ruvnet/RuView
synced 2026-08-10 20:31:42 +00:00
feat: complete vendor repos, add edge intelligence and WASM modules
- Add 154 missing vendor files (gitignore was filtering them) - vendor/midstream: 564 files (was 561) - vendor/sublinear-time-solver: 1190 files (was 1039) - Add ESP32 edge processing (ADR-039): presence, vitals, fall detection - Add WASM programmable sensing (ADR-040/041) with wasm3 runtime - Add firmware CI workflow (.github/workflows/firmware-ci.yml) - Add wifi-densepose-wasm-edge crate for edge WASM modules - Update sensing server, provision.py, UI components Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Optimized matrix operations with memory pooling and SIMD-friendly patterns
|
||||
* Target: 50% memory reduction and improved cache locality
|
||||
*/
|
||||
import { Matrix, Vector, SparseMatrix } from './types.js';
|
||||
declare class VectorPool {
|
||||
private pools;
|
||||
private maxPoolSize;
|
||||
acquire(size: number): Vector;
|
||||
release(vector: Vector): void;
|
||||
clear(): void;
|
||||
getStats(): {
|
||||
poolSizes: Record<number, number>;
|
||||
totalVectors: number;
|
||||
};
|
||||
}
|
||||
export declare class CSRMatrix {
|
||||
values: Float64Array;
|
||||
colIndices: Uint32Array;
|
||||
rowPtr: Uint32Array;
|
||||
private rows;
|
||||
private cols;
|
||||
constructor(rows: number, cols: number, nnz: number);
|
||||
static fromCOO(matrix: SparseMatrix): CSRMatrix;
|
||||
multiplyVector(x: Vector, result: Vector): void;
|
||||
getEntry(row: number, col: number): number;
|
||||
rowEntries(row: number): Generator<{
|
||||
col: number;
|
||||
val: number;
|
||||
}>;
|
||||
getMemoryUsage(): number;
|
||||
getNnz(): number;
|
||||
getRows(): number;
|
||||
getCols(): number;
|
||||
}
|
||||
export declare class CSCMatrix {
|
||||
values: Float64Array;
|
||||
rowIndices: Uint32Array;
|
||||
colPtr: Uint32Array;
|
||||
private rows;
|
||||
private cols;
|
||||
constructor(rows: number, cols: number, nnz: number);
|
||||
static fromCSR(csr: CSRMatrix): CSCMatrix;
|
||||
multiplyVector(x: Vector, result: Vector): void;
|
||||
getMemoryUsage(): number;
|
||||
getNnz(): number;
|
||||
getRows(): number;
|
||||
getCols(): number;
|
||||
}
|
||||
export declare class StreamingMatrix {
|
||||
private chunks;
|
||||
private chunkSize;
|
||||
private rows;
|
||||
private cols;
|
||||
private maxCachedChunks;
|
||||
constructor(rows: number, cols: number, chunkSize?: number, maxCachedChunks?: number);
|
||||
static fromMatrix(matrix: Matrix, chunkSize?: number): StreamingMatrix;
|
||||
getChunk(chunkId: number): CSRMatrix | null;
|
||||
multiplyVector(x: Vector, result: Vector): void;
|
||||
getMemoryUsage(): number;
|
||||
}
|
||||
export declare class OptimizedMatrixOperations {
|
||||
private static vectorPool;
|
||||
static getVectorPool(): VectorPool;
|
||||
static vectorAdd(a: Vector, b: Vector, result?: Vector): Vector;
|
||||
static vectorScale(vector: Vector, scalar: number, result?: Vector): Vector;
|
||||
static vectorDot(a: Vector, b: Vector): number;
|
||||
static vectorNorm2(vector: Vector): number;
|
||||
static convertToOptimalFormat(matrix: Matrix): CSRMatrix | CSCMatrix;
|
||||
private static denseToSparse;
|
||||
static profileMemoryUsage(matrix: CSRMatrix | CSCMatrix | StreamingMatrix): {
|
||||
matrixSize: number;
|
||||
nnz: number;
|
||||
memoryUsed: number;
|
||||
compressionRatio: number;
|
||||
};
|
||||
static cleanup(): void;
|
||||
}
|
||||
export {};
|
||||
Reference in New Issue
Block a user