@danielsimonjr/mathts-parallel 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ComputePool.d.ts +548 -0
- package/dist/ComputePool.d.ts.map +1 -0
- package/dist/index.d.ts +13 -1281
- package/dist/index.d.ts.map +1 -0
- package/dist/matrix.worker.d.ts +13 -2
- package/dist/matrix.worker.d.ts.map +1 -0
- package/dist/operations/elementwise.d.ts +86 -0
- package/dist/operations/elementwise.d.ts.map +1 -0
- package/dist/operations/index.d.ts +12 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/map.d.ts +145 -0
- package/dist/operations/map.d.ts.map +1 -0
- package/dist/operations/matmul.d.ts +95 -0
- package/dist/operations/matmul.d.ts.map +1 -0
- package/dist/operations/reduce.d.ts +139 -0
- package/dist/operations/reduce.d.ts.map +1 -0
- package/dist/ops/bitwise.d.ts +71 -0
- package/dist/ops/bitwise.d.ts.map +1 -0
- package/dist/strategies/chunk.d.ts +119 -0
- package/dist/strategies/chunk.d.ts.map +1 -0
- package/dist/strategies/index.d.ts +10 -0
- package/dist/strategies/index.d.ts.map +1 -0
- package/dist/strategies/threshold.d.ts +112 -0
- package/dist/strategies/threshold.d.ts.map +1 -0
- package/package.json +58 -58
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MathTS Compute Pool
|
|
3
|
+
*
|
|
4
|
+
* High-level wrapper around @danielsimonjr/mathts-workerpool for parallel computation in MathTS.
|
|
5
|
+
* Provides automatic parallelization of matrix operations based on data size.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { MathWorkerPool, Transfer, type TaskOptions, type PoolStats } from '@danielsimonjr/mathts-workerpool';
|
|
10
|
+
/**
|
|
11
|
+
* Recognised kernel / operation names.
|
|
12
|
+
*
|
|
13
|
+
* These are the string identifiers passed to `shouldParallelize(length, op)` so
|
|
14
|
+
* the per-op threshold map can be consulted before falling back to the global
|
|
15
|
+
* `thresholdElements`. The list covers:
|
|
16
|
+
* - Element-wise float ops dispatched through `ComputePool.unary/elementwise/scale`
|
|
17
|
+
* - Reduction ops (`sum`, `mean`, `variance`, etc.)
|
|
18
|
+
* - Linear-algebra ops (`matmul`, `matrixPower`, `characteristicPolynomial`)
|
|
19
|
+
* - Signal-processing ops (`parallelFFT`, `parallelConv`, `spectrogram`, `fft2d`)
|
|
20
|
+
* - Geometry ops (`distanceMatrix`)
|
|
21
|
+
* - Special / distribution functions (`erfc`, `besselJ`, `normalCDF`)
|
|
22
|
+
* - Additional ops exposed via the typed functions layer
|
|
23
|
+
*/
|
|
24
|
+
export type OpName = 'add' | 'subtract' | 'multiply' | 'divide' | 'pow' | 'scale' | 'abs' | 'negate' | 'sqrt' | 'square' | 'bitAnd' | 'bitOr' | 'bitXor' | 'bitNot' | 'leftShift' | 'rightArithShift' | 'rightLogShift' | 'exp' | 'log' | 'sin' | 'cos' | 'tan' | 'sign' | 'tensordot' | 'sum' | 'mean' | 'min' | 'max' | 'minMax' | 'variance' | 'std' | 'norm' | 'histogram' | 'dot' | 'prod' | 'distance' | 'parallelStatProd' | 'matmul' | 'outer' | 'matvec' | 'transpose' | 'matrixPower' | 'characteristicPolynomial' | 'parallelFFT' | 'parallelConv' | 'spectrogram' | 'fft2d' | 'distanceMatrix' | 'erfc' | 'besselJ' | 'normalCDF' | 'chiSquareTest' | 'kolmogorovSmirnovTest' | 'mannWhitneyTest' | 'shapiroWilkTest' | 'integrateChunk' | 'sampleChunk';
|
|
25
|
+
/**
|
|
26
|
+
* Per-op threshold override. The value is the minimum element count required
|
|
27
|
+
* before parallelizing the named operation. Special string aliases:
|
|
28
|
+
*
|
|
29
|
+
* - `'never'` → `Number.MAX_SAFE_INTEGER` (never parallelize)
|
|
30
|
+
* - `'always'` → `0` (always parallelize when pool is ready)
|
|
31
|
+
*/
|
|
32
|
+
export type OpThreshold = number | 'never' | 'always';
|
|
33
|
+
/**
|
|
34
|
+
* Resolve an `OpThreshold` alias to its numeric equivalent.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveOpThreshold(t: OpThreshold): number;
|
|
38
|
+
/**
|
|
39
|
+
* Configuration for ComputePool
|
|
40
|
+
* Extends the base WorkerPoolConfig with MathTS-specific options
|
|
41
|
+
*/
|
|
42
|
+
export interface ComputePoolConfig {
|
|
43
|
+
/** Enable parallel processing */
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
/** Minimum number of workers to maintain */
|
|
46
|
+
minWorkers: number;
|
|
47
|
+
/** Maximum number of workers */
|
|
48
|
+
maxWorkers: number;
|
|
49
|
+
/**
|
|
50
|
+
* Global minimum element count before parallelizing.
|
|
51
|
+
* Acts as the fallback for ops not listed in `thresholdByOp`.
|
|
52
|
+
*/
|
|
53
|
+
thresholdElements: number;
|
|
54
|
+
/**
|
|
55
|
+
* Per-operation parallelization thresholds.
|
|
56
|
+
*
|
|
57
|
+
* Values measured on a noisy CI container (2026-05-23) — re-run on target
|
|
58
|
+
* hardware to retune. Source: tools/benchmark/parallel/run.ts
|
|
59
|
+
*
|
|
60
|
+
* Ops absent from this map fall back to `thresholdElements`.
|
|
61
|
+
*/
|
|
62
|
+
thresholdByOp?: Partial<Record<OpName, OpThreshold>>;
|
|
63
|
+
/** Elements per chunk for parallel operations */
|
|
64
|
+
chunkSize: number;
|
|
65
|
+
/** Worker type: 'auto' | 'web' | 'thread' */
|
|
66
|
+
workerType: 'auto' | 'web' | 'thread';
|
|
67
|
+
/** Worker idle timeout in milliseconds */
|
|
68
|
+
workerIdleTimeout: number;
|
|
69
|
+
/** Default task timeout in milliseconds */
|
|
70
|
+
taskTimeout: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Default per-op thresholds derived from benchmark data (tools/benchmark/parallel/run.ts,
|
|
74
|
+
* 2026-05-23). Values measured on a noisy CI container — re-run on target hardware to retune.
|
|
75
|
+
*
|
|
76
|
+
* 'never' → Number.MAX_SAFE_INTEGER (benchmark showed no reliable speedup)
|
|
77
|
+
* 'always' → 0 (always parallelize when pool is ready)
|
|
78
|
+
* number → minimum element count before dispatching to workers
|
|
79
|
+
*/
|
|
80
|
+
/**
|
|
81
|
+
* Canonical, benchmark-tuned per-op parallelization thresholds. This is the
|
|
82
|
+
* single source of truth consulted by `ComputePool.shouldParallelize` — the
|
|
83
|
+
* authority the typed functions actually dispatch through. The coarser
|
|
84
|
+
* category-level {@link ThresholdDispatcher} derives its overlapping values
|
|
85
|
+
* (e.g. matmul) from here so the two cannot silently diverge.
|
|
86
|
+
*/
|
|
87
|
+
export declare const DEFAULT_THRESHOLD_BY_OP: Partial<Record<OpName, OpThreshold>>;
|
|
88
|
+
/**
|
|
89
|
+
* Default ComputePool configuration
|
|
90
|
+
*/
|
|
91
|
+
export declare const DEFAULT_POOL_CONFIG: ComputePoolConfig;
|
|
92
|
+
/**
|
|
93
|
+
* Result of a parallel operation
|
|
94
|
+
*/
|
|
95
|
+
export interface ParallelResult<T> {
|
|
96
|
+
/** The computed result */
|
|
97
|
+
result: T;
|
|
98
|
+
/** Time taken in milliseconds */
|
|
99
|
+
duration: number;
|
|
100
|
+
/** Number of chunks processed */
|
|
101
|
+
chunks: number;
|
|
102
|
+
/** Whether parallelization was used */
|
|
103
|
+
parallelized: boolean;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Pure-JS tensordot computation over a contiguous range of output elements
|
|
107
|
+
* `[outStart, outEnd)`.
|
|
108
|
+
*
|
|
109
|
+
* This is the shared inner kernel used by both the sequential fallback path in
|
|
110
|
+
* `ComputePool.tensordot` and the worker-dispatched `tensordotChunk` handler.
|
|
111
|
+
* By exporting it and registering it in the worker, we keep the algorithm in
|
|
112
|
+
* one place and avoid divergence.
|
|
113
|
+
*
|
|
114
|
+
* Contracts axis `axesA[i]` of `a` (shape `aShape`) with axis `axesB[i]` of
|
|
115
|
+
* `b` (shape `bShape`). The result layout is free-A axes first, then free-B
|
|
116
|
+
* axes (NumPy convention).
|
|
117
|
+
*/
|
|
118
|
+
export declare function tensordotChunkKernel(a: Float64Array, aShape: readonly number[], b: Float64Array, bShape: readonly number[], axesA: readonly number[], axesB: readonly number[], resultShape: readonly number[], outStart: number, outEnd: number): Float64Array;
|
|
119
|
+
/**
|
|
120
|
+
* ComputePool for parallel MathTS operations
|
|
121
|
+
*
|
|
122
|
+
* Wraps the @danielsimonjr/mathts-workerpool MathWorkerPool with a MathTS-specific API.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* import { ComputePool } from '@danielsimonjr/mathts-parallel';
|
|
127
|
+
*
|
|
128
|
+
* const pool = new ComputePool({ maxWorkers: 8 });
|
|
129
|
+
* await pool.initialize();
|
|
130
|
+
*
|
|
131
|
+
* // Parallel matrix multiplication
|
|
132
|
+
* const result = await pool.matmul(matrixA, aRows, aCols, matrixB, bCols);
|
|
133
|
+
*
|
|
134
|
+
* // Parallel element-wise operation
|
|
135
|
+
* const sum = await pool.elementwise(a, b, 'add');
|
|
136
|
+
*
|
|
137
|
+
* // Cleanup
|
|
138
|
+
* await pool.terminate();
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
export declare class ComputePool {
|
|
142
|
+
private workerPool;
|
|
143
|
+
private config;
|
|
144
|
+
constructor(config?: Partial<ComputePoolConfig>);
|
|
145
|
+
/**
|
|
146
|
+
* Initialize the worker pool
|
|
147
|
+
*/
|
|
148
|
+
initialize(): Promise<void>;
|
|
149
|
+
/**
|
|
150
|
+
* Check if pool is ready
|
|
151
|
+
*/
|
|
152
|
+
isReady(): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Determine if operation should be parallelized.
|
|
155
|
+
*
|
|
156
|
+
* When `op` is supplied the per-op threshold map is consulted first;
|
|
157
|
+
* if the op is absent from the map the global `thresholdElements` fallback
|
|
158
|
+
* is used. When `op` is omitted the global threshold is always used (for
|
|
159
|
+
* backward-compatibility with existing callers that don't know the op name).
|
|
160
|
+
*/
|
|
161
|
+
shouldParallelize(elementCount: number, op?: OpName): boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Wrap a sequentially-computed reduction result in the `ParallelResult`
|
|
164
|
+
* envelope. Used by the reduction methods below so that ops whose threshold
|
|
165
|
+
* says "don't parallelize at this size" (notably the memory-bound reductions
|
|
166
|
+
* pinned to `'never'`) compute inline instead of paying a worker round-trip —
|
|
167
|
+
* previously every reduction dispatched to the pool unconditionally, ignoring
|
|
168
|
+
* its threshold.
|
|
169
|
+
*/
|
|
170
|
+
private seqResult;
|
|
171
|
+
/**
|
|
172
|
+
* Execute a method in the worker pool
|
|
173
|
+
*/
|
|
174
|
+
exec<T>(method: string, params: unknown[], options?: TaskOptions): Promise<T>;
|
|
175
|
+
/**
|
|
176
|
+
* Get pool statistics
|
|
177
|
+
*/
|
|
178
|
+
stats(): PoolStats;
|
|
179
|
+
/**
|
|
180
|
+
* Parallel sum of array elements
|
|
181
|
+
*/
|
|
182
|
+
sum(data: Float64Array): Promise<ParallelResult<number>>;
|
|
183
|
+
/**
|
|
184
|
+
* Parallel product of array elements
|
|
185
|
+
*/
|
|
186
|
+
prod(data: Float64Array): Promise<ParallelResult<number>>;
|
|
187
|
+
/**
|
|
188
|
+
* Parallel dot product
|
|
189
|
+
*/
|
|
190
|
+
dot(a: Float64Array, b: Float64Array): Promise<ParallelResult<number>>;
|
|
191
|
+
/**
|
|
192
|
+
* Parallel element-wise operation
|
|
193
|
+
*/
|
|
194
|
+
elementwise(a: Float64Array, b: Float64Array, op: 'add' | 'subtract' | 'multiply' | 'divide'): Promise<ParallelResult<Float64Array>>;
|
|
195
|
+
/**
|
|
196
|
+
* Parallel scale operation
|
|
197
|
+
*/
|
|
198
|
+
scale(data: Float64Array, scalar: number): Promise<ParallelResult<Float64Array>>;
|
|
199
|
+
/**
|
|
200
|
+
* Parallel matrix multiplication
|
|
201
|
+
*
|
|
202
|
+
* @param a - First matrix as flat Float64Array (row-major)
|
|
203
|
+
* @param aRows - Number of rows in A
|
|
204
|
+
* @param aCols - Number of columns in A
|
|
205
|
+
* @param b - Second matrix as flat Float64Array (row-major)
|
|
206
|
+
* @param bCols - Number of columns in B
|
|
207
|
+
*/
|
|
208
|
+
matmul(a: Float64Array, aRows: number, aCols: number, b: Float64Array, bCols: number): Promise<ParallelResult<Float64Array>>;
|
|
209
|
+
/**
|
|
210
|
+
* Parallel matrix transpose
|
|
211
|
+
*/
|
|
212
|
+
transpose(data: Float64Array, rows: number, cols: number): Promise<ParallelResult<Float64Array>>;
|
|
213
|
+
/**
|
|
214
|
+
* Parallel map operation
|
|
215
|
+
*/
|
|
216
|
+
map<T, R>(data: T[], fn: (item: T) => R): Promise<ParallelResult<R[]>>;
|
|
217
|
+
/**
|
|
218
|
+
* Parallel reduce operation
|
|
219
|
+
*/
|
|
220
|
+
reduce<T, R>(data: T[], fn: (acc: R, item: T) => R, initial: R): Promise<ParallelResult<R>>;
|
|
221
|
+
/**
|
|
222
|
+
* Parallel filter operation
|
|
223
|
+
*/
|
|
224
|
+
filter<T>(data: T[], predicate: (item: T) => boolean): Promise<ParallelResult<T[]>>;
|
|
225
|
+
/**
|
|
226
|
+
* Find min and max values in parallel
|
|
227
|
+
*/
|
|
228
|
+
minMax(data: Float64Array): Promise<ParallelResult<{
|
|
229
|
+
min: number;
|
|
230
|
+
max: number;
|
|
231
|
+
minIdx: number;
|
|
232
|
+
maxIdx: number;
|
|
233
|
+
}>>;
|
|
234
|
+
/**
|
|
235
|
+
* Compute variance, mean, and standard deviation in parallel
|
|
236
|
+
*/
|
|
237
|
+
variance(data: Float64Array): Promise<ParallelResult<{
|
|
238
|
+
mean: number;
|
|
239
|
+
variance: number;
|
|
240
|
+
std: number;
|
|
241
|
+
}>>;
|
|
242
|
+
/**
|
|
243
|
+
* Compute norm (Euclidean length) in parallel
|
|
244
|
+
*/
|
|
245
|
+
norm(data: Float64Array): Promise<ParallelResult<number>>;
|
|
246
|
+
/**
|
|
247
|
+
* Compute Euclidean distance in parallel
|
|
248
|
+
*/
|
|
249
|
+
distance(a: Float64Array, b: Float64Array): Promise<ParallelResult<number>>;
|
|
250
|
+
/**
|
|
251
|
+
* Compute histogram in parallel
|
|
252
|
+
*/
|
|
253
|
+
histogram(data: Float64Array, bins: number, min?: number, max?: number): Promise<ParallelResult<number[]>>;
|
|
254
|
+
/**
|
|
255
|
+
* Apply unary function in parallel
|
|
256
|
+
*/
|
|
257
|
+
unary(data: Float64Array, fn: 'abs' | 'sqrt' | 'exp' | 'log' | 'sin' | 'cos' | 'tan' | 'negate' | 'square'): Promise<ParallelResult<Float64Array>>;
|
|
258
|
+
/**
|
|
259
|
+
* Apply a caller-supplied unary numeric function in parallel.
|
|
260
|
+
*
|
|
261
|
+
* @param data - Input values
|
|
262
|
+
* @param fnSource - Source of a self-contained `(x: number) => number`
|
|
263
|
+
* expression. It must not reference free variables / closures, since it
|
|
264
|
+
* is eval'd in an isolated worker context. Used to parallelize element-wise
|
|
265
|
+
* math (special functions, distribution PDFs/CDFs).
|
|
266
|
+
*/
|
|
267
|
+
applyKernel(data: Float64Array, fnSource: string): Promise<ParallelResult<Float64Array>>;
|
|
268
|
+
/**
|
|
269
|
+
* Apply a caller-supplied binary numeric function in parallel.
|
|
270
|
+
*
|
|
271
|
+
* @param a - First operand array
|
|
272
|
+
* @param b - Second operand array (must match the length of `a`)
|
|
273
|
+
* @param fnSource - Source of a self-contained `(a: number, b: number) =>
|
|
274
|
+
* number` expression (no free variables / closures).
|
|
275
|
+
*/
|
|
276
|
+
applyKernel2(a: Float64Array, b: Float64Array, fnSource: string): Promise<ParallelResult<Float64Array>>;
|
|
277
|
+
/**
|
|
278
|
+
* Fan-out Gauss-Legendre quadrature over `workerCount` sub-intervals.
|
|
279
|
+
*
|
|
280
|
+
* Partitions `[a, b]` into `workerCount` equal sub-domains and dispatches one
|
|
281
|
+
* `integrateChunk` worker task per sub-domain. Each task evaluates the
|
|
282
|
+
* integrand (supplied as a stringified closure) with the given GL nodes and
|
|
283
|
+
* weights and returns its partial integral. The partial sums are aggregated
|
|
284
|
+
* on the main thread.
|
|
285
|
+
*
|
|
286
|
+
* **Closure contract:** `fnSource` must be a self-contained `(x: number) =>
|
|
287
|
+
* number` expression — no free variables referencing outer scope, because it
|
|
288
|
+
* is eval'd inside an isolated worker context. Call-site validation (via
|
|
289
|
+
* `validateClosureSource`) should have already rejected unsafe closures before
|
|
290
|
+
* reaching this method.
|
|
291
|
+
*
|
|
292
|
+
* @param fnSource - Stringified integrand, e.g. `"(x) => Math.sin(x)"`
|
|
293
|
+
* @param a - Lower integration bound
|
|
294
|
+
* @param b - Upper integration bound
|
|
295
|
+
* @param workerCount - Number of sub-intervals / worker tasks
|
|
296
|
+
* @param nodes - GL nodes on [-1, 1]
|
|
297
|
+
* @param weights - Corresponding GL weights
|
|
298
|
+
* @returns Sum of partial integrals = approximate value of ∫ₐᵇ f(x) dx
|
|
299
|
+
*/
|
|
300
|
+
integrateFanOut(fnSource: string, a: number, b: number, workerCount: number, nodes: number[], weights: number[]): Promise<number>;
|
|
301
|
+
/**
|
|
302
|
+
* Fan-out distribution batch sampling across `workerCount` workers.
|
|
303
|
+
*
|
|
304
|
+
* Partitions `n` samples into `workerCount` equal chunks (last chunk absorbs
|
|
305
|
+
* the remainder) and dispatches one `sampleChunk` task per chunk. Each chunk
|
|
306
|
+
* uses an independent seed derived from `baseSeed` via SplitMix64-style
|
|
307
|
+
* hashing:
|
|
308
|
+
*
|
|
309
|
+
* `chunkSeed = (baseSeed ^ (chunkIdx * 0x9E3779B97F4A7C15)) >>> 0`
|
|
310
|
+
*
|
|
311
|
+
* This Fibonacci-hashing multiplier gives good avalanche: even baseSeed=0
|
|
312
|
+
* produces K distinct seeds, and adjacent chunk indices produce uncorrelated
|
|
313
|
+
* sequences. See the `sampleChunk` worker kernel for the full rationale.
|
|
314
|
+
*
|
|
315
|
+
* @param distName - One of 'normal', 'gamma', 'beta', 'studentT', 'exponential'
|
|
316
|
+
* @param params - Distribution parameters (order matches factory functions)
|
|
317
|
+
* @param n - Total number of samples to generate
|
|
318
|
+
* @param baseSeed - Base seed for reproducible output
|
|
319
|
+
* @param workerCount - Number of parallel worker tasks
|
|
320
|
+
* @returns Concatenated Float64Array of `n` samples
|
|
321
|
+
*/
|
|
322
|
+
distributionSampleFanOut(distName: string, params: number[], n: number, baseSeed: number, workerCount: number): Promise<Float64Array>;
|
|
323
|
+
/**
|
|
324
|
+
* Compute a batch of independent radix-2 FFTs in parallel.
|
|
325
|
+
*
|
|
326
|
+
* `real` and `imag` each hold `frameCount` concatenated frames of
|
|
327
|
+
* `frameLength` samples (`frameLength` must be a power of two). Each frame
|
|
328
|
+
* is FFT'd independently and the frames are distributed across workers.
|
|
329
|
+
*
|
|
330
|
+
* Used to parallelize the embarrassingly-parallel FFT batches in
|
|
331
|
+
* `spectrogram` (one FFT per windowed frame) and `fft2d` (rows then columns).
|
|
332
|
+
*
|
|
333
|
+
* @param real - Concatenated real parts (`frameCount * frameLength` values)
|
|
334
|
+
* @param imag - Concatenated imaginary parts (same layout as `real`)
|
|
335
|
+
* @param frameCount - Number of independent frames
|
|
336
|
+
* @param frameLength - Samples per frame (power of two)
|
|
337
|
+
* @param inverse - Compute the inverse FFT when true
|
|
338
|
+
*/
|
|
339
|
+
fftBatch(real: Float64Array, imag: Float64Array, frameCount: number, frameLength: number, inverse?: boolean): Promise<ParallelResult<{
|
|
340
|
+
real: Float64Array;
|
|
341
|
+
imag: Float64Array;
|
|
342
|
+
}>>;
|
|
343
|
+
/**
|
|
344
|
+
* Compute an all-pairs Euclidean distance matrix in parallel.
|
|
345
|
+
*
|
|
346
|
+
* @param points - Flattened `n * dim` coordinate array (row-major)
|
|
347
|
+
* @param n - Number of points
|
|
348
|
+
* @param dim - Coordinate dimension
|
|
349
|
+
* @returns Flat row-major `n * n` distance matrix
|
|
350
|
+
*/
|
|
351
|
+
distanceMatrix(points: Float64Array, n: number, dim: number): Promise<ParallelResult<Float64Array>>;
|
|
352
|
+
/**
|
|
353
|
+
* Parallel absolute value
|
|
354
|
+
*/
|
|
355
|
+
abs(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
356
|
+
/**
|
|
357
|
+
* Parallel square root
|
|
358
|
+
*/
|
|
359
|
+
sqrt(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
360
|
+
/**
|
|
361
|
+
* Parallel exponential
|
|
362
|
+
*/
|
|
363
|
+
exp(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
364
|
+
/**
|
|
365
|
+
* Parallel natural log
|
|
366
|
+
*/
|
|
367
|
+
log(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
368
|
+
/**
|
|
369
|
+
* Parallel sine
|
|
370
|
+
*/
|
|
371
|
+
sin(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
372
|
+
/**
|
|
373
|
+
* Parallel cosine
|
|
374
|
+
*/
|
|
375
|
+
cos(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
376
|
+
/**
|
|
377
|
+
* Parallel tangent
|
|
378
|
+
*/
|
|
379
|
+
tan(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
380
|
+
/**
|
|
381
|
+
* Parallel negation
|
|
382
|
+
*/
|
|
383
|
+
negate(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
384
|
+
/**
|
|
385
|
+
* Parallel square
|
|
386
|
+
*/
|
|
387
|
+
square(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
388
|
+
/**
|
|
389
|
+
* Parallel matrix-vector multiplication
|
|
390
|
+
*/
|
|
391
|
+
matvec(matrix: Float64Array, rows: number, cols: number, vector: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
392
|
+
/**
|
|
393
|
+
* Parallel outer product
|
|
394
|
+
*/
|
|
395
|
+
outer(a: Float64Array, b: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
396
|
+
/**
|
|
397
|
+
* Parallel find operation
|
|
398
|
+
*/
|
|
399
|
+
find<T>(data: T[], predicate: (item: T) => boolean): Promise<ParallelResult<{
|
|
400
|
+
found: boolean;
|
|
401
|
+
value?: T;
|
|
402
|
+
index?: number;
|
|
403
|
+
}>>;
|
|
404
|
+
/**
|
|
405
|
+
* Parallel sort operation
|
|
406
|
+
*/
|
|
407
|
+
sort<T>(data: T[], compare?: (a: T, b: T) => number): Promise<ParallelResult<T[]>>;
|
|
408
|
+
/**
|
|
409
|
+
* Parallel addition of two arrays
|
|
410
|
+
*/
|
|
411
|
+
add(a: Float64Array, b: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
412
|
+
/**
|
|
413
|
+
* Parallel subtraction of two arrays
|
|
414
|
+
*/
|
|
415
|
+
subtract(a: Float64Array, b: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
416
|
+
/**
|
|
417
|
+
* Parallel element-wise multiplication
|
|
418
|
+
*/
|
|
419
|
+
multiply(a: Float64Array, b: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
420
|
+
/**
|
|
421
|
+
* Parallel element-wise division
|
|
422
|
+
*/
|
|
423
|
+
divide(a: Float64Array, b: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
424
|
+
/**
|
|
425
|
+
* Parallel element-wise exponentiation.
|
|
426
|
+
*
|
|
427
|
+
* `out[i] = a[i] ** b[i]`
|
|
428
|
+
*
|
|
429
|
+
* Delegates to `applyKernel2` with the `Math.pow` kernel. The default
|
|
430
|
+
* per-op threshold for `pow` is `'never'` (overhead dominates); the
|
|
431
|
+
* sequential path is taken unless the caller overrides `thresholdByOp.pow`.
|
|
432
|
+
*/
|
|
433
|
+
pow(a: Float64Array, b: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
434
|
+
/**
|
|
435
|
+
* Parallel element-wise sign function.
|
|
436
|
+
*
|
|
437
|
+
* `out[i] = Math.sign(data[i])` → -1 | 0 | 1, with NaN → NaN (IEEE 754).
|
|
438
|
+
*
|
|
439
|
+
* Delegates to `applyKernel` with the `Math.sign` kernel. The default
|
|
440
|
+
* per-op threshold for `sign` is `'never'` (overhead dominates); the
|
|
441
|
+
* sequential path is taken unless the caller overrides `thresholdByOp.sign`.
|
|
442
|
+
*/
|
|
443
|
+
sign(data: Float64Array): Promise<ParallelResult<Float64Array>>;
|
|
444
|
+
/**
|
|
445
|
+
* General tensor contraction (tensordot) over specified axis pairs.
|
|
446
|
+
*
|
|
447
|
+
* Contracts axis `axesA[i]` of `a` with axis `axesB[i]` of `b` for each
|
|
448
|
+
* pair index `i`. The result shape is the non-contracted axes of `a` followed
|
|
449
|
+
* by the non-contracted axes of `b` (NumPy convention).
|
|
450
|
+
*
|
|
451
|
+
* Parallelization threshold: contracted-axis volume (product of contracted
|
|
452
|
+
* dimensions) >= 8 192. When parallelized, output elements are distributed
|
|
453
|
+
* in contiguous slices across workers via the `tensordotChunk` kernel.
|
|
454
|
+
*
|
|
455
|
+
* @param a - Flat row-major Float64Array for tensor A
|
|
456
|
+
* @param aShape - Shape of tensor A
|
|
457
|
+
* @param b - Flat row-major Float64Array for tensor B
|
|
458
|
+
* @param bShape - Shape of tensor B
|
|
459
|
+
* @param axesA - Axes of A to contract (same length as axesB)
|
|
460
|
+
* @param axesB - Axes of B to contract (same length as axesA)
|
|
461
|
+
* @returns `{ data: Float64Array; shape: number[] }` — flat result + result shape
|
|
462
|
+
*/
|
|
463
|
+
tensordot(a: Float64Array, aShape: readonly number[], b: Float64Array, bShape: readonly number[], axesA: readonly number[], axesB: readonly number[]): Promise<ParallelResult<{
|
|
464
|
+
data: Float64Array;
|
|
465
|
+
shape: number[];
|
|
466
|
+
}>>;
|
|
467
|
+
/**
|
|
468
|
+
* Compute mean in parallel (uses variance internally)
|
|
469
|
+
*/
|
|
470
|
+
mean(data: Float64Array): Promise<ParallelResult<number>>;
|
|
471
|
+
/**
|
|
472
|
+
* Compute standard deviation in parallel
|
|
473
|
+
*/
|
|
474
|
+
std(data: Float64Array): Promise<ParallelResult<number>>;
|
|
475
|
+
/**
|
|
476
|
+
* Find minimum value in parallel
|
|
477
|
+
*/
|
|
478
|
+
min(data: Float64Array): Promise<ParallelResult<number>>;
|
|
479
|
+
/**
|
|
480
|
+
* Find maximum value in parallel
|
|
481
|
+
*/
|
|
482
|
+
max(data: Float64Array): Promise<ParallelResult<number>>;
|
|
483
|
+
/**
|
|
484
|
+
* Element-wise bitwise AND on two `Int32Array`s.
|
|
485
|
+
*/
|
|
486
|
+
bitAnd(a: Int32Array, b: Int32Array): Promise<ParallelResult<Int32Array>>;
|
|
487
|
+
/**
|
|
488
|
+
* Element-wise bitwise OR on two `Int32Array`s.
|
|
489
|
+
*/
|
|
490
|
+
bitOr(a: Int32Array, b: Int32Array): Promise<ParallelResult<Int32Array>>;
|
|
491
|
+
/**
|
|
492
|
+
* Element-wise bitwise XOR on two `Int32Array`s.
|
|
493
|
+
*/
|
|
494
|
+
bitXor(a: Int32Array, b: Int32Array): Promise<ParallelResult<Int32Array>>;
|
|
495
|
+
/**
|
|
496
|
+
* Unary bitwise NOT on an `Int32Array`.
|
|
497
|
+
*/
|
|
498
|
+
bitNot(a: Int32Array): Promise<ParallelResult<Int32Array>>;
|
|
499
|
+
/**
|
|
500
|
+
* Element-wise left shift. `b` may be a per-element `Int32Array` of
|
|
501
|
+
* shift counts or a single scalar `number` applied uniformly.
|
|
502
|
+
*/
|
|
503
|
+
leftShift(a: Int32Array, b: Int32Array | number): Promise<ParallelResult<Int32Array>>;
|
|
504
|
+
/**
|
|
505
|
+
* Element-wise arithmetic (sign-preserving) right shift.
|
|
506
|
+
*/
|
|
507
|
+
rightArithShift(a: Int32Array, b: Int32Array | number): Promise<ParallelResult<Int32Array>>;
|
|
508
|
+
/**
|
|
509
|
+
* Element-wise logical (zero-filling) right shift. Results are stored
|
|
510
|
+
* as `Int32Array`, so values ≥ 2^31 wrap into the negative range —
|
|
511
|
+
* matching `(x >>> n) | 0` JavaScript semantics.
|
|
512
|
+
*/
|
|
513
|
+
rightLogShift(a: Int32Array, b: Int32Array | number): Promise<ParallelResult<Int32Array>>;
|
|
514
|
+
/**
|
|
515
|
+
* Terminate the worker pool
|
|
516
|
+
*/
|
|
517
|
+
terminate(force?: boolean): Promise<void>;
|
|
518
|
+
/**
|
|
519
|
+
* Update configuration
|
|
520
|
+
*/
|
|
521
|
+
updateConfig(config: Partial<ComputePoolConfig>): void;
|
|
522
|
+
/**
|
|
523
|
+
* Get current configuration
|
|
524
|
+
*/
|
|
525
|
+
getConfig(): ComputePoolConfig;
|
|
526
|
+
/**
|
|
527
|
+
* Maximum number of workers configured for this pool.
|
|
528
|
+
* Used by distribution sampling fan-out to determine chunk count.
|
|
529
|
+
*/
|
|
530
|
+
get workerCount(): number;
|
|
531
|
+
/**
|
|
532
|
+
* Get the underlying MathWorkerPool for advanced operations
|
|
533
|
+
*/
|
|
534
|
+
getWorkerPool(): MathWorkerPool;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Global compute pool instance
|
|
538
|
+
*/
|
|
539
|
+
export declare const computePool: ComputePool;
|
|
540
|
+
/**
|
|
541
|
+
* Create a Transferable wrapper for zero-copy data transfer
|
|
542
|
+
*/
|
|
543
|
+
export { Transfer };
|
|
544
|
+
/**
|
|
545
|
+
* Re-export types from @danielsimonjr/mathts-workerpool
|
|
546
|
+
*/
|
|
547
|
+
export type { TaskOptions, PoolStats };
|
|
548
|
+
//# sourceMappingURL=ComputePool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComputePool.d.ts","sourceRoot":"","sources":["../src/ComputePool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,EACL,cAAc,EACd,QAAQ,EAGR,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,kCAAkC,CAAC;AAY1C;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,MAAM,GAEd,KAAK,GACL,UAAU,GACV,UAAU,GACV,QAAQ,GACR,KAAK,GACL,OAAO,GACP,KAAK,GACL,QAAQ,GACR,MAAM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