wasm-bhtsne 1.1.0 → 1.2.2
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/package.json +5 -3
- package/snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js +107 -0
- package/wasm_bhtsne.d.ts +47 -70
- package/wasm_bhtsne.js +421 -451
- package/wasm_bhtsne_bg.wasm +0 -0
package/wasm_bhtsne.js
CHANGED
|
@@ -1,137 +1,13 @@
|
|
|
1
|
-
import { startWorkers } from './snippets/wasm-bindgen-rayon-
|
|
1
|
+
import { startWorkers } from './snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function getObject(idx) { return heap[idx]; }
|
|
10
|
-
|
|
11
|
-
let heap_next = heap.length;
|
|
12
|
-
|
|
13
|
-
function dropObject(idx) {
|
|
14
|
-
if (idx < 132) return;
|
|
15
|
-
heap[idx] = heap_next;
|
|
16
|
-
heap_next = idx;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function takeObject(idx) {
|
|
20
|
-
const ret = getObject(idx);
|
|
21
|
-
dropObject(idx);
|
|
22
|
-
return ret;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function isLikeNone(x) {
|
|
26
|
-
return x === undefined || x === null;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let cachedFloat64Memory0 = null;
|
|
30
|
-
|
|
31
|
-
function getFloat64Memory0() {
|
|
32
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.buffer !== wasm.memory.buffer) {
|
|
33
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
34
|
-
}
|
|
35
|
-
return cachedFloat64Memory0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
let cachedInt32Memory0 = null;
|
|
39
|
-
|
|
40
|
-
function getInt32Memory0() {
|
|
41
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
42
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
43
|
-
}
|
|
44
|
-
return cachedInt32Memory0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function addHeapObject(obj) {
|
|
48
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
49
|
-
const idx = heap_next;
|
|
50
|
-
heap_next = heap[idx];
|
|
51
|
-
|
|
52
|
-
heap[idx] = obj;
|
|
5
|
+
function addToExternrefTable0(obj) {
|
|
6
|
+
const idx = wasm.__externref_table_alloc();
|
|
7
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
53
8
|
return idx;
|
|
54
9
|
}
|
|
55
10
|
|
|
56
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
57
|
-
|
|
58
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
59
|
-
|
|
60
|
-
let cachedUint8Memory0 = null;
|
|
61
|
-
|
|
62
|
-
function getUint8Memory0() {
|
|
63
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
64
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
65
|
-
}
|
|
66
|
-
return cachedUint8Memory0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function getStringFromWasm0(ptr, len) {
|
|
70
|
-
ptr = ptr >>> 0;
|
|
71
|
-
return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
let WASM_VECTOR_LEN = 0;
|
|
75
|
-
|
|
76
|
-
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
77
|
-
|
|
78
|
-
const encodeString = function (arg, view) {
|
|
79
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
80
|
-
view.set(buf);
|
|
81
|
-
return {
|
|
82
|
-
read: arg.length,
|
|
83
|
-
written: buf.length
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
88
|
-
|
|
89
|
-
if (realloc === undefined) {
|
|
90
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
91
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
92
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
93
|
-
WASM_VECTOR_LEN = buf.length;
|
|
94
|
-
return ptr;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
let len = arg.length;
|
|
98
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
99
|
-
|
|
100
|
-
const mem = getUint8Memory0();
|
|
101
|
-
|
|
102
|
-
let offset = 0;
|
|
103
|
-
|
|
104
|
-
for (; offset < len; offset++) {
|
|
105
|
-
const code = arg.charCodeAt(offset);
|
|
106
|
-
if (code > 0x7F) break;
|
|
107
|
-
mem[ptr + offset] = code;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (offset !== len) {
|
|
111
|
-
if (offset !== 0) {
|
|
112
|
-
arg = arg.slice(offset);
|
|
113
|
-
}
|
|
114
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
115
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
116
|
-
const ret = encodeString(arg, view);
|
|
117
|
-
|
|
118
|
-
offset += ret.written;
|
|
119
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
WASM_VECTOR_LEN = offset;
|
|
123
|
-
return ptr;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
let cachedBigInt64Memory0 = null;
|
|
127
|
-
|
|
128
|
-
function getBigInt64Memory0() {
|
|
129
|
-
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {
|
|
130
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
131
|
-
}
|
|
132
|
-
return cachedBigInt64Memory0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
11
|
function debugString(val) {
|
|
136
12
|
// primitive types
|
|
137
13
|
const type = typeof val;
|
|
@@ -173,7 +49,7 @@ function debugString(val) {
|
|
|
173
49
|
// Test for built-in
|
|
174
50
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
175
51
|
let className;
|
|
176
|
-
if (builtInMatches.length > 1) {
|
|
52
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
177
53
|
className = builtInMatches[1];
|
|
178
54
|
} else {
|
|
179
55
|
// Failed to match the standard '[object ClassName]'
|
|
@@ -197,144 +73,224 @@ function debugString(val) {
|
|
|
197
73
|
return className;
|
|
198
74
|
}
|
|
199
75
|
|
|
76
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
77
|
+
ptr = ptr >>> 0;
|
|
78
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
let cachedDataViewMemory0 = null;
|
|
82
|
+
function getDataViewMemory0() {
|
|
83
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
84
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
85
|
+
}
|
|
86
|
+
return cachedDataViewMemory0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function getStringFromWasm0(ptr, len) {
|
|
90
|
+
ptr = ptr >>> 0;
|
|
91
|
+
return decodeText(ptr, len);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
let cachedUint8ArrayMemory0 = null;
|
|
95
|
+
function getUint8ArrayMemory0() {
|
|
96
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
97
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
98
|
+
}
|
|
99
|
+
return cachedUint8ArrayMemory0;
|
|
100
|
+
}
|
|
101
|
+
|
|
200
102
|
function handleError(f, args) {
|
|
201
103
|
try {
|
|
202
104
|
return f.apply(this, args);
|
|
203
105
|
} catch (e) {
|
|
204
|
-
|
|
106
|
+
const idx = addToExternrefTable0(e);
|
|
107
|
+
wasm.__wbindgen_exn_store(idx);
|
|
205
108
|
}
|
|
206
109
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
*/
|
|
211
|
-
export function initThreadPool(num_threads) {
|
|
212
|
-
const ret = wasm.initThreadPool(num_threads);
|
|
213
|
-
return takeObject(ret);
|
|
110
|
+
|
|
111
|
+
function isLikeNone(x) {
|
|
112
|
+
return x === undefined || x === null;
|
|
214
113
|
}
|
|
215
114
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
115
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
116
|
+
if (realloc === undefined) {
|
|
117
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
118
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
119
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
120
|
+
WASM_VECTOR_LEN = buf.length;
|
|
121
|
+
return ptr;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
let len = arg.length;
|
|
125
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
126
|
+
|
|
127
|
+
const mem = getUint8ArrayMemory0();
|
|
128
|
+
|
|
129
|
+
let offset = 0;
|
|
130
|
+
|
|
131
|
+
for (; offset < len; offset++) {
|
|
132
|
+
const code = arg.charCodeAt(offset);
|
|
133
|
+
if (code > 0x7F) break;
|
|
134
|
+
mem[ptr + offset] = code;
|
|
135
|
+
}
|
|
136
|
+
if (offset !== len) {
|
|
137
|
+
if (offset !== 0) {
|
|
138
|
+
arg = arg.slice(offset);
|
|
139
|
+
}
|
|
140
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
141
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
142
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
143
|
+
|
|
144
|
+
offset += ret.written;
|
|
145
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
WASM_VECTOR_LEN = offset;
|
|
149
|
+
return ptr;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function takeFromExternrefTable0(idx) {
|
|
153
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
154
|
+
wasm.__externref_table_dealloc(idx);
|
|
155
|
+
return value;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : undefined);
|
|
159
|
+
if (cachedTextDecoder) cachedTextDecoder.decode();
|
|
160
|
+
|
|
161
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
162
|
+
let numBytesDecoded = 0;
|
|
163
|
+
function decodeText(ptr, len) {
|
|
164
|
+
numBytesDecoded += len;
|
|
165
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
166
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
167
|
+
cachedTextDecoder.decode();
|
|
168
|
+
numBytesDecoded = len;
|
|
169
|
+
}
|
|
170
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined);
|
|
174
|
+
|
|
175
|
+
if (cachedTextEncoder) {
|
|
176
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
177
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
178
|
+
view.set(buf);
|
|
179
|
+
return {
|
|
180
|
+
read: arg.length,
|
|
181
|
+
written: buf.length
|
|
182
|
+
};
|
|
183
|
+
}
|
|
221
184
|
}
|
|
222
185
|
|
|
186
|
+
let WASM_VECTOR_LEN = 0;
|
|
187
|
+
|
|
223
188
|
const bhtSNEf32Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
224
189
|
? { register: () => {}, unregister: () => {} }
|
|
225
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_bhtsnef32_free(ptr >>> 0));
|
|
190
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bhtsnef32_free(ptr >>> 0, 1));
|
|
191
|
+
|
|
192
|
+
const bhtSNEf64Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
193
|
+
? { register: () => {}, unregister: () => {} }
|
|
194
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bhtsnef64_free(ptr >>> 0, 1));
|
|
195
|
+
|
|
196
|
+
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
197
|
+
? { register: () => {}, unregister: () => {} }
|
|
198
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
|
|
199
|
+
|
|
226
200
|
/**
|
|
227
|
-
* t-distributed stochastic neighbor embedding. Provides a parallel implementation of both the
|
|
228
|
-
* exact version of the algorithm and the tree accelerated one leveraging space partitioning trees.
|
|
229
|
-
*/
|
|
201
|
+
* t-distributed stochastic neighbor embedding. Provides a parallel implementation of both the
|
|
202
|
+
* exact version of the algorithm and the tree accelerated one leveraging space partitioning trees.
|
|
203
|
+
*/
|
|
230
204
|
export class bhtSNEf32 {
|
|
231
|
-
|
|
232
205
|
__destroy_into_raw() {
|
|
233
206
|
const ptr = this.__wbg_ptr;
|
|
234
207
|
this.__wbg_ptr = 0;
|
|
235
208
|
bhtSNEf32Finalization.unregister(this);
|
|
236
209
|
return ptr;
|
|
237
210
|
}
|
|
238
|
-
|
|
239
211
|
free() {
|
|
240
212
|
const ptr = this.__destroy_into_raw();
|
|
241
|
-
wasm.__wbg_bhtsnef32_free(ptr);
|
|
213
|
+
wasm.__wbg_bhtsnef32_free(ptr, 0);
|
|
242
214
|
}
|
|
243
215
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
216
|
+
* @param {any} data
|
|
217
|
+
* @param {any} opt
|
|
218
|
+
*/
|
|
247
219
|
constructor(data, opt) {
|
|
248
|
-
const ret = wasm.bhtsnef32_new(
|
|
220
|
+
const ret = wasm.bhtsnef32_new(data, opt);
|
|
249
221
|
this.__wbg_ptr = ret >>> 0;
|
|
222
|
+
bhtSNEf32Finalization.register(this, this.__wbg_ptr, this);
|
|
250
223
|
return this;
|
|
251
224
|
}
|
|
252
225
|
/**
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
226
|
+
* Performs a parallel Barnes-Hut approximation of the t-SNE algorithm.
|
|
227
|
+
*
|
|
228
|
+
* # Arguments
|
|
229
|
+
*
|
|
230
|
+
* `epochs` - the maximum number of fitting iterations. Must be positive
|
|
231
|
+
* @param {number} epochs
|
|
232
|
+
* @returns {any}
|
|
233
|
+
*/
|
|
261
234
|
step(epochs) {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
266
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
267
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
268
|
-
if (r2) {
|
|
269
|
-
throw takeObject(r1);
|
|
270
|
-
}
|
|
271
|
-
return takeObject(r0);
|
|
272
|
-
} finally {
|
|
273
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
235
|
+
const ret = wasm.bhtsnef32_step(this.__wbg_ptr, epochs);
|
|
236
|
+
if (ret[2]) {
|
|
237
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
274
238
|
}
|
|
239
|
+
return takeFromExternrefTable0(ret[0]);
|
|
275
240
|
}
|
|
276
241
|
}
|
|
242
|
+
if (Symbol.dispose) bhtSNEf32.prototype[Symbol.dispose] = bhtSNEf32.prototype.free;
|
|
277
243
|
|
|
278
|
-
const bhtSNEf64Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
279
|
-
? { register: () => {}, unregister: () => {} }
|
|
280
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_bhtsnef64_free(ptr >>> 0));
|
|
281
|
-
/**
|
|
282
|
-
*/
|
|
283
244
|
export class bhtSNEf64 {
|
|
284
|
-
|
|
285
245
|
__destroy_into_raw() {
|
|
286
246
|
const ptr = this.__wbg_ptr;
|
|
287
247
|
this.__wbg_ptr = 0;
|
|
288
248
|
bhtSNEf64Finalization.unregister(this);
|
|
289
249
|
return ptr;
|
|
290
250
|
}
|
|
291
|
-
|
|
292
251
|
free() {
|
|
293
252
|
const ptr = this.__destroy_into_raw();
|
|
294
|
-
wasm.__wbg_bhtsnef64_free(ptr);
|
|
253
|
+
wasm.__wbg_bhtsnef64_free(ptr, 0);
|
|
295
254
|
}
|
|
296
255
|
/**
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
256
|
+
* @param {any} data
|
|
257
|
+
* @param {any} opt
|
|
258
|
+
*/
|
|
300
259
|
constructor(data, opt) {
|
|
301
|
-
const ret = wasm.bhtsnef64_new(
|
|
260
|
+
const ret = wasm.bhtsnef64_new(data, opt);
|
|
302
261
|
this.__wbg_ptr = ret >>> 0;
|
|
262
|
+
bhtSNEf64Finalization.register(this, this.__wbg_ptr, this);
|
|
303
263
|
return this;
|
|
304
264
|
}
|
|
305
265
|
/**
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
266
|
+
* Performs a parallel Barnes-Hut approximation of the t-SNE algorithm.
|
|
267
|
+
*
|
|
268
|
+
* # Arguments
|
|
269
|
+
*
|
|
270
|
+
* `epochs` - Sets epochs, the maximum number of fitting iterations.
|
|
271
|
+
* @param {number} epochs
|
|
272
|
+
* @returns {any}
|
|
273
|
+
*/
|
|
314
274
|
step(epochs) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
319
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
320
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
321
|
-
if (r2) {
|
|
322
|
-
throw takeObject(r1);
|
|
323
|
-
}
|
|
324
|
-
return takeObject(r0);
|
|
325
|
-
} finally {
|
|
326
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
275
|
+
const ret = wasm.bhtsnef64_step(this.__wbg_ptr, epochs);
|
|
276
|
+
if (ret[2]) {
|
|
277
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
327
278
|
}
|
|
279
|
+
return takeFromExternrefTable0(ret[0]);
|
|
328
280
|
}
|
|
329
281
|
}
|
|
282
|
+
if (Symbol.dispose) bhtSNEf64.prototype[Symbol.dispose] = bhtSNEf64.prototype.free;
|
|
330
283
|
|
|
331
|
-
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
332
|
-
? { register: () => {}, unregister: () => {} }
|
|
333
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0));
|
|
334
284
|
/**
|
|
335
|
-
|
|
336
|
-
|
|
285
|
+
* @param {number} num_threads
|
|
286
|
+
* @returns {Promise<any>}
|
|
287
|
+
*/
|
|
288
|
+
export function initThreadPool(num_threads) {
|
|
289
|
+
const ret = wasm.initThreadPool(num_threads);
|
|
290
|
+
return ret;
|
|
291
|
+
}
|
|
337
292
|
|
|
293
|
+
export class wbg_rayon_PoolBuilder {
|
|
338
294
|
static __wrap(ptr) {
|
|
339
295
|
ptr = ptr >>> 0;
|
|
340
296
|
const obj = Object.create(wbg_rayon_PoolBuilder.prototype);
|
|
@@ -342,48 +298,55 @@ export class wbg_rayon_PoolBuilder {
|
|
|
342
298
|
wbg_rayon_PoolBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
343
299
|
return obj;
|
|
344
300
|
}
|
|
345
|
-
|
|
346
301
|
__destroy_into_raw() {
|
|
347
302
|
const ptr = this.__wbg_ptr;
|
|
348
303
|
this.__wbg_ptr = 0;
|
|
349
304
|
wbg_rayon_PoolBuilderFinalization.unregister(this);
|
|
350
305
|
return ptr;
|
|
351
306
|
}
|
|
352
|
-
|
|
353
307
|
free() {
|
|
354
308
|
const ptr = this.__destroy_into_raw();
|
|
355
|
-
wasm.__wbg_wbg_rayon_poolbuilder_free(ptr);
|
|
309
|
+
wasm.__wbg_wbg_rayon_poolbuilder_free(ptr, 0);
|
|
356
310
|
}
|
|
357
311
|
/**
|
|
358
|
-
|
|
359
|
-
|
|
312
|
+
* @returns {number}
|
|
313
|
+
*/
|
|
360
314
|
numThreads() {
|
|
361
315
|
const ret = wasm.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr);
|
|
362
316
|
return ret >>> 0;
|
|
363
317
|
}
|
|
318
|
+
build() {
|
|
319
|
+
wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
|
|
320
|
+
}
|
|
364
321
|
/**
|
|
365
|
-
|
|
366
|
-
|
|
322
|
+
* @returns {number}
|
|
323
|
+
*/
|
|
367
324
|
receiver() {
|
|
368
325
|
const ret = wasm.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr);
|
|
369
326
|
return ret >>> 0;
|
|
370
327
|
}
|
|
371
|
-
/**
|
|
372
|
-
*/
|
|
373
|
-
build() {
|
|
374
|
-
wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
|
|
375
|
-
}
|
|
376
328
|
}
|
|
329
|
+
if (Symbol.dispose) wbg_rayon_PoolBuilder.prototype[Symbol.dispose] = wbg_rayon_PoolBuilder.prototype.free;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @param {number} receiver
|
|
333
|
+
*/
|
|
334
|
+
export function wbg_rayon_start_worker(receiver) {
|
|
335
|
+
wasm.wbg_rayon_start_worker(receiver);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
377
339
|
|
|
378
340
|
async function __wbg_load(module, imports) {
|
|
379
341
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
380
342
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
381
343
|
try {
|
|
382
344
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
383
|
-
|
|
384
345
|
} catch (e) {
|
|
385
|
-
|
|
386
|
-
|
|
346
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
347
|
+
|
|
348
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
349
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
387
350
|
|
|
388
351
|
} else {
|
|
389
352
|
throw e;
|
|
@@ -393,349 +356,356 @@ async function __wbg_load(module, imports) {
|
|
|
393
356
|
|
|
394
357
|
const bytes = await module.arrayBuffer();
|
|
395
358
|
return await WebAssembly.instantiate(bytes, imports);
|
|
396
|
-
|
|
397
359
|
} else {
|
|
398
360
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
399
361
|
|
|
400
362
|
if (instance instanceof WebAssembly.Instance) {
|
|
401
363
|
return { instance, module };
|
|
402
|
-
|
|
403
364
|
} else {
|
|
404
365
|
return instance;
|
|
405
366
|
}
|
|
406
367
|
}
|
|
407
368
|
}
|
|
408
369
|
|
|
409
|
-
function __wbg_get_imports() {
|
|
370
|
+
function __wbg_get_imports(memory) {
|
|
410
371
|
const imports = {};
|
|
411
372
|
imports.wbg = {};
|
|
412
|
-
imports.wbg.
|
|
413
|
-
|
|
414
|
-
};
|
|
415
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
416
|
-
const ret = getObject(arg0) === undefined;
|
|
373
|
+
imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
374
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
417
375
|
return ret;
|
|
418
376
|
};
|
|
419
|
-
imports.wbg.
|
|
420
|
-
const ret =
|
|
377
|
+
imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
|
|
378
|
+
const ret = Number(arg0);
|
|
421
379
|
return ret;
|
|
422
380
|
};
|
|
423
|
-
imports.wbg.
|
|
424
|
-
const
|
|
425
|
-
const ret = typeof(
|
|
426
|
-
|
|
427
|
-
|
|
381
|
+
imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
|
|
382
|
+
const v = arg1;
|
|
383
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
384
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
385
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
428
386
|
};
|
|
429
|
-
imports.wbg.
|
|
430
|
-
const
|
|
387
|
+
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
388
|
+
const v = arg0;
|
|
389
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
390
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
391
|
+
};
|
|
392
|
+
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
393
|
+
const ret = debugString(arg1);
|
|
394
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
395
|
+
const len1 = WASM_VECTOR_LEN;
|
|
396
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
397
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
398
|
+
};
|
|
399
|
+
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
400
|
+
const ret = arg0 in arg1;
|
|
431
401
|
return ret;
|
|
432
402
|
};
|
|
433
|
-
imports.wbg.
|
|
434
|
-
const ret =
|
|
435
|
-
return
|
|
403
|
+
imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
404
|
+
const ret = typeof(arg0) === 'bigint';
|
|
405
|
+
return ret;
|
|
436
406
|
};
|
|
437
|
-
imports.wbg.
|
|
438
|
-
const ret =
|
|
407
|
+
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
408
|
+
const ret = typeof(arg0) === 'function';
|
|
439
409
|
return ret;
|
|
440
410
|
};
|
|
441
|
-
imports.wbg.
|
|
442
|
-
const val =
|
|
411
|
+
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
412
|
+
const val = arg0;
|
|
443
413
|
const ret = typeof(val) === 'object' && val !== null;
|
|
444
414
|
return ret;
|
|
445
415
|
};
|
|
446
|
-
imports.wbg.
|
|
447
|
-
const ret =
|
|
448
|
-
return
|
|
416
|
+
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
417
|
+
const ret = typeof(arg0) === 'string';
|
|
418
|
+
return ret;
|
|
449
419
|
};
|
|
450
|
-
imports.wbg.
|
|
451
|
-
const ret =
|
|
452
|
-
return
|
|
420
|
+
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
421
|
+
const ret = arg0 === undefined;
|
|
422
|
+
return ret;
|
|
453
423
|
};
|
|
454
|
-
imports.wbg.
|
|
455
|
-
const ret =
|
|
424
|
+
imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
425
|
+
const ret = arg0 === arg1;
|
|
456
426
|
return ret;
|
|
457
427
|
};
|
|
458
|
-
imports.wbg.
|
|
459
|
-
const
|
|
460
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
428
|
+
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
429
|
+
const ret = arg0 == arg1;
|
|
461
430
|
return ret;
|
|
462
431
|
};
|
|
463
|
-
imports.wbg.
|
|
464
|
-
const
|
|
432
|
+
imports.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
|
|
433
|
+
const ret = wasm.memory;
|
|
434
|
+
return ret;
|
|
435
|
+
};
|
|
436
|
+
imports.wbg.__wbg___wbindgen_module_967adef62ea6cbf8 = function() {
|
|
437
|
+
const ret = __wbg_init.__wbindgen_wasm_module;
|
|
438
|
+
return ret;
|
|
439
|
+
};
|
|
440
|
+
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
441
|
+
const obj = arg1;
|
|
442
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
443
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
444
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
445
|
+
};
|
|
446
|
+
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
447
|
+
const obj = arg1;
|
|
465
448
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
466
449
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
467
450
|
var len1 = WASM_VECTOR_LEN;
|
|
468
|
-
|
|
469
|
-
|
|
451
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
452
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
453
|
+
};
|
|
454
|
+
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
455
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
470
456
|
};
|
|
471
|
-
imports.wbg.
|
|
472
|
-
const ret =
|
|
457
|
+
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
458
|
+
const ret = arg0.call(arg1, arg2);
|
|
459
|
+
return ret;
|
|
460
|
+
}, arguments) };
|
|
461
|
+
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
462
|
+
const ret = arg0.call(arg1);
|
|
463
|
+
return ret;
|
|
464
|
+
}, arguments) };
|
|
465
|
+
imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
466
|
+
const ret = arg0.crypto;
|
|
473
467
|
return ret;
|
|
474
468
|
};
|
|
475
|
-
imports.wbg.
|
|
476
|
-
const ret = arg0;
|
|
477
|
-
return
|
|
469
|
+
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
470
|
+
const ret = arg0.done;
|
|
471
|
+
return ret;
|
|
478
472
|
};
|
|
479
|
-
imports.wbg.
|
|
480
|
-
|
|
481
|
-
|
|
473
|
+
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
474
|
+
arg0.getRandomValues(arg1);
|
|
475
|
+
}, arguments) };
|
|
476
|
+
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
477
|
+
const ret = arg0[arg1 >>> 0];
|
|
478
|
+
return ret;
|
|
482
479
|
};
|
|
483
|
-
imports.wbg.
|
|
484
|
-
const ret =
|
|
485
|
-
return
|
|
480
|
+
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
481
|
+
const ret = Reflect.get(arg0, arg1);
|
|
482
|
+
return ret;
|
|
483
|
+
}, arguments) };
|
|
484
|
+
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
485
|
+
const ret = arg0[arg1];
|
|
486
|
+
return ret;
|
|
486
487
|
};
|
|
487
|
-
imports.wbg.
|
|
488
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
488
489
|
let result;
|
|
489
490
|
try {
|
|
490
|
-
result =
|
|
491
|
+
result = arg0 instanceof ArrayBuffer;
|
|
491
492
|
} catch (_) {
|
|
492
493
|
result = false;
|
|
493
494
|
}
|
|
494
495
|
const ret = result;
|
|
495
496
|
return ret;
|
|
496
497
|
};
|
|
497
|
-
imports.wbg.
|
|
498
|
-
|
|
499
|
-
|
|
498
|
+
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
499
|
+
let result;
|
|
500
|
+
try {
|
|
501
|
+
result = arg0 instanceof Uint8Array;
|
|
502
|
+
} catch (_) {
|
|
503
|
+
result = false;
|
|
504
|
+
}
|
|
505
|
+
const ret = result;
|
|
506
|
+
return ret;
|
|
500
507
|
};
|
|
501
|
-
imports.wbg.
|
|
502
|
-
|
|
503
|
-
|
|
508
|
+
imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
|
|
509
|
+
let result;
|
|
510
|
+
try {
|
|
511
|
+
result = arg0 instanceof Window;
|
|
512
|
+
} catch (_) {
|
|
513
|
+
result = false;
|
|
514
|
+
}
|
|
515
|
+
const ret = result;
|
|
516
|
+
return ret;
|
|
504
517
|
};
|
|
505
|
-
imports.wbg.
|
|
506
|
-
const ret =
|
|
507
|
-
return
|
|
518
|
+
imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
519
|
+
const ret = Array.isArray(arg0);
|
|
520
|
+
return ret;
|
|
508
521
|
};
|
|
509
|
-
imports.wbg.
|
|
510
|
-
const ret =
|
|
511
|
-
return
|
|
522
|
+
imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
523
|
+
const ret = Number.isSafeInteger(arg0);
|
|
524
|
+
return ret;
|
|
512
525
|
};
|
|
513
|
-
imports.wbg.
|
|
514
|
-
const ret =
|
|
526
|
+
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
527
|
+
const ret = Symbol.iterator;
|
|
515
528
|
return ret;
|
|
516
529
|
};
|
|
517
|
-
imports.wbg.
|
|
518
|
-
const ret =
|
|
519
|
-
return
|
|
520
|
-
}, arguments) };
|
|
521
|
-
imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
|
|
522
|
-
const ret = getObject(arg0).msCrypto;
|
|
523
|
-
return addHeapObject(ret);
|
|
530
|
+
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
531
|
+
const ret = arg0.length;
|
|
532
|
+
return ret;
|
|
524
533
|
};
|
|
525
|
-
imports.wbg.
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {
|
|
529
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
530
|
-
}, arguments) };
|
|
531
|
-
imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
|
|
532
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
533
|
-
return addHeapObject(ret);
|
|
534
|
+
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
535
|
+
const ret = arg0.length;
|
|
536
|
+
return ret;
|
|
534
537
|
};
|
|
535
|
-
imports.wbg.
|
|
536
|
-
const ret =
|
|
538
|
+
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
539
|
+
const ret = arg0.msCrypto;
|
|
537
540
|
return ret;
|
|
538
541
|
};
|
|
539
|
-
imports.wbg.
|
|
542
|
+
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
540
543
|
const ret = new Array();
|
|
541
|
-
return
|
|
544
|
+
return ret;
|
|
542
545
|
};
|
|
543
|
-
imports.wbg.
|
|
544
|
-
const ret =
|
|
546
|
+
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
547
|
+
const ret = new Uint8Array(arg0);
|
|
545
548
|
return ret;
|
|
546
549
|
};
|
|
547
|
-
imports.wbg.
|
|
550
|
+
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
548
551
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
549
|
-
return addHeapObject(ret);
|
|
550
|
-
};
|
|
551
|
-
imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
|
|
552
|
-
const ret = getObject(arg0).next;
|
|
553
|
-
return addHeapObject(ret);
|
|
554
|
-
};
|
|
555
|
-
imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
|
|
556
|
-
const ret = getObject(arg0).next();
|
|
557
|
-
return addHeapObject(ret);
|
|
558
|
-
}, arguments) };
|
|
559
|
-
imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
|
|
560
|
-
const ret = getObject(arg0).done;
|
|
561
552
|
return ret;
|
|
562
553
|
};
|
|
563
|
-
imports.wbg.
|
|
564
|
-
const ret =
|
|
565
|
-
return
|
|
554
|
+
imports.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
|
|
555
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
556
|
+
return ret;
|
|
566
557
|
};
|
|
567
|
-
imports.wbg.
|
|
568
|
-
const ret =
|
|
569
|
-
return
|
|
558
|
+
imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
559
|
+
const ret = arg0.next;
|
|
560
|
+
return ret;
|
|
570
561
|
};
|
|
571
|
-
imports.wbg.
|
|
572
|
-
const ret =
|
|
573
|
-
return
|
|
574
|
-
}, arguments) };
|
|
575
|
-
imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
|
|
576
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
577
|
-
return addHeapObject(ret);
|
|
578
|
-
}, arguments) };
|
|
579
|
-
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
580
|
-
const ret = self.self;
|
|
581
|
-
return addHeapObject(ret);
|
|
582
|
-
}, arguments) };
|
|
583
|
-
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
|
|
584
|
-
const ret = window.window;
|
|
585
|
-
return addHeapObject(ret);
|
|
586
|
-
}, arguments) };
|
|
587
|
-
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
|
|
588
|
-
const ret = globalThis.globalThis;
|
|
589
|
-
return addHeapObject(ret);
|
|
590
|
-
}, arguments) };
|
|
591
|
-
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
|
|
592
|
-
const ret = global.global;
|
|
593
|
-
return addHeapObject(ret);
|
|
562
|
+
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
563
|
+
const ret = arg0.next();
|
|
564
|
+
return ret;
|
|
594
565
|
}, arguments) };
|
|
595
|
-
imports.wbg.
|
|
596
|
-
|
|
597
|
-
};
|
|
598
|
-
imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
|
|
599
|
-
const ret = Array.isArray(getObject(arg0));
|
|
566
|
+
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
567
|
+
const ret = arg0.node;
|
|
600
568
|
return ret;
|
|
601
569
|
};
|
|
602
|
-
imports.wbg.
|
|
603
|
-
|
|
604
|
-
try {
|
|
605
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
606
|
-
} catch (_) {
|
|
607
|
-
result = false;
|
|
608
|
-
}
|
|
609
|
-
const ret = result;
|
|
570
|
+
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
571
|
+
const ret = arg0.process;
|
|
610
572
|
return ret;
|
|
611
573
|
};
|
|
612
|
-
imports.wbg.
|
|
613
|
-
|
|
614
|
-
|
|
574
|
+
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
575
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
576
|
+
};
|
|
577
|
+
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
578
|
+
arg0.randomFillSync(arg1);
|
|
615
579
|
}, arguments) };
|
|
616
|
-
imports.wbg.
|
|
617
|
-
const ret =
|
|
580
|
+
imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
581
|
+
const ret = module.require;
|
|
618
582
|
return ret;
|
|
583
|
+
}, arguments) };
|
|
584
|
+
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
585
|
+
arg0[arg1 >>> 0] = arg2;
|
|
619
586
|
};
|
|
620
|
-
imports.wbg.
|
|
621
|
-
const ret =
|
|
622
|
-
return
|
|
587
|
+
imports.wbg.__wbg_startWorkers_2ca11761e08ff5d5 = function(arg0, arg1, arg2) {
|
|
588
|
+
const ret = startWorkers(arg0, arg1, wbg_rayon_PoolBuilder.__wrap(arg2));
|
|
589
|
+
return ret;
|
|
623
590
|
};
|
|
624
|
-
imports.wbg.
|
|
625
|
-
const ret =
|
|
626
|
-
return
|
|
591
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
592
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
593
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
627
594
|
};
|
|
628
|
-
imports.wbg.
|
|
629
|
-
const ret =
|
|
630
|
-
return
|
|
595
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
596
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
597
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
631
598
|
};
|
|
632
|
-
imports.wbg.
|
|
633
|
-
|
|
599
|
+
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
600
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
601
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
634
602
|
};
|
|
635
|
-
imports.wbg.
|
|
636
|
-
const ret =
|
|
637
|
-
return ret;
|
|
603
|
+
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
604
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
605
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
638
606
|
};
|
|
639
|
-
imports.wbg.
|
|
640
|
-
|
|
641
|
-
try {
|
|
642
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
643
|
-
} catch (_) {
|
|
644
|
-
result = false;
|
|
645
|
-
}
|
|
646
|
-
const ret = result;
|
|
607
|
+
imports.wbg.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
|
|
608
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
647
609
|
return ret;
|
|
648
610
|
};
|
|
649
|
-
imports.wbg.
|
|
650
|
-
const ret =
|
|
651
|
-
return
|
|
652
|
-
};
|
|
653
|
-
imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
|
|
654
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
655
|
-
return addHeapObject(ret);
|
|
611
|
+
imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
612
|
+
const ret = arg0.value;
|
|
613
|
+
return ret;
|
|
656
614
|
};
|
|
657
|
-
imports.wbg.
|
|
658
|
-
const
|
|
659
|
-
|
|
660
|
-
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
661
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
615
|
+
imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
616
|
+
const ret = arg0.versions;
|
|
617
|
+
return ret;
|
|
662
618
|
};
|
|
663
|
-
imports.wbg.
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
668
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
619
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
620
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
621
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
622
|
+
return ret;
|
|
669
623
|
};
|
|
670
|
-
imports.wbg.
|
|
671
|
-
|
|
624
|
+
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
625
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
626
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
627
|
+
return ret;
|
|
672
628
|
};
|
|
673
|
-
imports.wbg.
|
|
674
|
-
|
|
675
|
-
|
|
629
|
+
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
630
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
631
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
632
|
+
return ret;
|
|
676
633
|
};
|
|
677
|
-
imports.wbg.
|
|
678
|
-
|
|
679
|
-
|
|
634
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
635
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
636
|
+
const ret = arg0;
|
|
637
|
+
return ret;
|
|
680
638
|
};
|
|
681
|
-
imports.wbg.
|
|
682
|
-
const
|
|
683
|
-
|
|
639
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
640
|
+
const table = wasm.__wbindgen_externrefs;
|
|
641
|
+
const offset = table.grow(4);
|
|
642
|
+
table.set(0, undefined);
|
|
643
|
+
table.set(offset + 0, undefined);
|
|
644
|
+
table.set(offset + 1, null);
|
|
645
|
+
table.set(offset + 2, true);
|
|
646
|
+
table.set(offset + 3, false);
|
|
684
647
|
};
|
|
648
|
+
imports.wbg.memory = memory || new WebAssembly.Memory({initial:18,maximum:16384,shared:true});
|
|
685
649
|
|
|
686
650
|
return imports;
|
|
687
651
|
}
|
|
688
652
|
|
|
689
|
-
function
|
|
690
|
-
imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:18,maximum:16384,shared:true});
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
function __wbg_finalize_init(instance, module) {
|
|
653
|
+
function __wbg_finalize_init(instance, module, thread_stack_size) {
|
|
694
654
|
wasm = instance.exports;
|
|
695
655
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
cachedInt32Memory0 = null;
|
|
699
|
-
cachedUint8Memory0 = null;
|
|
656
|
+
cachedDataViewMemory0 = null;
|
|
657
|
+
cachedUint8ArrayMemory0 = null;
|
|
700
658
|
|
|
701
|
-
|
|
659
|
+
if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) { throw 'invalid stack size' }
|
|
660
|
+
wasm.__wbindgen_start(thread_stack_size);
|
|
702
661
|
return wasm;
|
|
703
662
|
}
|
|
704
663
|
|
|
705
|
-
function initSync(module,
|
|
664
|
+
function initSync(module, memory) {
|
|
706
665
|
if (wasm !== undefined) return wasm;
|
|
707
666
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
667
|
+
let thread_stack_size
|
|
668
|
+
if (typeof module !== 'undefined') {
|
|
669
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
670
|
+
({module, memory, thread_stack_size} = module)
|
|
671
|
+
} else {
|
|
672
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
673
|
+
}
|
|
674
|
+
}
|
|
711
675
|
|
|
676
|
+
const imports = __wbg_get_imports(memory);
|
|
712
677
|
if (!(module instanceof WebAssembly.Module)) {
|
|
713
678
|
module = new WebAssembly.Module(module);
|
|
714
679
|
}
|
|
715
|
-
|
|
716
680
|
const instance = new WebAssembly.Instance(module, imports);
|
|
717
|
-
|
|
718
|
-
return __wbg_finalize_init(instance, module);
|
|
681
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
719
682
|
}
|
|
720
683
|
|
|
721
|
-
async function __wbg_init(
|
|
684
|
+
async function __wbg_init(module_or_path, memory) {
|
|
722
685
|
if (wasm !== undefined) return wasm;
|
|
723
686
|
|
|
724
|
-
|
|
725
|
-
|
|
687
|
+
let thread_stack_size
|
|
688
|
+
if (typeof module_or_path !== 'undefined') {
|
|
689
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
690
|
+
({module_or_path, memory, thread_stack_size} = module_or_path)
|
|
691
|
+
} else {
|
|
692
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
693
|
+
}
|
|
726
694
|
}
|
|
727
|
-
const imports = __wbg_get_imports();
|
|
728
695
|
|
|
729
|
-
if (typeof
|
|
730
|
-
|
|
696
|
+
if (typeof module_or_path === 'undefined') {
|
|
697
|
+
module_or_path = new URL('wasm_bhtsne_bg.wasm', import.meta.url);
|
|
731
698
|
}
|
|
699
|
+
const imports = __wbg_get_imports(memory);
|
|
732
700
|
|
|
733
|
-
|
|
701
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
702
|
+
module_or_path = fetch(module_or_path);
|
|
703
|
+
}
|
|
734
704
|
|
|
735
|
-
const { instance, module } = await __wbg_load(await
|
|
705
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
736
706
|
|
|
737
|
-
return __wbg_finalize_init(instance, module);
|
|
707
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
738
708
|
}
|
|
739
709
|
|
|
740
|
-
export { initSync }
|
|
710
|
+
export { initSync };
|
|
741
711
|
export default __wbg_init;
|