/** * Shared parallel array-evaluation helpers for the typed math surfaces. * * `kernelSource` and `mapArray` were previously duplicated verbatim in * `typed/special.ts` and `typed/distributions.ts`; they now live here once. * * Both helpers run on the MAIN THREAD (they build the kernel source string and * dispatch it), so they may freely import — they are never themselves * serialized into a worker. The scalar functions whose `.toString()` is * embedded by `kernelSource` are what must stay self-contained, not these. * * @packageDocumentation */ /** 64-bit float (default for decimals) */ type f64 = number; /** * Build a self-contained kernel source string: dependency function * declarations followed by an expression that evaluates to `(x) => number`. */ export declare function kernelSource(deps: Array<(...args: never[]) => unknown>, body: string): string; /** * Evaluate a scalar function across an array, dispatching large inputs to the * worker pool. Falls back to a sequential loop when the pool is not * initialized or the input is below the parallel threshold. */ export declare function mapArray(x: Float64Array, scalar: (v: f64) => f64, buildKernel: () => string): Promise; export {}; //# sourceMappingURL=parallel-map.d.ts.map