/** * GPU Compute Engine * * Provides GPU-accelerated data analysis using WebGPU compute shaders. * Includes statistics calculation, bounds computation, downsampling, and peak detection. */ export interface DataStats { min: number; max: number; mean: number; std: number; count: number; } export interface DataBounds { xMin: number; xMax: number; yMin: number; yMax: number; } export interface Peak { index: number; value: number; } export interface GpuComputeOptions { /** WebGPU device (if already available) */ device?: any; } /** * GPU Compute Engine for data analysis */ export declare class GpuCompute { private options; private device; private statsPipeline; private minmaxPipeline; private downsamplePipeline; private peaksPipeline; private isInitialized; constructor(options?: GpuComputeOptions); /** * Check if GPU compute is available */ static isSupported(): boolean; /** * Initialize the compute engine */ init(): Promise; private createPipelines; /** * Calculate statistics for a 1D array of values */ calculateStats(data: Float32Array): Promise; /** * Calculate bounds for 2D point data */ calculateBounds(points: Float32Array): Promise; /** * Downsample point data using min-max algorithm */ downsample(points: Float32Array, targetCount: number): Promise; /** * Detect peaks in 1D data */ detectPeaks(data: Float32Array, options?: { threshold?: number; minDistance?: number; }): Promise; /** * Cleanup resources */ destroy(): void; }