/** Element-count threshold above which the WASM kernel beats JS. */ export declare const WASM_ELEMENTWISE_THRESHOLD = 1024; /** * Unary ops with an `array__ptr` kernel that is benchmark-confirmed * net-faster than JS (see tools/benchmark/wasm/{elementwise,transcendental}.bench.mjs). * Excluded after measuring (JS wins): sqrt, cbrt, asin, acos, cosh, asinh, acosh. */ export declare const WASM_ELEMENTWISE_OPS: readonly ['abs', 'sin', 'cos', 'tan', 'exp', 'log', 'atan', 'sinh', 'tanh', 'atanh', 'expm1', 'log1p', 'log2', 'log10', 'sec', 'csc', 'cot', 'erfc']; /** Name of an element-wise operation that has a WebAssembly kernel. */ export type WasmElementwiseOp = (typeof WASM_ELEMENTWISE_OPS)[number]; /** * Apply a unary elementwise op over `xs` via the AS `array__ptr` kernel. * Returns the result, or `null` (below threshold, wasm unavailable, kernel * missing, or any failure) — in which case the caller uses its JS/parallel path. * Never throws. */ export declare function elementwiseUnaryDispatch(op: WasmElementwiseOp, xs: Float64Array): Float64Array | null; /** * Op-fusion (Tier 3): apply a *chain* of unary ops with the data resident in * wasm memory the whole time — one copy-in, one copy-out, regardless of chain * length. `fuseUnaryChain([sin, exp])` computes `exp(sin(x))` paying the JS↔wasm * transfer once instead of once per op. Returns null (caller applies the chain * in JS) below threshold, when wasm is unavailable, or any kernel is missing. * Never throws. */ export declare function elementwiseChainDispatch(ops: WasmElementwiseOp[], xs: Float64Array): Float64Array | null; //# sourceMappingURL=wasm-bridge.d.ts.map