@danielsimonjr/mathts-wasm 0.2.2 → 0.3.0
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/README.md +132 -132
- package/build/bindings/wasm-loader.d.ts +1 -1
- package/build/bindings/wasm-loader.d.ts.map +1 -1
- package/build/bindings/wasm-loader.js.map +1 -1
- package/build/mathts-debug.d.ts +6 -1
- package/build/mathts-debug.js +9 -6
- package/build/mathts-debug.wasm +0 -0
- package/build/mathts-debug.wasm.map +1 -1
- package/build/mathts-debug.wat +439 -396
- package/build/mathts.d.ts +6 -1
- package/build/mathts.js +9 -6
- package/build/mathts.wasm +0 -0
- package/build/mathts.wat +23332 -23417
- package/build/wasm-manifest.json +2 -2
- package/package.json +8 -8
- package/src/bindings/index.ts +9 -9
- package/src/bindings/wasm-loader.ts +382 -381
package/build/mathts.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ export declare function __pin(ptr: number): number;
|
|
|
6
6
|
export declare function __unpin(ptr: number): void;
|
|
7
7
|
export declare function __collect(): void;
|
|
8
8
|
export declare const __rtti_base: number;
|
|
9
|
+
/**
|
|
10
|
+
* src/heap/heap_reset
|
|
11
|
+
*/
|
|
12
|
+
export declare function heap_reset(): void;
|
|
9
13
|
/**
|
|
10
14
|
* src/types/complex/complex
|
|
11
15
|
* @param re `f64`
|
|
@@ -921,9 +925,10 @@ export declare function matrix_lu_decompose(a: Float64Array, n: number, l_out: F
|
|
|
921
925
|
* @param n `i32`
|
|
922
926
|
* @param q_out `~lib/typedarray/Float64Array`
|
|
923
927
|
* @param r_out `~lib/typedarray/Float64Array`
|
|
928
|
+
* @param v_work `~lib/typedarray/Float64Array | null`
|
|
924
929
|
* @returns `i32`
|
|
925
930
|
*/
|
|
926
|
-
export declare function matrix_qr_decompose(a: Float64Array, m: number, n: number, q_out: Float64Array, r_out: Float64Array): number;
|
|
931
|
+
export declare function matrix_qr_decompose(a: Float64Array, m: number, n: number, q_out: Float64Array, r_out: Float64Array, v_work: Float64Array | null): number;
|
|
927
932
|
/**
|
|
928
933
|
* src/algebra/decomposition/matrix_cholesky
|
|
929
934
|
* @param a `~lib/typedarray/Float64Array`
|
package/build/mathts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
async function instantiate(module, imports = {}) {
|
|
2
2
|
const adaptedImports = {
|
|
3
|
-
env: Object.
|
|
3
|
+
env: Object.setPrototypeOf({
|
|
4
4
|
abort(message, fileName, lineNumber, columnNumber) {
|
|
5
5
|
// ~lib/builtins/abort(~lib/string/String | null?, ~lib/string/String | null?, u32?, u32?) => void
|
|
6
6
|
message = __liftString(message >>> 0);
|
|
@@ -12,7 +12,7 @@ async function instantiate(module, imports = {}) {
|
|
|
12
12
|
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
|
|
13
13
|
})();
|
|
14
14
|
},
|
|
15
|
-
}),
|
|
15
|
+
}, Object.assign(Object.create(globalThis), imports.env || {})),
|
|
16
16
|
};
|
|
17
17
|
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
|
|
18
18
|
const memory = exports.memory || imports.env.memory;
|
|
@@ -677,16 +677,18 @@ async function instantiate(module, imports = {}) {
|
|
|
677
677
|
__release(u_out);
|
|
678
678
|
}
|
|
679
679
|
},
|
|
680
|
-
matrix_qr_decompose(a, m, n, q_out, r_out) {
|
|
681
|
-
// src/algebra/decomposition/matrix_qr_decompose(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => i32
|
|
680
|
+
matrix_qr_decompose(a, m, n, q_out, r_out, v_work) {
|
|
681
|
+
// src/algebra/decomposition/matrix_qr_decompose(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array | null) => i32
|
|
682
682
|
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
683
683
|
q_out = __retain(__lowerTypedArray(Float64Array, 5, 3, q_out) || __notnull());
|
|
684
|
-
r_out = __lowerTypedArray(Float64Array, 5, 3, r_out) || __notnull();
|
|
684
|
+
r_out = __retain(__lowerTypedArray(Float64Array, 5, 3, r_out) || __notnull());
|
|
685
|
+
v_work = __lowerTypedArray(Float64Array, 5, 3, v_work);
|
|
685
686
|
try {
|
|
686
|
-
return exports.matrix_qr_decompose(a, m, n, q_out, r_out);
|
|
687
|
+
return exports.matrix_qr_decompose(a, m, n, q_out, r_out, v_work);
|
|
687
688
|
} finally {
|
|
688
689
|
__release(a);
|
|
689
690
|
__release(q_out);
|
|
691
|
+
__release(r_out);
|
|
690
692
|
}
|
|
691
693
|
},
|
|
692
694
|
matrix_cholesky(a, n, l_out) {
|
|
@@ -1904,6 +1906,7 @@ export const {
|
|
|
1904
1906
|
__unpin,
|
|
1905
1907
|
__collect,
|
|
1906
1908
|
__rtti_base,
|
|
1909
|
+
heap_reset,
|
|
1907
1910
|
complex,
|
|
1908
1911
|
complexFromPolar,
|
|
1909
1912
|
add_f64,
|
package/build/mathts.wasm
CHANGED
|
Binary file
|