@danielsimonjr/mathts-wasm 0.4.0 → 0.5.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 +70 -0
- package/build/mathts-debug.d.ts +25 -0
- package/build/mathts-debug.js +575 -521
- package/build/mathts-debug.js.map +1 -1
- package/build/mathts-debug.wasm +0 -0
- package/build/mathts-debug.wasm.map +1 -1
- package/build/mathts-debug.wat +1255 -482
- package/build/mathts.d.ts +25 -0
- package/build/mathts.js +244 -198
- package/build/mathts.js.map +1 -1
- package/build/mathts.wasm +0 -0
- package/build/mathts.wat +1247 -633
- package/build/wasm-manifest.json +2 -2
- package/package.json +12 -5
package/build/mathts-debug.js
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
async function instantiate(module, imports = {}) {
|
|
2
|
-
const
|
|
3
|
-
env: Object.setPrototypeOf({
|
|
4
|
-
abort(message, fileName, lineNumber, columnNumber) {
|
|
5
|
-
// ~lib/builtins/abort(~lib/string/String | null?, ~lib/string/String | null?, u32?, u32?) => void
|
|
6
|
-
message = __liftString(message >>> 0);
|
|
7
|
-
fileName = __liftString(fileName >>> 0);
|
|
8
|
-
lineNumber = lineNumber >>> 0;
|
|
9
|
-
columnNumber = columnNumber >>> 0;
|
|
10
|
-
(() => {
|
|
11
|
-
// @external.js
|
|
12
|
-
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
|
|
13
|
-
})();
|
|
14
|
-
},
|
|
15
|
-
}, Object.assign(Object.create(globalThis), imports.env || {})),
|
|
16
|
-
};
|
|
17
|
-
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
|
|
2
|
+
const { exports } = await WebAssembly.instantiate(module, imports);
|
|
18
3
|
const memory = exports.memory || imports.env.memory;
|
|
19
4
|
const adaptedExports = Object.setPrototypeOf({
|
|
5
|
+
abort_take() {
|
|
6
|
+
// src/abort/abort_take() => bool
|
|
7
|
+
return exports.abort_take() != 0;
|
|
8
|
+
},
|
|
9
|
+
abort_message() {
|
|
10
|
+
// src/abort/abort_message() => usize
|
|
11
|
+
return exports.abort_message() >>> 0;
|
|
12
|
+
},
|
|
13
|
+
abort_file() {
|
|
14
|
+
// src/abort/abort_file() => usize
|
|
15
|
+
return exports.abort_file() >>> 0;
|
|
16
|
+
},
|
|
17
|
+
abort_line() {
|
|
18
|
+
// src/abort/abort_line() => u32
|
|
19
|
+
return exports.abort_line() >>> 0;
|
|
20
|
+
},
|
|
21
|
+
abort_column() {
|
|
22
|
+
// src/abort/abort_column() => u32
|
|
23
|
+
return exports.abort_column() >>> 0;
|
|
24
|
+
},
|
|
20
25
|
complex(re, im) {
|
|
21
26
|
// src/types/complex/complex(f64, f64) => src/types/complex/Complex
|
|
22
27
|
return __liftInternref(exports.complex(re, im) >>> 0);
|
|
@@ -35,81 +40,81 @@ async function instantiate(module, imports = {}) {
|
|
|
35
40
|
},
|
|
36
41
|
array_sum(data) {
|
|
37
42
|
// src/ops/array/array_sum(~lib/typedarray/Float64Array) => f64
|
|
38
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
39
|
-
return exports.array_sum(data);
|
|
43
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
44
|
+
return __writeBack(exports.array_sum(data), "array_sum");
|
|
40
45
|
},
|
|
41
46
|
array_product(data) {
|
|
42
47
|
// src/ops/array/array_product(~lib/typedarray/Float64Array) => f64
|
|
43
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
44
|
-
return exports.array_product(data);
|
|
48
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
49
|
+
return __writeBack(exports.array_product(data), "array_product");
|
|
45
50
|
},
|
|
46
51
|
array_mean(data) {
|
|
47
52
|
// src/ops/array/array_mean(~lib/typedarray/Float64Array) => f64
|
|
48
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
49
|
-
return exports.array_mean(data);
|
|
53
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
54
|
+
return __writeBack(exports.array_mean(data), "array_mean");
|
|
50
55
|
},
|
|
51
56
|
array_variance(data) {
|
|
52
57
|
// src/ops/array/array_variance(~lib/typedarray/Float64Array) => f64
|
|
53
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
54
|
-
return exports.array_variance(data);
|
|
58
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
59
|
+
return __writeBack(exports.array_variance(data), "array_variance");
|
|
55
60
|
},
|
|
56
61
|
array_stddev(data) {
|
|
57
62
|
// src/ops/array/array_stddev(~lib/typedarray/Float64Array) => f64
|
|
58
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
59
|
-
return exports.array_stddev(data);
|
|
63
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
64
|
+
return __writeBack(exports.array_stddev(data), "array_stddev");
|
|
60
65
|
},
|
|
61
66
|
array_min(data) {
|
|
62
67
|
// src/ops/array/array_min(~lib/typedarray/Float64Array) => f64
|
|
63
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
64
|
-
return exports.array_min(data);
|
|
68
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
69
|
+
return __writeBack(exports.array_min(data), "array_min");
|
|
65
70
|
},
|
|
66
71
|
array_max(data) {
|
|
67
72
|
// src/ops/array/array_max(~lib/typedarray/Float64Array) => f64
|
|
68
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
69
|
-
return exports.array_max(data);
|
|
73
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
74
|
+
return __writeBack(exports.array_max(data), "array_max");
|
|
70
75
|
},
|
|
71
76
|
array_argmin(data) {
|
|
72
77
|
// src/ops/array/array_argmin(~lib/typedarray/Float64Array) => i32
|
|
73
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
74
|
-
return exports.array_argmin(data);
|
|
78
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
79
|
+
return __writeBack(exports.array_argmin(data), "array_argmin");
|
|
75
80
|
},
|
|
76
81
|
array_argmax(data) {
|
|
77
82
|
// src/ops/array/array_argmax(~lib/typedarray/Float64Array) => i32
|
|
78
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
79
|
-
return exports.array_argmax(data);
|
|
83
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
84
|
+
return __writeBack(exports.array_argmax(data), "array_argmax");
|
|
80
85
|
},
|
|
81
86
|
array_norm(data) {
|
|
82
87
|
// src/ops/array/array_norm(~lib/typedarray/Float64Array) => f64
|
|
83
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
84
|
-
return exports.array_norm(data);
|
|
88
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
89
|
+
return __writeBack(exports.array_norm(data), "array_norm");
|
|
85
90
|
},
|
|
86
91
|
array_norm_l1(data) {
|
|
87
92
|
// src/ops/array/array_norm_l1(~lib/typedarray/Float64Array) => f64
|
|
88
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
89
|
-
return exports.array_norm_l1(data);
|
|
93
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
94
|
+
return __writeBack(exports.array_norm_l1(data), "array_norm_l1");
|
|
90
95
|
},
|
|
91
96
|
array_norm_linf(data) {
|
|
92
97
|
// src/ops/array/array_norm_linf(~lib/typedarray/Float64Array) => f64
|
|
93
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
94
|
-
return exports.array_norm_linf(data);
|
|
98
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
99
|
+
return __writeBack(exports.array_norm_linf(data), "array_norm_linf");
|
|
95
100
|
},
|
|
96
101
|
array_dot(a, b) {
|
|
97
102
|
// src/ops/array/array_dot(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => f64
|
|
98
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
99
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
103
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
104
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
100
105
|
try {
|
|
101
|
-
return exports.array_dot(a, b);
|
|
106
|
+
return __writeBack(exports.array_dot(a, b), "array_dot");
|
|
102
107
|
} finally {
|
|
103
108
|
__release(a);
|
|
104
109
|
}
|
|
105
110
|
},
|
|
106
111
|
array_add(a, b, result) {
|
|
107
112
|
// src/ops/array/array_add(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
108
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
109
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
110
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
113
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
114
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
115
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
111
116
|
try {
|
|
112
|
-
exports.array_add(a, b, result);
|
|
117
|
+
__writeBack(exports.array_add(a, b, result), "array_add");
|
|
113
118
|
} finally {
|
|
114
119
|
__release(a);
|
|
115
120
|
__release(b);
|
|
@@ -117,11 +122,11 @@ async function instantiate(module, imports = {}) {
|
|
|
117
122
|
},
|
|
118
123
|
array_sub(a, b, result) {
|
|
119
124
|
// src/ops/array/array_sub(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
120
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
121
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
122
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
125
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
126
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
127
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
123
128
|
try {
|
|
124
|
-
exports.array_sub(a, b, result);
|
|
129
|
+
__writeBack(exports.array_sub(a, b, result), "array_sub");
|
|
125
130
|
} finally {
|
|
126
131
|
__release(a);
|
|
127
132
|
__release(b);
|
|
@@ -129,11 +134,11 @@ async function instantiate(module, imports = {}) {
|
|
|
129
134
|
},
|
|
130
135
|
array_mul(a, b, result) {
|
|
131
136
|
// src/ops/array/array_mul(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
132
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
133
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
134
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
137
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
138
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
139
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
135
140
|
try {
|
|
136
|
-
exports.array_mul(a, b, result);
|
|
141
|
+
__writeBack(exports.array_mul(a, b, result), "array_mul");
|
|
137
142
|
} finally {
|
|
138
143
|
__release(a);
|
|
139
144
|
__release(b);
|
|
@@ -141,11 +146,11 @@ async function instantiate(module, imports = {}) {
|
|
|
141
146
|
},
|
|
142
147
|
array_div(a, b, result) {
|
|
143
148
|
// src/ops/array/array_div(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
144
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
145
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
146
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
149
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
150
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
151
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
147
152
|
try {
|
|
148
|
-
exports.array_div(a, b, result);
|
|
153
|
+
__writeBack(exports.array_div(a, b, result), "array_div");
|
|
149
154
|
} finally {
|
|
150
155
|
__release(a);
|
|
151
156
|
__release(b);
|
|
@@ -153,111 +158,111 @@ async function instantiate(module, imports = {}) {
|
|
|
153
158
|
},
|
|
154
159
|
array_scale(a, scalar, result) {
|
|
155
160
|
// src/ops/array/array_scale(~lib/typedarray/Float64Array, f64, ~lib/typedarray/Float64Array) => void
|
|
156
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
157
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
161
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
162
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
158
163
|
try {
|
|
159
|
-
exports.array_scale(a, scalar, result);
|
|
164
|
+
__writeBack(exports.array_scale(a, scalar, result), "array_scale");
|
|
160
165
|
} finally {
|
|
161
166
|
__release(a);
|
|
162
167
|
}
|
|
163
168
|
},
|
|
164
169
|
array_add_scalar(a, scalar, result) {
|
|
165
170
|
// src/ops/array/array_add_scalar(~lib/typedarray/Float64Array, f64, ~lib/typedarray/Float64Array) => void
|
|
166
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
167
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
171
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
172
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
168
173
|
try {
|
|
169
|
-
exports.array_add_scalar(a, scalar, result);
|
|
174
|
+
__writeBack(exports.array_add_scalar(a, scalar, result), "array_add_scalar");
|
|
170
175
|
} finally {
|
|
171
176
|
__release(a);
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
array_neg(a, result) {
|
|
175
180
|
// src/ops/array/array_neg(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
176
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
177
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
181
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
182
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
178
183
|
try {
|
|
179
|
-
exports.array_neg(a, result);
|
|
184
|
+
__writeBack(exports.array_neg(a, result), "array_neg");
|
|
180
185
|
} finally {
|
|
181
186
|
__release(a);
|
|
182
187
|
}
|
|
183
188
|
},
|
|
184
189
|
array_abs(a, result) {
|
|
185
190
|
// src/ops/array/array_abs(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
186
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
187
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
191
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
192
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
188
193
|
try {
|
|
189
|
-
exports.array_abs(a, result);
|
|
194
|
+
__writeBack(exports.array_abs(a, result), "array_abs");
|
|
190
195
|
} finally {
|
|
191
196
|
__release(a);
|
|
192
197
|
}
|
|
193
198
|
},
|
|
194
199
|
array_sqrt(a, result) {
|
|
195
200
|
// src/ops/array/array_sqrt(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
196
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
197
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
201
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
202
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
198
203
|
try {
|
|
199
|
-
exports.array_sqrt(a, result);
|
|
204
|
+
__writeBack(exports.array_sqrt(a, result), "array_sqrt");
|
|
200
205
|
} finally {
|
|
201
206
|
__release(a);
|
|
202
207
|
}
|
|
203
208
|
},
|
|
204
209
|
array_square(a, result) {
|
|
205
210
|
// src/ops/array/array_square(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
206
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
207
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
211
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
212
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
208
213
|
try {
|
|
209
|
-
exports.array_square(a, result);
|
|
214
|
+
__writeBack(exports.array_square(a, result), "array_square");
|
|
210
215
|
} finally {
|
|
211
216
|
__release(a);
|
|
212
217
|
}
|
|
213
218
|
},
|
|
214
219
|
array_exp(a, result) {
|
|
215
220
|
// src/ops/array/array_exp(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
216
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
217
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
221
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
222
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
218
223
|
try {
|
|
219
|
-
exports.array_exp(a, result);
|
|
224
|
+
__writeBack(exports.array_exp(a, result), "array_exp");
|
|
220
225
|
} finally {
|
|
221
226
|
__release(a);
|
|
222
227
|
}
|
|
223
228
|
},
|
|
224
229
|
array_log(a, result) {
|
|
225
230
|
// src/ops/array/array_log(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
226
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
227
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
231
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
232
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
228
233
|
try {
|
|
229
|
-
exports.array_log(a, result);
|
|
234
|
+
__writeBack(exports.array_log(a, result), "array_log");
|
|
230
235
|
} finally {
|
|
231
236
|
__release(a);
|
|
232
237
|
}
|
|
233
238
|
},
|
|
234
239
|
array_sin(a, result) {
|
|
235
240
|
// src/ops/array/array_sin(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
236
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
237
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
241
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
242
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
238
243
|
try {
|
|
239
|
-
exports.array_sin(a, result);
|
|
244
|
+
__writeBack(exports.array_sin(a, result), "array_sin");
|
|
240
245
|
} finally {
|
|
241
246
|
__release(a);
|
|
242
247
|
}
|
|
243
248
|
},
|
|
244
249
|
array_cos(a, result) {
|
|
245
250
|
// src/ops/array/array_cos(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
246
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
247
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
251
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
252
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
248
253
|
try {
|
|
249
|
-
exports.array_cos(a, result);
|
|
254
|
+
__writeBack(exports.array_cos(a, result), "array_cos");
|
|
250
255
|
} finally {
|
|
251
256
|
__release(a);
|
|
252
257
|
}
|
|
253
258
|
},
|
|
254
259
|
array_axpby(alpha, a, beta, b, result) {
|
|
255
260
|
// src/ops/array/array_axpby(f64, ~lib/typedarray/Float64Array, f64, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
256
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
257
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
258
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
261
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
262
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
263
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
259
264
|
try {
|
|
260
|
-
exports.array_axpby(alpha, a, beta, b, result);
|
|
265
|
+
__writeBack(exports.array_axpby(alpha, a, beta, b, result), "array_axpby");
|
|
261
266
|
} finally {
|
|
262
267
|
__release(a);
|
|
263
268
|
__release(b);
|
|
@@ -265,60 +270,60 @@ async function instantiate(module, imports = {}) {
|
|
|
265
270
|
},
|
|
266
271
|
array_distance(a, b) {
|
|
267
272
|
// src/ops/array/array_distance(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => f64
|
|
268
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
269
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
273
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
274
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
270
275
|
try {
|
|
271
|
-
return exports.array_distance(a, b);
|
|
276
|
+
return __writeBack(exports.array_distance(a, b), "array_distance");
|
|
272
277
|
} finally {
|
|
273
278
|
__release(a);
|
|
274
279
|
}
|
|
275
280
|
},
|
|
276
281
|
array_cosine_similarity(a, b) {
|
|
277
282
|
// src/ops/array/array_cosine_similarity(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => f64
|
|
278
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
279
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
283
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
284
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
280
285
|
try {
|
|
281
|
-
return exports.array_cosine_similarity(a, b);
|
|
286
|
+
return __writeBack(exports.array_cosine_similarity(a, b), "array_cosine_similarity");
|
|
282
287
|
} finally {
|
|
283
288
|
__release(a);
|
|
284
289
|
}
|
|
285
290
|
},
|
|
286
291
|
array_scale_inplace(a, scalar) {
|
|
287
292
|
// src/ops/array/array_scale_inplace(~lib/typedarray/Float64Array, f64) => void
|
|
288
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
289
|
-
exports.array_scale_inplace(a, scalar);
|
|
293
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull();
|
|
294
|
+
__writeBack(exports.array_scale_inplace(a, scalar), "array_scale_inplace");
|
|
290
295
|
},
|
|
291
296
|
array_add_scalar_inplace(a, scalar) {
|
|
292
297
|
// src/ops/array/array_add_scalar_inplace(~lib/typedarray/Float64Array, f64) => void
|
|
293
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
294
|
-
exports.array_add_scalar_inplace(a, scalar);
|
|
298
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull();
|
|
299
|
+
__writeBack(exports.array_add_scalar_inplace(a, scalar), "array_add_scalar_inplace");
|
|
295
300
|
},
|
|
296
301
|
array_add_inplace(a, b) {
|
|
297
302
|
// src/ops/array/array_add_inplace(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
298
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
299
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
303
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull());
|
|
304
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
300
305
|
try {
|
|
301
|
-
exports.array_add_inplace(a, b);
|
|
306
|
+
__writeBack(exports.array_add_inplace(a, b), "array_add_inplace");
|
|
302
307
|
} finally {
|
|
303
308
|
__release(a);
|
|
304
309
|
}
|
|
305
310
|
},
|
|
306
311
|
array_clamp_inplace(a, lo, hi) {
|
|
307
312
|
// src/ops/array/array_clamp_inplace(~lib/typedarray/Float64Array, f64, f64) => void
|
|
308
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
309
|
-
exports.array_clamp_inplace(a, lo, hi);
|
|
313
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull();
|
|
314
|
+
__writeBack(exports.array_clamp_inplace(a, lo, hi), "array_clamp_inplace");
|
|
310
315
|
},
|
|
311
316
|
array_fill(a, value) {
|
|
312
317
|
// src/ops/array/array_fill(~lib/typedarray/Float64Array, f64) => void
|
|
313
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
314
|
-
exports.array_fill(a, value);
|
|
318
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull();
|
|
319
|
+
__writeBack(exports.array_fill(a, value), "array_fill");
|
|
315
320
|
},
|
|
316
321
|
array_copy(src, dst) {
|
|
317
322
|
// src/ops/array/array_copy(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
318
|
-
src = __retain(__lowerTypedArray(Float64Array, 5, 3, src) || __notnull());
|
|
319
|
-
dst = __lowerTypedArray(Float64Array, 5, 3, dst) || __notnull();
|
|
323
|
+
src = __retain(__lowerTypedArray(Float64Array, 5, 3, src, 6, "src") || __notnull());
|
|
324
|
+
dst = __lowerTypedArray(Float64Array, 5, 3, dst, 1) || __notnull();
|
|
320
325
|
try {
|
|
321
|
-
exports.array_copy(src, dst);
|
|
326
|
+
__writeBack(exports.array_copy(src, dst), "array_copy");
|
|
322
327
|
} finally {
|
|
323
328
|
__release(src);
|
|
324
329
|
}
|
|
@@ -341,41 +346,41 @@ async function instantiate(module, imports = {}) {
|
|
|
341
346
|
},
|
|
342
347
|
matrix_diag(values) {
|
|
343
348
|
// src/ops/matrix/matrix_diag(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
344
|
-
values = __lowerTypedArray(Float64Array, 5, 3, values) || __notnull();
|
|
345
|
-
return __liftTypedArray(Float64Array, exports.matrix_diag(values) >>> 0);
|
|
349
|
+
values = __lowerTypedArray(Float64Array, 5, 3, values, 6, "values") || __notnull();
|
|
350
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.matrix_diag(values), "matrix_diag") >>> 0);
|
|
346
351
|
},
|
|
347
352
|
matrix_get(data, cols, row, col) {
|
|
348
353
|
// src/ops/matrix/matrix_get(~lib/typedarray/Float64Array, i32, i32, i32) => f64
|
|
349
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
350
|
-
return exports.matrix_get(data, cols, row, col);
|
|
354
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
355
|
+
return __writeBack(exports.matrix_get(data, cols, row, col), "matrix_get");
|
|
351
356
|
},
|
|
352
357
|
matrix_set(data, cols, row, col, value) {
|
|
353
358
|
// src/ops/matrix/matrix_set(~lib/typedarray/Float64Array, i32, i32, i32, f64) => void
|
|
354
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
355
|
-
exports.matrix_set(data, cols, row, col, value);
|
|
359
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 5) || __notnull();
|
|
360
|
+
__writeBack(exports.matrix_set(data, cols, row, col, value), "matrix_set");
|
|
356
361
|
},
|
|
357
362
|
matrix_get_row(data, cols, row) {
|
|
358
363
|
// src/ops/matrix/matrix_get_row(~lib/typedarray/Float64Array, i32, i32) => ~lib/typedarray/Float64Array
|
|
359
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
360
|
-
return __liftTypedArray(Float64Array, exports.matrix_get_row(data, cols, row) >>> 0);
|
|
364
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
365
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.matrix_get_row(data, cols, row), "matrix_get_row") >>> 0);
|
|
361
366
|
},
|
|
362
367
|
matrix_get_col(data, rows, cols, col) {
|
|
363
368
|
// src/ops/matrix/matrix_get_col(~lib/typedarray/Float64Array, i32, i32, i32) => ~lib/typedarray/Float64Array
|
|
364
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
365
|
-
return __liftTypedArray(Float64Array, exports.matrix_get_col(data, rows, cols, col) >>> 0);
|
|
369
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
370
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.matrix_get_col(data, rows, cols, col), "matrix_get_col") >>> 0);
|
|
366
371
|
},
|
|
367
372
|
matrix_get_diag(data, rows, cols) {
|
|
368
373
|
// src/ops/matrix/matrix_get_diag(~lib/typedarray/Float64Array, i32, i32) => ~lib/typedarray/Float64Array
|
|
369
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
370
|
-
return __liftTypedArray(Float64Array, exports.matrix_get_diag(data, rows, cols) >>> 0);
|
|
374
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
375
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.matrix_get_diag(data, rows, cols), "matrix_get_diag") >>> 0);
|
|
371
376
|
},
|
|
372
377
|
matrix_add(a, b, result) {
|
|
373
378
|
// src/ops/matrix/matrix_add(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
374
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
375
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
376
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
379
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
380
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
381
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
377
382
|
try {
|
|
378
|
-
exports.matrix_add(a, b, result);
|
|
383
|
+
__writeBack(exports.matrix_add(a, b, result), "matrix_add");
|
|
379
384
|
} finally {
|
|
380
385
|
__release(a);
|
|
381
386
|
__release(b);
|
|
@@ -383,11 +388,11 @@ async function instantiate(module, imports = {}) {
|
|
|
383
388
|
},
|
|
384
389
|
matrix_sub(a, b, result) {
|
|
385
390
|
// src/ops/matrix/matrix_sub(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
386
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
387
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
388
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
391
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
392
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
393
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
389
394
|
try {
|
|
390
|
-
exports.matrix_sub(a, b, result);
|
|
395
|
+
__writeBack(exports.matrix_sub(a, b, result), "matrix_sub");
|
|
391
396
|
} finally {
|
|
392
397
|
__release(a);
|
|
393
398
|
__release(b);
|
|
@@ -395,11 +400,11 @@ async function instantiate(module, imports = {}) {
|
|
|
395
400
|
},
|
|
396
401
|
matrix_mul_elementwise(a, b, result) {
|
|
397
402
|
// src/ops/matrix/matrix_mul_elementwise(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
398
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
399
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
400
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
403
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
404
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
405
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
401
406
|
try {
|
|
402
|
-
exports.matrix_mul_elementwise(a, b, result);
|
|
407
|
+
__writeBack(exports.matrix_mul_elementwise(a, b, result), "matrix_mul_elementwise");
|
|
403
408
|
} finally {
|
|
404
409
|
__release(a);
|
|
405
410
|
__release(b);
|
|
@@ -407,11 +412,11 @@ async function instantiate(module, imports = {}) {
|
|
|
407
412
|
},
|
|
408
413
|
matrix_div_elementwise(a, b, result) {
|
|
409
414
|
// src/ops/matrix/matrix_div_elementwise(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
410
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
411
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
412
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
415
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
416
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
417
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
413
418
|
try {
|
|
414
|
-
exports.matrix_div_elementwise(a, b, result);
|
|
419
|
+
__writeBack(exports.matrix_div_elementwise(a, b, result), "matrix_div_elementwise");
|
|
415
420
|
} finally {
|
|
416
421
|
__release(a);
|
|
417
422
|
__release(b);
|
|
@@ -419,41 +424,41 @@ async function instantiate(module, imports = {}) {
|
|
|
419
424
|
},
|
|
420
425
|
matrix_scale(a, scalar, result) {
|
|
421
426
|
// src/ops/matrix/matrix_scale(~lib/typedarray/Float64Array, f64, ~lib/typedarray/Float64Array) => void
|
|
422
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
423
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
427
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
428
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
424
429
|
try {
|
|
425
|
-
exports.matrix_scale(a, scalar, result);
|
|
430
|
+
__writeBack(exports.matrix_scale(a, scalar, result), "matrix_scale");
|
|
426
431
|
} finally {
|
|
427
432
|
__release(a);
|
|
428
433
|
}
|
|
429
434
|
},
|
|
430
435
|
matrix_add_scalar(a, scalar, result) {
|
|
431
436
|
// src/ops/matrix/matrix_add_scalar(~lib/typedarray/Float64Array, f64, ~lib/typedarray/Float64Array) => void
|
|
432
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
433
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
437
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
438
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
434
439
|
try {
|
|
435
|
-
exports.matrix_add_scalar(a, scalar, result);
|
|
440
|
+
__writeBack(exports.matrix_add_scalar(a, scalar, result), "matrix_add_scalar");
|
|
436
441
|
} finally {
|
|
437
442
|
__release(a);
|
|
438
443
|
}
|
|
439
444
|
},
|
|
440
445
|
matrix_neg(a, result) {
|
|
441
446
|
// src/ops/matrix/matrix_neg(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
442
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
443
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
447
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
448
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
444
449
|
try {
|
|
445
|
-
exports.matrix_neg(a, result);
|
|
450
|
+
__writeBack(exports.matrix_neg(a, result), "matrix_neg");
|
|
446
451
|
} finally {
|
|
447
452
|
__release(a);
|
|
448
453
|
}
|
|
449
454
|
},
|
|
450
455
|
matrix_multiply(a, aRows, aCols, b, bCols, result) {
|
|
451
456
|
// src/ops/matrix/matrix_multiply(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array) => void
|
|
452
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
453
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
454
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
457
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
458
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
459
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
455
460
|
try {
|
|
456
|
-
exports.matrix_multiply(a, aRows, aCols, b, bCols, result);
|
|
461
|
+
__writeBack(exports.matrix_multiply(a, aRows, aCols, b, bCols, result), "matrix_multiply");
|
|
457
462
|
} finally {
|
|
458
463
|
__release(a);
|
|
459
464
|
__release(b);
|
|
@@ -461,11 +466,11 @@ async function instantiate(module, imports = {}) {
|
|
|
461
466
|
},
|
|
462
467
|
matrix_vector_multiply(a, rows, cols, x, result) {
|
|
463
468
|
// src/ops/matrix/matrix_vector_multiply(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
464
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
465
|
-
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x) || __notnull());
|
|
466
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
469
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
470
|
+
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x, 2, "x") || __notnull());
|
|
471
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
467
472
|
try {
|
|
468
|
-
exports.matrix_vector_multiply(a, rows, cols, x, result);
|
|
473
|
+
__writeBack(exports.matrix_vector_multiply(a, rows, cols, x, result), "matrix_vector_multiply");
|
|
469
474
|
} finally {
|
|
470
475
|
__release(a);
|
|
471
476
|
__release(x);
|
|
@@ -473,11 +478,11 @@ async function instantiate(module, imports = {}) {
|
|
|
473
478
|
},
|
|
474
479
|
vector_matrix_multiply(x, a, rows, cols, result) {
|
|
475
480
|
// src/ops/matrix/vector_matrix_multiply(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array) => void
|
|
476
|
-
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x) || __notnull());
|
|
477
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
478
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
481
|
+
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x, 6, "x") || __notnull());
|
|
482
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 2, "a") || __notnull());
|
|
483
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
479
484
|
try {
|
|
480
|
-
exports.vector_matrix_multiply(x, a, rows, cols, result);
|
|
485
|
+
__writeBack(exports.vector_matrix_multiply(x, a, rows, cols, result), "vector_matrix_multiply");
|
|
481
486
|
} finally {
|
|
482
487
|
__release(x);
|
|
483
488
|
__release(a);
|
|
@@ -485,11 +490,11 @@ async function instantiate(module, imports = {}) {
|
|
|
485
490
|
},
|
|
486
491
|
matrix_outer(x, y, result) {
|
|
487
492
|
// src/ops/matrix/matrix_outer(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
488
|
-
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x) || __notnull());
|
|
489
|
-
y = __retain(__lowerTypedArray(Float64Array, 5, 3, y) || __notnull());
|
|
490
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
493
|
+
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x, 6, "x") || __notnull());
|
|
494
|
+
y = __retain(__lowerTypedArray(Float64Array, 5, 3, y, 2, "y") || __notnull());
|
|
495
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
491
496
|
try {
|
|
492
|
-
exports.matrix_outer(x, y, result);
|
|
497
|
+
__writeBack(exports.matrix_outer(x, y, result), "matrix_outer");
|
|
493
498
|
} finally {
|
|
494
499
|
__release(x);
|
|
495
500
|
__release(y);
|
|
@@ -497,60 +502,60 @@ async function instantiate(module, imports = {}) {
|
|
|
497
502
|
},
|
|
498
503
|
matrix_transpose(a, rows, cols, result) {
|
|
499
504
|
// src/ops/matrix/matrix_transpose(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array) => void
|
|
500
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
501
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
505
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
506
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
502
507
|
try {
|
|
503
|
-
exports.matrix_transpose(a, rows, cols, result);
|
|
508
|
+
__writeBack(exports.matrix_transpose(a, rows, cols, result), "matrix_transpose");
|
|
504
509
|
} finally {
|
|
505
510
|
__release(a);
|
|
506
511
|
}
|
|
507
512
|
},
|
|
508
513
|
matrix_sum(data) {
|
|
509
514
|
// src/ops/matrix/matrix_sum(~lib/typedarray/Float64Array) => f64
|
|
510
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
511
|
-
return exports.matrix_sum(data);
|
|
515
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
516
|
+
return __writeBack(exports.matrix_sum(data), "matrix_sum");
|
|
512
517
|
},
|
|
513
518
|
matrix_mean(data) {
|
|
514
519
|
// src/ops/matrix/matrix_mean(~lib/typedarray/Float64Array) => f64
|
|
515
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
516
|
-
return exports.matrix_mean(data);
|
|
520
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
521
|
+
return __writeBack(exports.matrix_mean(data), "matrix_mean");
|
|
517
522
|
},
|
|
518
523
|
matrix_min(data) {
|
|
519
524
|
// src/ops/matrix/matrix_min(~lib/typedarray/Float64Array) => f64
|
|
520
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
521
|
-
return exports.matrix_min(data);
|
|
525
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
526
|
+
return __writeBack(exports.matrix_min(data), "matrix_min");
|
|
522
527
|
},
|
|
523
528
|
matrix_max(data) {
|
|
524
529
|
// src/ops/matrix/matrix_max(~lib/typedarray/Float64Array) => f64
|
|
525
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
526
|
-
return exports.matrix_max(data);
|
|
530
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
531
|
+
return __writeBack(exports.matrix_max(data), "matrix_max");
|
|
527
532
|
},
|
|
528
533
|
matrix_norm_frobenius(data) {
|
|
529
534
|
// src/ops/matrix/matrix_norm_frobenius(~lib/typedarray/Float64Array) => f64
|
|
530
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
531
|
-
return exports.matrix_norm_frobenius(data);
|
|
535
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
536
|
+
return __writeBack(exports.matrix_norm_frobenius(data), "matrix_norm_frobenius");
|
|
532
537
|
},
|
|
533
538
|
matrix_trace(data, rows, cols) {
|
|
534
539
|
// src/ops/matrix/matrix_trace(~lib/typedarray/Float64Array, i32, i32) => f64
|
|
535
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
536
|
-
return exports.matrix_trace(data, rows, cols);
|
|
540
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
541
|
+
return __writeBack(exports.matrix_trace(data, rows, cols), "matrix_trace");
|
|
537
542
|
},
|
|
538
543
|
matrix_sum_rows(data, rows, cols, result) {
|
|
539
544
|
// src/ops/matrix/matrix_sum_rows(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array) => void
|
|
540
|
-
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data) || __notnull());
|
|
541
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
545
|
+
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull());
|
|
546
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
542
547
|
try {
|
|
543
|
-
exports.matrix_sum_rows(data, rows, cols, result);
|
|
548
|
+
__writeBack(exports.matrix_sum_rows(data, rows, cols, result), "matrix_sum_rows");
|
|
544
549
|
} finally {
|
|
545
550
|
__release(data);
|
|
546
551
|
}
|
|
547
552
|
},
|
|
548
553
|
matrix_sum_cols(data, rows, cols, result) {
|
|
549
554
|
// src/ops/matrix/matrix_sum_cols(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array) => void
|
|
550
|
-
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data) || __notnull());
|
|
551
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
555
|
+
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull());
|
|
556
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
552
557
|
try {
|
|
553
|
-
exports.matrix_sum_cols(data, rows, cols, result);
|
|
558
|
+
__writeBack(exports.matrix_sum_cols(data, rows, cols, result), "matrix_sum_cols");
|
|
554
559
|
} finally {
|
|
555
560
|
__release(data);
|
|
556
561
|
}
|
|
@@ -561,66 +566,66 @@ async function instantiate(module, imports = {}) {
|
|
|
561
566
|
},
|
|
562
567
|
matrix_is_symmetric(data, rows, cols, tolerance) {
|
|
563
568
|
// src/ops/matrix/matrix_is_symmetric(~lib/typedarray/Float64Array, i32, i32, f64) => bool
|
|
564
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
565
|
-
return exports.matrix_is_symmetric(data, rows, cols, tolerance) != 0;
|
|
569
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
570
|
+
return __writeBack(exports.matrix_is_symmetric(data, rows, cols, tolerance), "matrix_is_symmetric") != 0;
|
|
566
571
|
},
|
|
567
572
|
matrix_is_diagonal(data, rows, cols, tolerance) {
|
|
568
573
|
// src/ops/matrix/matrix_is_diagonal(~lib/typedarray/Float64Array, i32, i32, f64) => bool
|
|
569
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
570
|
-
return exports.matrix_is_diagonal(data, rows, cols, tolerance) != 0;
|
|
574
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
575
|
+
return __writeBack(exports.matrix_is_diagonal(data, rows, cols, tolerance), "matrix_is_diagonal") != 0;
|
|
571
576
|
},
|
|
572
577
|
matrix_is_identity(data, rows, cols, tolerance) {
|
|
573
578
|
// src/ops/matrix/matrix_is_identity(~lib/typedarray/Float64Array, i32, i32, f64) => bool
|
|
574
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
575
|
-
return exports.matrix_is_identity(data, rows, cols, tolerance) != 0;
|
|
579
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
580
|
+
return __writeBack(exports.matrix_is_identity(data, rows, cols, tolerance), "matrix_is_identity") != 0;
|
|
576
581
|
},
|
|
577
582
|
matrix_scale_inplace(data, scalar) {
|
|
578
583
|
// src/ops/matrix/matrix_scale_inplace(~lib/typedarray/Float64Array, f64) => void
|
|
579
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
580
|
-
exports.matrix_scale_inplace(data, scalar);
|
|
584
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 5) || __notnull();
|
|
585
|
+
__writeBack(exports.matrix_scale_inplace(data, scalar), "matrix_scale_inplace");
|
|
581
586
|
},
|
|
582
587
|
matrix_add_scalar_inplace(data, scalar) {
|
|
583
588
|
// src/ops/matrix/matrix_add_scalar_inplace(~lib/typedarray/Float64Array, f64) => void
|
|
584
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
585
|
-
exports.matrix_add_scalar_inplace(data, scalar);
|
|
589
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 5) || __notnull();
|
|
590
|
+
__writeBack(exports.matrix_add_scalar_inplace(data, scalar), "matrix_add_scalar_inplace");
|
|
586
591
|
},
|
|
587
592
|
matrix_add_inplace(a, b) {
|
|
588
593
|
// src/ops/matrix/matrix_add_inplace(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
589
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
590
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
594
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull());
|
|
595
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
591
596
|
try {
|
|
592
|
-
exports.matrix_add_inplace(a, b);
|
|
597
|
+
__writeBack(exports.matrix_add_inplace(a, b), "matrix_add_inplace");
|
|
593
598
|
} finally {
|
|
594
599
|
__release(a);
|
|
595
600
|
}
|
|
596
601
|
},
|
|
597
602
|
matrix_copy(src, dst) {
|
|
598
603
|
// src/ops/matrix/matrix_copy(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
599
|
-
src = __retain(__lowerTypedArray(Float64Array, 5, 3, src) || __notnull());
|
|
600
|
-
dst = __lowerTypedArray(Float64Array, 5, 3, dst) || __notnull();
|
|
604
|
+
src = __retain(__lowerTypedArray(Float64Array, 5, 3, src, 6, "src") || __notnull());
|
|
605
|
+
dst = __lowerTypedArray(Float64Array, 5, 3, dst, 1) || __notnull();
|
|
601
606
|
try {
|
|
602
|
-
exports.matrix_copy(src, dst);
|
|
607
|
+
__writeBack(exports.matrix_copy(src, dst), "matrix_copy");
|
|
603
608
|
} finally {
|
|
604
609
|
__release(src);
|
|
605
610
|
}
|
|
606
611
|
},
|
|
607
612
|
matrix_axpy(alpha, x, y) {
|
|
608
613
|
// src/ops/matrix/matrix_axpy(f64, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
609
|
-
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x) || __notnull());
|
|
610
|
-
y = __lowerTypedArray(Float64Array, 5, 3, y) || __notnull();
|
|
614
|
+
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x, 6, "x") || __notnull());
|
|
615
|
+
y = __lowerTypedArray(Float64Array, 5, 3, y, 1) || __notnull();
|
|
611
616
|
try {
|
|
612
|
-
exports.matrix_axpy(alpha, x, y);
|
|
617
|
+
__writeBack(exports.matrix_axpy(alpha, x, y), "matrix_axpy");
|
|
613
618
|
} finally {
|
|
614
619
|
__release(x);
|
|
615
620
|
}
|
|
616
621
|
},
|
|
617
622
|
matrix_gemm(alpha, a, m, k, b, n, beta, c) {
|
|
618
623
|
// src/ops/matrix/matrix_gemm(f64, ~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, i32, f64, ~lib/typedarray/Float64Array) => void
|
|
619
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
620
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
621
|
-
c = __lowerTypedArray(Float64Array, 5, 3, c) || __notnull();
|
|
624
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
625
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
626
|
+
c = __lowerTypedArray(Float64Array, 5, 3, c, 1) || __notnull();
|
|
622
627
|
try {
|
|
623
|
-
exports.matrix_gemm(alpha, a, m, k, b, n, beta, c);
|
|
628
|
+
__writeBack(exports.matrix_gemm(alpha, a, m, k, b, n, beta, c), "matrix_gemm");
|
|
624
629
|
} finally {
|
|
625
630
|
__release(a);
|
|
626
631
|
__release(b);
|
|
@@ -628,11 +633,11 @@ async function instantiate(module, imports = {}) {
|
|
|
628
633
|
},
|
|
629
634
|
matrix_gemv(alpha, a, m, n, x, beta, y) {
|
|
630
635
|
// src/ops/matrix/matrix_gemv(f64, ~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, f64, ~lib/typedarray/Float64Array) => void
|
|
631
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
632
|
-
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x) || __notnull());
|
|
633
|
-
y = __lowerTypedArray(Float64Array, 5, 3, y) || __notnull();
|
|
636
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
637
|
+
x = __retain(__lowerTypedArray(Float64Array, 5, 3, x, 2, "x") || __notnull());
|
|
638
|
+
y = __lowerTypedArray(Float64Array, 5, 3, y, 1) || __notnull();
|
|
634
639
|
try {
|
|
635
|
-
exports.matrix_gemv(alpha, a, m, n, x, beta, y);
|
|
640
|
+
__writeBack(exports.matrix_gemv(alpha, a, m, n, x, beta, y), "matrix_gemv");
|
|
636
641
|
} finally {
|
|
637
642
|
__release(a);
|
|
638
643
|
__release(x);
|
|
@@ -640,37 +645,37 @@ async function instantiate(module, imports = {}) {
|
|
|
640
645
|
},
|
|
641
646
|
fft(data, n, inverse) {
|
|
642
647
|
// src/ops/fft/fft(~lib/typedarray/Float64Array, i32, i32) => void
|
|
643
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
644
|
-
exports.fft(data, n, inverse);
|
|
648
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 5) || __notnull();
|
|
649
|
+
__writeBack(exports.fft(data, n, inverse), "fft");
|
|
645
650
|
},
|
|
646
651
|
rfft(data, n, result) {
|
|
647
652
|
// src/ops/fft/rfft(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array) => void
|
|
648
|
-
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data) || __notnull());
|
|
649
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
653
|
+
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull());
|
|
654
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
650
655
|
try {
|
|
651
|
-
exports.rfft(data, n, result);
|
|
656
|
+
__writeBack(exports.rfft(data, n, result), "rfft");
|
|
652
657
|
} finally {
|
|
653
658
|
__release(data);
|
|
654
659
|
}
|
|
655
660
|
},
|
|
656
661
|
powerSpectrum(data, n, result) {
|
|
657
662
|
// src/ops/fft/powerSpectrum(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array) => void
|
|
658
|
-
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data) || __notnull());
|
|
659
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
663
|
+
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull());
|
|
664
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
660
665
|
try {
|
|
661
|
-
exports.powerSpectrum(data, n, result);
|
|
666
|
+
__writeBack(exports.powerSpectrum(data, n, result), "powerSpectrum");
|
|
662
667
|
} finally {
|
|
663
668
|
__release(data);
|
|
664
669
|
}
|
|
665
670
|
},
|
|
666
671
|
matrix_lu_decompose(a, n, l_out, u_out, perm_out) {
|
|
667
672
|
// src/algebra/decomposition/matrix_lu_decompose(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Int32Array) => i32
|
|
668
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
669
|
-
l_out = __retain(__lowerTypedArray(Float64Array, 5, 3, l_out) || __notnull());
|
|
670
|
-
u_out = __retain(__lowerTypedArray(Float64Array, 5, 3, u_out) || __notnull());
|
|
671
|
-
perm_out = __lowerTypedArray(Int32Array, 6, 2, perm_out) || __notnull();
|
|
673
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
674
|
+
l_out = __retain(__lowerTypedArray(Float64Array, 5, 3, l_out, 1) || __notnull());
|
|
675
|
+
u_out = __retain(__lowerTypedArray(Float64Array, 5, 3, u_out, 1) || __notnull());
|
|
676
|
+
perm_out = __lowerTypedArray(Int32Array, 6, 2, perm_out, 1) || __notnull();
|
|
672
677
|
try {
|
|
673
|
-
return exports.matrix_lu_decompose(a, n, l_out, u_out, perm_out);
|
|
678
|
+
return __writeBack(exports.matrix_lu_decompose(a, n, l_out, u_out, perm_out), "matrix_lu_decompose");
|
|
674
679
|
} finally {
|
|
675
680
|
__release(a);
|
|
676
681
|
__release(l_out);
|
|
@@ -679,12 +684,12 @@ async function instantiate(module, imports = {}) {
|
|
|
679
684
|
},
|
|
680
685
|
matrix_qr_decompose(a, m, n, q_out, r_out, v_work) {
|
|
681
686
|
// src/algebra/decomposition/matrix_qr_decompose(~lib/typedarray/Float64Array, i32, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array | null) => i32
|
|
682
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
683
|
-
q_out = __retain(__lowerTypedArray(Float64Array, 5, 3, q_out) || __notnull());
|
|
684
|
-
r_out = __retain(__lowerTypedArray(Float64Array, 5, 3, r_out) || __notnull());
|
|
685
|
-
v_work = __lowerTypedArray(Float64Array, 5, 3, v_work);
|
|
687
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
688
|
+
q_out = __retain(__lowerTypedArray(Float64Array, 5, 3, q_out, 1) || __notnull());
|
|
689
|
+
r_out = __retain(__lowerTypedArray(Float64Array, 5, 3, r_out, 1) || __notnull());
|
|
690
|
+
v_work = __lowerTypedArray(Float64Array, 5, 3, v_work, 1);
|
|
686
691
|
try {
|
|
687
|
-
return exports.matrix_qr_decompose(a, m, n, q_out, r_out, v_work);
|
|
692
|
+
return __writeBack(exports.matrix_qr_decompose(a, m, n, q_out, r_out, v_work), "matrix_qr_decompose");
|
|
688
693
|
} finally {
|
|
689
694
|
__release(a);
|
|
690
695
|
__release(q_out);
|
|
@@ -693,21 +698,21 @@ async function instantiate(module, imports = {}) {
|
|
|
693
698
|
},
|
|
694
699
|
matrix_cholesky(a, n, l_out) {
|
|
695
700
|
// src/algebra/decomposition/matrix_cholesky(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array) => i32
|
|
696
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
697
|
-
l_out = __lowerTypedArray(Float64Array, 5, 3, l_out) || __notnull();
|
|
701
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
702
|
+
l_out = __lowerTypedArray(Float64Array, 5, 3, l_out, 1) || __notnull();
|
|
698
703
|
try {
|
|
699
|
-
return exports.matrix_cholesky(a, n, l_out);
|
|
704
|
+
return __writeBack(exports.matrix_cholesky(a, n, l_out), "matrix_cholesky");
|
|
700
705
|
} finally {
|
|
701
706
|
__release(a);
|
|
702
707
|
}
|
|
703
708
|
},
|
|
704
709
|
matrix_inverse(a, n, result, work) {
|
|
705
710
|
// src/algebra/decomposition/matrix_inverse(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => i32
|
|
706
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
707
|
-
result = __retain(__lowerTypedArray(Float64Array, 5, 3, result) || __notnull());
|
|
708
|
-
work = __lowerTypedArray(Float64Array, 5, 3, work) || __notnull();
|
|
711
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
712
|
+
result = __retain(__lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull());
|
|
713
|
+
work = __lowerTypedArray(Float64Array, 5, 3, work, 1) || __notnull();
|
|
709
714
|
try {
|
|
710
|
-
return exports.matrix_inverse(a, n, result, work);
|
|
715
|
+
return __writeBack(exports.matrix_inverse(a, n, result, work), "matrix_inverse");
|
|
711
716
|
} finally {
|
|
712
717
|
__release(a);
|
|
713
718
|
__release(result);
|
|
@@ -715,10 +720,10 @@ async function instantiate(module, imports = {}) {
|
|
|
715
720
|
},
|
|
716
721
|
matrix_determinant(a, n, work) {
|
|
717
722
|
// src/algebra/decomposition/matrix_determinant(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array) => f64
|
|
718
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
719
|
-
work = __lowerTypedArray(Float64Array, 5, 3, work) || __notnull();
|
|
723
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
724
|
+
work = __lowerTypedArray(Float64Array, 5, 3, work, 1) || __notnull();
|
|
720
725
|
try {
|
|
721
|
-
return exports.matrix_determinant(a, n, work);
|
|
726
|
+
return __writeBack(exports.matrix_determinant(a, n, work), "matrix_determinant");
|
|
722
727
|
} finally {
|
|
723
728
|
__release(a);
|
|
724
729
|
}
|
|
@@ -737,88 +742,88 @@ async function instantiate(module, imports = {}) {
|
|
|
737
742
|
},
|
|
738
743
|
chineseRemainder(rem, mods) {
|
|
739
744
|
// src/ops/number-theory/chineseRemainder(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => f64
|
|
740
|
-
rem = __retain(__lowerTypedArray(Float64Array, 5, 3, rem) || __notnull());
|
|
741
|
-
mods = __lowerTypedArray(Float64Array, 5, 3, mods) || __notnull();
|
|
745
|
+
rem = __retain(__lowerTypedArray(Float64Array, 5, 3, rem, 6, "rem") || __notnull());
|
|
746
|
+
mods = __lowerTypedArray(Float64Array, 5, 3, mods, 2, "mods") || __notnull();
|
|
742
747
|
try {
|
|
743
|
-
return exports.chineseRemainder(rem, mods);
|
|
748
|
+
return __writeBack(exports.chineseRemainder(rem, mods), "chineseRemainder");
|
|
744
749
|
} finally {
|
|
745
750
|
__release(rem);
|
|
746
751
|
}
|
|
747
752
|
},
|
|
748
753
|
polyadd(a, b) {
|
|
749
754
|
// src/ops/polynomial/polyadd(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
750
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
751
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
755
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
756
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
752
757
|
try {
|
|
753
|
-
return __liftTypedArray(Float64Array, exports.polyadd(a, b) >>> 0);
|
|
758
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.polyadd(a, b), "polyadd") >>> 0);
|
|
754
759
|
} finally {
|
|
755
760
|
__release(a);
|
|
756
761
|
}
|
|
757
762
|
},
|
|
758
763
|
polynomialQuotient(a, b) {
|
|
759
764
|
// src/ops/polynomial/polynomialQuotient(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
760
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
761
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
765
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
766
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
762
767
|
try {
|
|
763
|
-
return __liftTypedArray(Float64Array, exports.polynomialQuotient(a, b) >>> 0);
|
|
768
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.polynomialQuotient(a, b), "polynomialQuotient") >>> 0);
|
|
764
769
|
} finally {
|
|
765
770
|
__release(a);
|
|
766
771
|
}
|
|
767
772
|
},
|
|
768
773
|
polynomialRemainder(a, b) {
|
|
769
774
|
// src/ops/polynomial/polynomialRemainder(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
770
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
771
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
775
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
776
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
772
777
|
try {
|
|
773
|
-
return __liftTypedArray(Float64Array, exports.polynomialRemainder(a, b) >>> 0);
|
|
778
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.polynomialRemainder(a, b), "polynomialRemainder") >>> 0);
|
|
774
779
|
} finally {
|
|
775
780
|
__release(a);
|
|
776
781
|
}
|
|
777
782
|
},
|
|
778
783
|
polynomialGCD(a, b) {
|
|
779
784
|
// src/ops/polynomial/polynomialGCD(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
780
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
781
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
785
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
786
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
782
787
|
try {
|
|
783
|
-
return __liftTypedArray(Float64Array, exports.polynomialGCD(a, b) >>> 0);
|
|
788
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.polynomialGCD(a, b), "polynomialGCD") >>> 0);
|
|
784
789
|
} finally {
|
|
785
790
|
__release(a);
|
|
786
791
|
}
|
|
787
792
|
},
|
|
788
793
|
polynomialLCM(a, b) {
|
|
789
794
|
// src/ops/polynomial/polynomialLCM(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
790
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
791
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
795
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
796
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
792
797
|
try {
|
|
793
|
-
return __liftTypedArray(Float64Array, exports.polynomialLCM(a, b) >>> 0);
|
|
798
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.polynomialLCM(a, b), "polynomialLCM") >>> 0);
|
|
794
799
|
} finally {
|
|
795
800
|
__release(a);
|
|
796
801
|
}
|
|
797
802
|
},
|
|
798
803
|
discriminant(coeffs) {
|
|
799
804
|
// src/ops/polynomial/discriminant(~lib/typedarray/Float64Array) => f64
|
|
800
|
-
coeffs = __lowerTypedArray(Float64Array, 5, 3, coeffs) || __notnull();
|
|
801
|
-
return exports.discriminant(coeffs);
|
|
805
|
+
coeffs = __lowerTypedArray(Float64Array, 5, 3, coeffs, 6, "coeffs") || __notnull();
|
|
806
|
+
return __writeBack(exports.discriminant(coeffs), "discriminant");
|
|
802
807
|
},
|
|
803
808
|
resultant(p, q) {
|
|
804
809
|
// src/ops/polynomial/resultant(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => f64
|
|
805
|
-
p = __retain(__lowerTypedArray(Float64Array, 5, 3, p) || __notnull());
|
|
806
|
-
q = __lowerTypedArray(Float64Array, 5, 3, q) || __notnull();
|
|
810
|
+
p = __retain(__lowerTypedArray(Float64Array, 5, 3, p, 6, "p") || __notnull());
|
|
811
|
+
q = __lowerTypedArray(Float64Array, 5, 3, q, 2, "q") || __notnull();
|
|
807
812
|
try {
|
|
808
|
-
return exports.resultant(p, q);
|
|
813
|
+
return __writeBack(exports.resultant(p, q), "resultant");
|
|
809
814
|
} finally {
|
|
810
815
|
__release(p);
|
|
811
816
|
}
|
|
812
817
|
},
|
|
813
818
|
resample(x, newRate, oldRate) {
|
|
814
819
|
// src/ops/signal/resample(~lib/typedarray/Float64Array, f64, f64) => ~lib/typedarray/Float64Array
|
|
815
|
-
x = __lowerTypedArray(Float64Array, 5, 3, x) || __notnull();
|
|
816
|
-
return __liftTypedArray(Float64Array, exports.resample(x, newRate, oldRate) >>> 0);
|
|
820
|
+
x = __lowerTypedArray(Float64Array, 5, 3, x, 6, "x") || __notnull();
|
|
821
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.resample(x, newRate, oldRate), "resample") >>> 0);
|
|
817
822
|
},
|
|
818
823
|
medfilt(x, n) {
|
|
819
824
|
// src/ops/signal/medfilt(~lib/typedarray/Float64Array, i32) => ~lib/typedarray/Float64Array
|
|
820
|
-
x = __lowerTypedArray(Float64Array, 5, 3, x) || __notnull();
|
|
821
|
-
return __liftTypedArray(Float64Array, exports.medfilt(x, n) >>> 0);
|
|
825
|
+
x = __lowerTypedArray(Float64Array, 5, 3, x, 6, "x") || __notnull();
|
|
826
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.medfilt(x, n), "medfilt") >>> 0);
|
|
822
827
|
},
|
|
823
828
|
windowFunction(n, windowType) {
|
|
824
829
|
// src/ops/signal/windowFunction(i32, i32) => ~lib/typedarray/Float64Array
|
|
@@ -826,77 +831,77 @@ async function instantiate(module, imports = {}) {
|
|
|
826
831
|
},
|
|
827
832
|
apply_window_f64(samples, windowType) {
|
|
828
833
|
// src/signal/apply_window_f64(~lib/typedarray/Float64Array, i32) => i32
|
|
829
|
-
samples = __lowerTypedArray(Float64Array, 5, 3, samples) || __notnull();
|
|
830
|
-
return exports.apply_window_f64(samples, windowType);
|
|
834
|
+
samples = __lowerTypedArray(Float64Array, 5, 3, samples, 5) || __notnull();
|
|
835
|
+
return __writeBack(exports.apply_window_f64(samples, windowType), "apply_window_f64");
|
|
831
836
|
},
|
|
832
837
|
welch_psd_f64(samples, frameLength, overlap, windowType) {
|
|
833
838
|
// src/signal/welch_psd_f64(~lib/typedarray/Float64Array, i32, i32, i32) => ~lib/typedarray/Float64Array
|
|
834
|
-
samples = __lowerTypedArray(Float64Array, 5, 3, samples) || __notnull();
|
|
835
|
-
return __liftTypedArray(Float64Array, exports.welch_psd_f64(samples, frameLength, overlap, windowType) >>> 0);
|
|
839
|
+
samples = __lowerTypedArray(Float64Array, 5, 3, samples, 6, "samples") || __notnull();
|
|
840
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.welch_psd_f64(samples, frameLength, overlap, windowType), "welch_psd_f64") >>> 0);
|
|
836
841
|
},
|
|
837
842
|
bartlett_psd_f64(samples, frameLength) {
|
|
838
843
|
// src/signal/bartlett_psd_f64(~lib/typedarray/Float64Array, i32) => ~lib/typedarray/Float64Array
|
|
839
|
-
samples = __lowerTypedArray(Float64Array, 5, 3, samples) || __notnull();
|
|
840
|
-
return __liftTypedArray(Float64Array, exports.bartlett_psd_f64(samples, frameLength) >>> 0);
|
|
844
|
+
samples = __lowerTypedArray(Float64Array, 5, 3, samples, 6, "samples") || __notnull();
|
|
845
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bartlett_psd_f64(samples, frameLength), "bartlett_psd_f64") >>> 0);
|
|
841
846
|
},
|
|
842
847
|
goertzel_f64(samples, targetFreq, sampleRate) {
|
|
843
848
|
// src/signal/goertzel_f64(~lib/typedarray/Float64Array, f64, f64) => f64
|
|
844
|
-
samples = __lowerTypedArray(Float64Array, 5, 3, samples) || __notnull();
|
|
845
|
-
return exports.goertzel_f64(samples, targetFreq, sampleRate);
|
|
849
|
+
samples = __lowerTypedArray(Float64Array, 5, 3, samples, 6, "samples") || __notnull();
|
|
850
|
+
return __writeBack(exports.goertzel_f64(samples, targetFreq, sampleRate), "goertzel_f64");
|
|
846
851
|
},
|
|
847
852
|
chirp_z_transform_f64(samples, m, phiStartRe, phiStartIm, phiStepRe, phiStepIm) {
|
|
848
853
|
// src/signal/chirp_z_transform_f64(~lib/typedarray/Float64Array, i32, f64, f64, f64, f64) => ~lib/typedarray/Float64Array
|
|
849
|
-
samples = __lowerTypedArray(Float64Array, 5, 3, samples) || __notnull();
|
|
850
|
-
return __liftTypedArray(Float64Array, exports.chirp_z_transform_f64(samples, m, phiStartRe, phiStartIm, phiStepRe, phiStepIm) >>> 0);
|
|
854
|
+
samples = __lowerTypedArray(Float64Array, 5, 3, samples, 6, "samples") || __notnull();
|
|
855
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.chirp_z_transform_f64(samples, m, phiStartRe, phiStartIm, phiStepRe, phiStepIm), "chirp_z_transform_f64") >>> 0);
|
|
851
856
|
},
|
|
852
857
|
rowReduce(a, m, n, tol) {
|
|
853
858
|
// src/ops/linalg/rowReduce(~lib/typedarray/Float64Array, i32, i32, f64) => ~lib/typedarray/Float64Array
|
|
854
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
855
|
-
return __liftTypedArray(Float64Array, exports.rowReduce(a, m, n, tol) >>> 0);
|
|
859
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull();
|
|
860
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.rowReduce(a, m, n, tol), "rowReduce") >>> 0);
|
|
856
861
|
},
|
|
857
862
|
characteristicPolynomial(a, n) {
|
|
858
863
|
// src/ops/linalg/characteristicPolynomial(~lib/typedarray/Float64Array, i32) => ~lib/typedarray/Float64Array
|
|
859
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
860
|
-
return __liftTypedArray(Float64Array, exports.characteristicPolynomial(a, n) >>> 0);
|
|
864
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull();
|
|
865
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.characteristicPolynomial(a, n), "characteristicPolynomial") >>> 0);
|
|
861
866
|
},
|
|
862
867
|
expfit(xs, ys) {
|
|
863
868
|
// src/ops/curvefit/expfit(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
864
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
865
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
869
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
870
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
866
871
|
try {
|
|
867
|
-
return __liftTypedArray(Float64Array, exports.expfit(xs, ys) >>> 0);
|
|
872
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.expfit(xs, ys), "expfit") >>> 0);
|
|
868
873
|
} finally {
|
|
869
874
|
__release(xs);
|
|
870
875
|
}
|
|
871
876
|
},
|
|
872
877
|
logfit(xs, ys) {
|
|
873
878
|
// src/ops/curvefit/logfit(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
874
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
875
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
879
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
880
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
876
881
|
try {
|
|
877
|
-
return __liftTypedArray(Float64Array, exports.logfit(xs, ys) >>> 0);
|
|
882
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.logfit(xs, ys), "logfit") >>> 0);
|
|
878
883
|
} finally {
|
|
879
884
|
__release(xs);
|
|
880
885
|
}
|
|
881
886
|
},
|
|
882
887
|
powerfit(xs, ys) {
|
|
883
888
|
// src/ops/curvefit/powerfit(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
884
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
885
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
889
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
890
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
886
891
|
try {
|
|
887
|
-
return __liftTypedArray(Float64Array, exports.powerfit(xs, ys) >>> 0);
|
|
892
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.powerfit(xs, ys), "powerfit") >>> 0);
|
|
888
893
|
} finally {
|
|
889
894
|
__release(xs);
|
|
890
895
|
}
|
|
891
896
|
},
|
|
892
897
|
quadprog(h, n, f, a, m, b) {
|
|
893
898
|
// src/ops/optimization/quadprog(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
894
|
-
h = __retain(__lowerTypedArray(Float64Array, 5, 3, h) || __notnull());
|
|
895
|
-
f = __retain(__lowerTypedArray(Float64Array, 5, 3, f) || __notnull());
|
|
896
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
897
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
899
|
+
h = __retain(__lowerTypedArray(Float64Array, 5, 3, h, 6, "h") || __notnull());
|
|
900
|
+
f = __retain(__lowerTypedArray(Float64Array, 5, 3, f, 2, "f") || __notnull());
|
|
901
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 2, "a") || __notnull());
|
|
902
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
898
903
|
try {
|
|
899
|
-
return __liftTypedArray(Float64Array, exports.quadprog(h, n, f, a, m, b) >>> 0);
|
|
904
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.quadprog(h, n, f, a, m, b), "quadprog") >>> 0);
|
|
900
905
|
} finally {
|
|
901
906
|
__release(h);
|
|
902
907
|
__release(f);
|
|
@@ -905,11 +910,11 @@ async function instantiate(module, imports = {}) {
|
|
|
905
910
|
},
|
|
906
911
|
linprog(c, n, a, b, m) {
|
|
907
912
|
// src/ops/optimization/linprog(~lib/typedarray/Float64Array, i32, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, i32) => ~lib/typedarray/Float64Array
|
|
908
|
-
c = __retain(__lowerTypedArray(Float64Array, 5, 3, c) || __notnull());
|
|
909
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
910
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
913
|
+
c = __retain(__lowerTypedArray(Float64Array, 5, 3, c, 6, "c") || __notnull());
|
|
914
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 2, "a") || __notnull());
|
|
915
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
911
916
|
try {
|
|
912
|
-
return __liftTypedArray(Float64Array, exports.linprog(c, n, a, b, m) >>> 0);
|
|
917
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.linprog(c, n, a, b, m), "linprog") >>> 0);
|
|
913
918
|
} finally {
|
|
914
919
|
__release(c);
|
|
915
920
|
__release(a);
|
|
@@ -917,31 +922,31 @@ async function instantiate(module, imports = {}) {
|
|
|
917
922
|
},
|
|
918
923
|
nullspace(a, m, n) {
|
|
919
924
|
// src/ops/optimization/nullspace(~lib/typedarray/Float64Array, i32, i32) => ~lib/typedarray/Float64Array
|
|
920
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
921
|
-
return __liftTypedArray(Float64Array, exports.nullspace(a, m, n) >>> 0);
|
|
925
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull();
|
|
926
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.nullspace(a, m, n), "nullspace") >>> 0);
|
|
922
927
|
},
|
|
923
928
|
residue(p, q) {
|
|
924
929
|
// src/ops/approx/residue(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
925
|
-
p = __retain(__lowerTypedArray(Float64Array, 5, 3, p) || __notnull());
|
|
926
|
-
q = __lowerTypedArray(Float64Array, 5, 3, q) || __notnull();
|
|
930
|
+
p = __retain(__lowerTypedArray(Float64Array, 5, 3, p, 6, "p") || __notnull());
|
|
931
|
+
q = __lowerTypedArray(Float64Array, 5, 3, q, 2, "q") || __notnull();
|
|
927
932
|
try {
|
|
928
|
-
return __liftTypedArray(Float64Array, exports.residue(p, q) >>> 0);
|
|
933
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.residue(p, q), "residue") >>> 0);
|
|
929
934
|
} finally {
|
|
930
935
|
__release(p);
|
|
931
936
|
}
|
|
932
937
|
},
|
|
933
938
|
padeApproximant(coeffs, m, n) {
|
|
934
939
|
// src/ops/approx/padeApproximant(~lib/typedarray/Float64Array, i32, i32) => ~lib/typedarray/Float64Array
|
|
935
|
-
coeffs = __lowerTypedArray(Float64Array, 5, 3, coeffs) || __notnull();
|
|
936
|
-
return __liftTypedArray(Float64Array, exports.padeApproximant(coeffs, m, n) >>> 0);
|
|
940
|
+
coeffs = __lowerTypedArray(Float64Array, 5, 3, coeffs, 6, "coeffs") || __notnull();
|
|
941
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.padeApproximant(coeffs, m, n), "padeApproximant") >>> 0);
|
|
937
942
|
},
|
|
938
943
|
tensorTranspose(data, shape, perm) {
|
|
939
944
|
// src/ops/tensor/tensorTranspose(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
940
|
-
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data) || __notnull());
|
|
941
|
-
shape = __retain(__lowerTypedArray(Float64Array, 5, 3, shape) || __notnull());
|
|
942
|
-
perm = __lowerTypedArray(Float64Array, 5, 3, perm) || __notnull();
|
|
945
|
+
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull());
|
|
946
|
+
shape = __retain(__lowerTypedArray(Float64Array, 5, 3, shape, 2, "shape") || __notnull());
|
|
947
|
+
perm = __lowerTypedArray(Float64Array, 5, 3, perm, 2, "perm") || __notnull();
|
|
943
948
|
try {
|
|
944
|
-
return __liftTypedArray(Float64Array, exports.tensorTranspose(data, shape, perm) >>> 0);
|
|
949
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.tensorTranspose(data, shape, perm), "tensorTranspose") >>> 0);
|
|
945
950
|
} finally {
|
|
946
951
|
__release(data);
|
|
947
952
|
__release(shape);
|
|
@@ -1215,11 +1220,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1215
1220
|
},
|
|
1216
1221
|
bitAnd_i32_array(a, b, result) {
|
|
1217
1222
|
// src/ops/bitwise/bitAnd_i32_array(~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array) => void
|
|
1218
|
-
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a) || __notnull());
|
|
1219
|
-
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b) || __notnull());
|
|
1220
|
-
result = __lowerTypedArray(Int32Array, 6, 2, result) || __notnull();
|
|
1223
|
+
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a, 6, "a") || __notnull());
|
|
1224
|
+
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b, 2, "b") || __notnull());
|
|
1225
|
+
result = __lowerTypedArray(Int32Array, 6, 2, result, 1) || __notnull();
|
|
1221
1226
|
try {
|
|
1222
|
-
exports.bitAnd_i32_array(a, b, result);
|
|
1227
|
+
__writeBack(exports.bitAnd_i32_array(a, b, result), "bitAnd_i32_array");
|
|
1223
1228
|
} finally {
|
|
1224
1229
|
__release(a);
|
|
1225
1230
|
__release(b);
|
|
@@ -1227,11 +1232,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1227
1232
|
},
|
|
1228
1233
|
bitOr_i32_array(a, b, result) {
|
|
1229
1234
|
// src/ops/bitwise/bitOr_i32_array(~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array) => void
|
|
1230
|
-
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a) || __notnull());
|
|
1231
|
-
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b) || __notnull());
|
|
1232
|
-
result = __lowerTypedArray(Int32Array, 6, 2, result) || __notnull();
|
|
1235
|
+
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a, 6, "a") || __notnull());
|
|
1236
|
+
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b, 2, "b") || __notnull());
|
|
1237
|
+
result = __lowerTypedArray(Int32Array, 6, 2, result, 1) || __notnull();
|
|
1233
1238
|
try {
|
|
1234
|
-
exports.bitOr_i32_array(a, b, result);
|
|
1239
|
+
__writeBack(exports.bitOr_i32_array(a, b, result), "bitOr_i32_array");
|
|
1235
1240
|
} finally {
|
|
1236
1241
|
__release(a);
|
|
1237
1242
|
__release(b);
|
|
@@ -1239,11 +1244,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1239
1244
|
},
|
|
1240
1245
|
bitXor_i32_array(a, b, result) {
|
|
1241
1246
|
// src/ops/bitwise/bitXor_i32_array(~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array) => void
|
|
1242
|
-
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a) || __notnull());
|
|
1243
|
-
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b) || __notnull());
|
|
1244
|
-
result = __lowerTypedArray(Int32Array, 6, 2, result) || __notnull();
|
|
1247
|
+
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a, 6, "a") || __notnull());
|
|
1248
|
+
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b, 2, "b") || __notnull());
|
|
1249
|
+
result = __lowerTypedArray(Int32Array, 6, 2, result, 1) || __notnull();
|
|
1245
1250
|
try {
|
|
1246
|
-
exports.bitXor_i32_array(a, b, result);
|
|
1251
|
+
__writeBack(exports.bitXor_i32_array(a, b, result), "bitXor_i32_array");
|
|
1247
1252
|
} finally {
|
|
1248
1253
|
__release(a);
|
|
1249
1254
|
__release(b);
|
|
@@ -1251,21 +1256,21 @@ async function instantiate(module, imports = {}) {
|
|
|
1251
1256
|
},
|
|
1252
1257
|
bitNot_i32_array(a, result) {
|
|
1253
1258
|
// src/ops/bitwise/bitNot_i32_array(~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array) => void
|
|
1254
|
-
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a) || __notnull());
|
|
1255
|
-
result = __lowerTypedArray(Int32Array, 6, 2, result) || __notnull();
|
|
1259
|
+
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a, 6, "a") || __notnull());
|
|
1260
|
+
result = __lowerTypedArray(Int32Array, 6, 2, result, 1) || __notnull();
|
|
1256
1261
|
try {
|
|
1257
|
-
exports.bitNot_i32_array(a, result);
|
|
1262
|
+
__writeBack(exports.bitNot_i32_array(a, result), "bitNot_i32_array");
|
|
1258
1263
|
} finally {
|
|
1259
1264
|
__release(a);
|
|
1260
1265
|
}
|
|
1261
1266
|
},
|
|
1262
1267
|
leftShift_i32_array(a, b, result) {
|
|
1263
1268
|
// src/ops/bitwise/leftShift_i32_array(~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array) => void
|
|
1264
|
-
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a) || __notnull());
|
|
1265
|
-
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b) || __notnull());
|
|
1266
|
-
result = __lowerTypedArray(Int32Array, 6, 2, result) || __notnull();
|
|
1269
|
+
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a, 6, "a") || __notnull());
|
|
1270
|
+
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b, 2, "b") || __notnull());
|
|
1271
|
+
result = __lowerTypedArray(Int32Array, 6, 2, result, 1) || __notnull();
|
|
1267
1272
|
try {
|
|
1268
|
-
exports.leftShift_i32_array(a, b, result);
|
|
1273
|
+
__writeBack(exports.leftShift_i32_array(a, b, result), "leftShift_i32_array");
|
|
1269
1274
|
} finally {
|
|
1270
1275
|
__release(a);
|
|
1271
1276
|
__release(b);
|
|
@@ -1273,11 +1278,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1273
1278
|
},
|
|
1274
1279
|
rightArithShift_i32_array(a, b, result) {
|
|
1275
1280
|
// src/ops/bitwise/rightArithShift_i32_array(~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array) => void
|
|
1276
|
-
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a) || __notnull());
|
|
1277
|
-
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b) || __notnull());
|
|
1278
|
-
result = __lowerTypedArray(Int32Array, 6, 2, result) || __notnull();
|
|
1281
|
+
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a, 6, "a") || __notnull());
|
|
1282
|
+
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b, 2, "b") || __notnull());
|
|
1283
|
+
result = __lowerTypedArray(Int32Array, 6, 2, result, 1) || __notnull();
|
|
1279
1284
|
try {
|
|
1280
|
-
exports.rightArithShift_i32_array(a, b, result);
|
|
1285
|
+
__writeBack(exports.rightArithShift_i32_array(a, b, result), "rightArithShift_i32_array");
|
|
1281
1286
|
} finally {
|
|
1282
1287
|
__release(a);
|
|
1283
1288
|
__release(b);
|
|
@@ -1285,11 +1290,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1285
1290
|
},
|
|
1286
1291
|
rightLogShift_i32_array(a, b, result) {
|
|
1287
1292
|
// src/ops/bitwise/rightLogShift_i32_array(~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array, ~lib/typedarray/Int32Array) => void
|
|
1288
|
-
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a) || __notnull());
|
|
1289
|
-
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b) || __notnull());
|
|
1290
|
-
result = __lowerTypedArray(Int32Array, 6, 2, result) || __notnull();
|
|
1293
|
+
a = __retain(__lowerTypedArray(Int32Array, 6, 2, a, 6, "a") || __notnull());
|
|
1294
|
+
b = __retain(__lowerTypedArray(Int32Array, 6, 2, b, 2, "b") || __notnull());
|
|
1295
|
+
result = __lowerTypedArray(Int32Array, 6, 2, result, 1) || __notnull();
|
|
1291
1296
|
try {
|
|
1292
|
-
exports.rightLogShift_i32_array(a, b, result);
|
|
1297
|
+
__writeBack(exports.rightLogShift_i32_array(a, b, result), "rightLogShift_i32_array");
|
|
1293
1298
|
} finally {
|
|
1294
1299
|
__release(a);
|
|
1295
1300
|
__release(b);
|
|
@@ -1297,77 +1302,77 @@ async function instantiate(module, imports = {}) {
|
|
|
1297
1302
|
},
|
|
1298
1303
|
poly_mul_f64(a, b) {
|
|
1299
1304
|
// src/poly/poly_mul_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1300
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1301
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
1305
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1306
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
1302
1307
|
try {
|
|
1303
|
-
return __liftTypedArray(Float64Array, exports.poly_mul_f64(a, b) >>> 0);
|
|
1308
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.poly_mul_f64(a, b), "poly_mul_f64") >>> 0);
|
|
1304
1309
|
} finally {
|
|
1305
1310
|
__release(a);
|
|
1306
1311
|
}
|
|
1307
1312
|
},
|
|
1308
1313
|
poly_div_mod_f64(num, den) {
|
|
1309
1314
|
// src/poly/poly_div_mod_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1310
|
-
num = __retain(__lowerTypedArray(Float64Array, 5, 3, num) || __notnull());
|
|
1311
|
-
den = __lowerTypedArray(Float64Array, 5, 3, den) || __notnull();
|
|
1315
|
+
num = __retain(__lowerTypedArray(Float64Array, 5, 3, num, 6, "num") || __notnull());
|
|
1316
|
+
den = __lowerTypedArray(Float64Array, 5, 3, den, 2, "den") || __notnull();
|
|
1312
1317
|
try {
|
|
1313
|
-
return __liftTypedArray(Float64Array, exports.poly_div_mod_f64(num, den) >>> 0);
|
|
1318
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.poly_div_mod_f64(num, den), "poly_div_mod_f64") >>> 0);
|
|
1314
1319
|
} finally {
|
|
1315
1320
|
__release(num);
|
|
1316
1321
|
}
|
|
1317
1322
|
},
|
|
1318
1323
|
poly_fit_f64(xs, ys, degree) {
|
|
1319
1324
|
// src/poly/poly_fit_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, i32) => ~lib/typedarray/Float64Array
|
|
1320
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1321
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
1325
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1326
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
1322
1327
|
try {
|
|
1323
|
-
return __liftTypedArray(Float64Array, exports.poly_fit_f64(xs, ys, degree) >>> 0);
|
|
1328
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.poly_fit_f64(xs, ys, degree), "poly_fit_f64") >>> 0);
|
|
1324
1329
|
} finally {
|
|
1325
1330
|
__release(xs);
|
|
1326
1331
|
}
|
|
1327
1332
|
},
|
|
1328
1333
|
cheb_fit_f64(xs, ys, degree) {
|
|
1329
1334
|
// src/poly/cheb_fit_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, i32) => ~lib/typedarray/Float64Array
|
|
1330
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1331
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
1335
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1336
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
1332
1337
|
try {
|
|
1333
|
-
return __liftTypedArray(Float64Array, exports.cheb_fit_f64(xs, ys, degree) >>> 0);
|
|
1338
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.cheb_fit_f64(xs, ys, degree), "cheb_fit_f64") >>> 0);
|
|
1334
1339
|
} finally {
|
|
1335
1340
|
__release(xs);
|
|
1336
1341
|
}
|
|
1337
1342
|
},
|
|
1338
1343
|
legendre_fit_f64(xs, ys, degree) {
|
|
1339
1344
|
// src/poly/legendre_fit_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, i32) => ~lib/typedarray/Float64Array
|
|
1340
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1341
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
1345
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1346
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
1342
1347
|
try {
|
|
1343
|
-
return __liftTypedArray(Float64Array, exports.legendre_fit_f64(xs, ys, degree) >>> 0);
|
|
1348
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.legendre_fit_f64(xs, ys, degree), "legendre_fit_f64") >>> 0);
|
|
1344
1349
|
} finally {
|
|
1345
1350
|
__release(xs);
|
|
1346
1351
|
}
|
|
1347
1352
|
},
|
|
1348
1353
|
poly_resultant_f64(p, q) {
|
|
1349
1354
|
// src/poly/poly_resultant_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => f64
|
|
1350
|
-
p = __retain(__lowerTypedArray(Float64Array, 5, 3, p) || __notnull());
|
|
1351
|
-
q = __lowerTypedArray(Float64Array, 5, 3, q) || __notnull();
|
|
1355
|
+
p = __retain(__lowerTypedArray(Float64Array, 5, 3, p, 6, "p") || __notnull());
|
|
1356
|
+
q = __lowerTypedArray(Float64Array, 5, 3, q, 2, "q") || __notnull();
|
|
1352
1357
|
try {
|
|
1353
|
-
return exports.poly_resultant_f64(p, q);
|
|
1358
|
+
return __writeBack(exports.poly_resultant_f64(p, q), "poly_resultant_f64");
|
|
1354
1359
|
} finally {
|
|
1355
1360
|
__release(p);
|
|
1356
1361
|
}
|
|
1357
1362
|
},
|
|
1358
1363
|
poly_discriminant_f64(p) {
|
|
1359
1364
|
// src/poly/poly_discriminant_f64(~lib/typedarray/Float64Array) => f64
|
|
1360
|
-
p = __lowerTypedArray(Float64Array, 5, 3, p) || __notnull();
|
|
1361
|
-
return exports.poly_discriminant_f64(p);
|
|
1365
|
+
p = __lowerTypedArray(Float64Array, 5, 3, p, 6, "p") || __notnull();
|
|
1366
|
+
return __writeBack(exports.poly_discriminant_f64(p), "poly_discriminant_f64");
|
|
1362
1367
|
},
|
|
1363
1368
|
tridiag_solve_f64(diag, lower, upper, rhs) {
|
|
1364
1369
|
// src/tridiag/tridiag_solve_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1365
|
-
diag = __retain(__lowerTypedArray(Float64Array, 5, 3, diag) || __notnull());
|
|
1366
|
-
lower = __retain(__lowerTypedArray(Float64Array, 5, 3, lower) || __notnull());
|
|
1367
|
-
upper = __retain(__lowerTypedArray(Float64Array, 5, 3, upper) || __notnull());
|
|
1368
|
-
rhs = __lowerTypedArray(Float64Array, 5, 3, rhs) || __notnull();
|
|
1370
|
+
diag = __retain(__lowerTypedArray(Float64Array, 5, 3, diag, 6, "diag") || __notnull());
|
|
1371
|
+
lower = __retain(__lowerTypedArray(Float64Array, 5, 3, lower, 2, "lower") || __notnull());
|
|
1372
|
+
upper = __retain(__lowerTypedArray(Float64Array, 5, 3, upper, 2, "upper") || __notnull());
|
|
1373
|
+
rhs = __lowerTypedArray(Float64Array, 5, 3, rhs, 2, "rhs") || __notnull();
|
|
1369
1374
|
try {
|
|
1370
|
-
return __liftTypedArray(Float64Array, exports.tridiag_solve_f64(diag, lower, upper, rhs) >>> 0);
|
|
1375
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.tridiag_solve_f64(diag, lower, upper, rhs), "tridiag_solve_f64") >>> 0);
|
|
1371
1376
|
} finally {
|
|
1372
1377
|
__release(diag);
|
|
1373
1378
|
__release(lower);
|
|
@@ -1376,96 +1381,96 @@ async function instantiate(module, imports = {}) {
|
|
|
1376
1381
|
},
|
|
1377
1382
|
divided_difference_f64(xs, ys) {
|
|
1378
1383
|
// src/tridiag/divided_difference_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1379
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1380
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
1384
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1385
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
1381
1386
|
try {
|
|
1382
|
-
return __liftTypedArray(Float64Array, exports.divided_difference_f64(xs, ys) >>> 0);
|
|
1387
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.divided_difference_f64(xs, ys), "divided_difference_f64") >>> 0);
|
|
1383
1388
|
} finally {
|
|
1384
1389
|
__release(xs);
|
|
1385
1390
|
}
|
|
1386
1391
|
},
|
|
1387
1392
|
bessel_j0_f64(xs) {
|
|
1388
1393
|
// src/special/bessel_j0_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1389
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1390
|
-
return __liftTypedArray(Float64Array, exports.bessel_j0_f64(xs) >>> 0);
|
|
1394
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1395
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_j0_f64(xs), "bessel_j0_f64") >>> 0);
|
|
1391
1396
|
},
|
|
1392
1397
|
bessel_j1_f64(xs) {
|
|
1393
1398
|
// src/special/bessel_j1_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1394
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1395
|
-
return __liftTypedArray(Float64Array, exports.bessel_j1_f64(xs) >>> 0);
|
|
1399
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1400
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_j1_f64(xs), "bessel_j1_f64") >>> 0);
|
|
1396
1401
|
},
|
|
1397
1402
|
bessel_jn_f64(n, xs) {
|
|
1398
1403
|
// src/special/bessel_jn_f64(i32, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1399
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1400
|
-
return __liftTypedArray(Float64Array, exports.bessel_jn_f64(n, xs) >>> 0);
|
|
1404
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1405
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_jn_f64(n, xs), "bessel_jn_f64") >>> 0);
|
|
1401
1406
|
},
|
|
1402
1407
|
bessel_j_f64(order, xs) {
|
|
1403
1408
|
// src/special/bessel_j_f64(i32, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1404
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1405
|
-
return __liftTypedArray(Float64Array, exports.bessel_j_f64(order, xs) >>> 0);
|
|
1409
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1410
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_j_f64(order, xs), "bessel_j_f64") >>> 0);
|
|
1406
1411
|
},
|
|
1407
1412
|
bessel_y0_f64(xs) {
|
|
1408
1413
|
// src/special/bessel_y0_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1409
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1410
|
-
return __liftTypedArray(Float64Array, exports.bessel_y0_f64(xs) >>> 0);
|
|
1414
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1415
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_y0_f64(xs), "bessel_y0_f64") >>> 0);
|
|
1411
1416
|
},
|
|
1412
1417
|
bessel_y1_f64(xs) {
|
|
1413
1418
|
// src/special/bessel_y1_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1414
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1415
|
-
return __liftTypedArray(Float64Array, exports.bessel_y1_f64(xs) >>> 0);
|
|
1419
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1420
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_y1_f64(xs), "bessel_y1_f64") >>> 0);
|
|
1416
1421
|
},
|
|
1417
1422
|
bessel_yn_f64(n, xs) {
|
|
1418
1423
|
// src/special/bessel_yn_f64(i32, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1419
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1420
|
-
return __liftTypedArray(Float64Array, exports.bessel_yn_f64(n, xs) >>> 0);
|
|
1424
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1425
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_yn_f64(n, xs), "bessel_yn_f64") >>> 0);
|
|
1421
1426
|
},
|
|
1422
1427
|
bessel_y_f64(order, xs) {
|
|
1423
1428
|
// src/special/bessel_y_f64(i32, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1424
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1425
|
-
return __liftTypedArray(Float64Array, exports.bessel_y_f64(order, xs) >>> 0);
|
|
1429
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1430
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.bessel_y_f64(order, xs), "bessel_y_f64") >>> 0);
|
|
1426
1431
|
},
|
|
1427
1432
|
airy_ai_f64(xs) {
|
|
1428
1433
|
// src/special/airy_ai_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1429
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1430
|
-
return __liftTypedArray(Float64Array, exports.airy_ai_f64(xs) >>> 0);
|
|
1434
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1435
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.airy_ai_f64(xs), "airy_ai_f64") >>> 0);
|
|
1431
1436
|
},
|
|
1432
1437
|
airy_bi_f64(xs) {
|
|
1433
1438
|
// src/special/airy_bi_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1434
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1435
|
-
return __liftTypedArray(Float64Array, exports.airy_bi_f64(xs) >>> 0);
|
|
1439
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1440
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.airy_bi_f64(xs), "airy_bi_f64") >>> 0);
|
|
1436
1441
|
},
|
|
1437
1442
|
elliptic_k_f64(ms) {
|
|
1438
1443
|
// src/special/elliptic_k_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1439
|
-
ms = __lowerTypedArray(Float64Array, 5, 3, ms) || __notnull();
|
|
1440
|
-
return __liftTypedArray(Float64Array, exports.elliptic_k_f64(ms) >>> 0);
|
|
1444
|
+
ms = __lowerTypedArray(Float64Array, 5, 3, ms, 6, "ms") || __notnull();
|
|
1445
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.elliptic_k_f64(ms), "elliptic_k_f64") >>> 0);
|
|
1441
1446
|
},
|
|
1442
1447
|
elliptic_e_f64(ms) {
|
|
1443
1448
|
// src/special/elliptic_e_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1444
|
-
ms = __lowerTypedArray(Float64Array, 5, 3, ms) || __notnull();
|
|
1445
|
-
return __liftTypedArray(Float64Array, exports.elliptic_e_f64(ms) >>> 0);
|
|
1449
|
+
ms = __lowerTypedArray(Float64Array, 5, 3, ms, 6, "ms") || __notnull();
|
|
1450
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.elliptic_e_f64(ms), "elliptic_e_f64") >>> 0);
|
|
1446
1451
|
},
|
|
1447
1452
|
lgamma_f64(xs) {
|
|
1448
1453
|
// src/special/lgamma_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1449
|
-
xs = __lowerTypedArray(Float64Array, 5, 3, xs) || __notnull();
|
|
1450
|
-
return __liftTypedArray(Float64Array, exports.lgamma_f64(xs) >>> 0);
|
|
1454
|
+
xs = __lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull();
|
|
1455
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.lgamma_f64(xs), "lgamma_f64") >>> 0);
|
|
1451
1456
|
},
|
|
1452
1457
|
carlson_rc_f64(xs, ys) {
|
|
1453
1458
|
// src/special/carlson_rc_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1454
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1455
|
-
ys = __lowerTypedArray(Float64Array, 5, 3, ys) || __notnull();
|
|
1459
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1460
|
+
ys = __lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull();
|
|
1456
1461
|
try {
|
|
1457
|
-
return __liftTypedArray(Float64Array, exports.carlson_rc_f64(xs, ys) >>> 0);
|
|
1462
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.carlson_rc_f64(xs, ys), "carlson_rc_f64") >>> 0);
|
|
1458
1463
|
} finally {
|
|
1459
1464
|
__release(xs);
|
|
1460
1465
|
}
|
|
1461
1466
|
},
|
|
1462
1467
|
carlson_rf_f64(xs, ys, zs) {
|
|
1463
1468
|
// src/special/carlson_rf_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1464
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1465
|
-
ys = __retain(__lowerTypedArray(Float64Array, 5, 3, ys) || __notnull());
|
|
1466
|
-
zs = __lowerTypedArray(Float64Array, 5, 3, zs) || __notnull();
|
|
1469
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1470
|
+
ys = __retain(__lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull());
|
|
1471
|
+
zs = __lowerTypedArray(Float64Array, 5, 3, zs, 2, "zs") || __notnull();
|
|
1467
1472
|
try {
|
|
1468
|
-
return __liftTypedArray(Float64Array, exports.carlson_rf_f64(xs, ys, zs) >>> 0);
|
|
1473
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.carlson_rf_f64(xs, ys, zs), "carlson_rf_f64") >>> 0);
|
|
1469
1474
|
} finally {
|
|
1470
1475
|
__release(xs);
|
|
1471
1476
|
__release(ys);
|
|
@@ -1473,11 +1478,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1473
1478
|
},
|
|
1474
1479
|
carlson_rd_f64(xs, ys, zs) {
|
|
1475
1480
|
// src/special/carlson_rd_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1476
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1477
|
-
ys = __retain(__lowerTypedArray(Float64Array, 5, 3, ys) || __notnull());
|
|
1478
|
-
zs = __lowerTypedArray(Float64Array, 5, 3, zs) || __notnull();
|
|
1481
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1482
|
+
ys = __retain(__lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull());
|
|
1483
|
+
zs = __lowerTypedArray(Float64Array, 5, 3, zs, 2, "zs") || __notnull();
|
|
1479
1484
|
try {
|
|
1480
|
-
return __liftTypedArray(Float64Array, exports.carlson_rd_f64(xs, ys, zs) >>> 0);
|
|
1485
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.carlson_rd_f64(xs, ys, zs), "carlson_rd_f64") >>> 0);
|
|
1481
1486
|
} finally {
|
|
1482
1487
|
__release(xs);
|
|
1483
1488
|
__release(ys);
|
|
@@ -1485,12 +1490,12 @@ async function instantiate(module, imports = {}) {
|
|
|
1485
1490
|
},
|
|
1486
1491
|
carlson_rj_f64(xs, ys, zs, ps) {
|
|
1487
1492
|
// src/special/carlson_rj_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1488
|
-
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs) || __notnull());
|
|
1489
|
-
ys = __retain(__lowerTypedArray(Float64Array, 5, 3, ys) || __notnull());
|
|
1490
|
-
zs = __retain(__lowerTypedArray(Float64Array, 5, 3, zs) || __notnull());
|
|
1491
|
-
ps = __lowerTypedArray(Float64Array, 5, 3, ps) || __notnull();
|
|
1493
|
+
xs = __retain(__lowerTypedArray(Float64Array, 5, 3, xs, 6, "xs") || __notnull());
|
|
1494
|
+
ys = __retain(__lowerTypedArray(Float64Array, 5, 3, ys, 2, "ys") || __notnull());
|
|
1495
|
+
zs = __retain(__lowerTypedArray(Float64Array, 5, 3, zs, 2, "zs") || __notnull());
|
|
1496
|
+
ps = __lowerTypedArray(Float64Array, 5, 3, ps, 2, "ps") || __notnull();
|
|
1492
1497
|
try {
|
|
1493
|
-
return __liftTypedArray(Float64Array, exports.carlson_rj_f64(xs, ys, zs, ps) >>> 0);
|
|
1498
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.carlson_rj_f64(xs, ys, zs, ps), "carlson_rj_f64") >>> 0);
|
|
1494
1499
|
} finally {
|
|
1495
1500
|
__release(xs);
|
|
1496
1501
|
__release(ys);
|
|
@@ -1499,31 +1504,31 @@ async function instantiate(module, imports = {}) {
|
|
|
1499
1504
|
},
|
|
1500
1505
|
elliptic_f_incomplete_f64(phis, ms) {
|
|
1501
1506
|
// src/special/elliptic_f_incomplete_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1502
|
-
phis = __retain(__lowerTypedArray(Float64Array, 5, 3, phis) || __notnull());
|
|
1503
|
-
ms = __lowerTypedArray(Float64Array, 5, 3, ms) || __notnull();
|
|
1507
|
+
phis = __retain(__lowerTypedArray(Float64Array, 5, 3, phis, 6, "phis") || __notnull());
|
|
1508
|
+
ms = __lowerTypedArray(Float64Array, 5, 3, ms, 2, "ms") || __notnull();
|
|
1504
1509
|
try {
|
|
1505
|
-
return __liftTypedArray(Float64Array, exports.elliptic_f_incomplete_f64(phis, ms) >>> 0);
|
|
1510
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.elliptic_f_incomplete_f64(phis, ms), "elliptic_f_incomplete_f64") >>> 0);
|
|
1506
1511
|
} finally {
|
|
1507
1512
|
__release(phis);
|
|
1508
1513
|
}
|
|
1509
1514
|
},
|
|
1510
1515
|
elliptic_e_incomplete_f64(phis, ms) {
|
|
1511
1516
|
// src/special/elliptic_e_incomplete_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1512
|
-
phis = __retain(__lowerTypedArray(Float64Array, 5, 3, phis) || __notnull());
|
|
1513
|
-
ms = __lowerTypedArray(Float64Array, 5, 3, ms) || __notnull();
|
|
1517
|
+
phis = __retain(__lowerTypedArray(Float64Array, 5, 3, phis, 6, "phis") || __notnull());
|
|
1518
|
+
ms = __lowerTypedArray(Float64Array, 5, 3, ms, 2, "ms") || __notnull();
|
|
1514
1519
|
try {
|
|
1515
|
-
return __liftTypedArray(Float64Array, exports.elliptic_e_incomplete_f64(phis, ms) >>> 0);
|
|
1520
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.elliptic_e_incomplete_f64(phis, ms), "elliptic_e_incomplete_f64") >>> 0);
|
|
1516
1521
|
} finally {
|
|
1517
1522
|
__release(phis);
|
|
1518
1523
|
}
|
|
1519
1524
|
},
|
|
1520
1525
|
elliptic_pi_incomplete_f64(ns, phis, ms) {
|
|
1521
1526
|
// src/special/elliptic_pi_incomplete_f64(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1522
|
-
ns = __retain(__lowerTypedArray(Float64Array, 5, 3, ns) || __notnull());
|
|
1523
|
-
phis = __retain(__lowerTypedArray(Float64Array, 5, 3, phis) || __notnull());
|
|
1524
|
-
ms = __lowerTypedArray(Float64Array, 5, 3, ms) || __notnull();
|
|
1527
|
+
ns = __retain(__lowerTypedArray(Float64Array, 5, 3, ns, 6, "ns") || __notnull());
|
|
1528
|
+
phis = __retain(__lowerTypedArray(Float64Array, 5, 3, phis, 2, "phis") || __notnull());
|
|
1529
|
+
ms = __lowerTypedArray(Float64Array, 5, 3, ms, 2, "ms") || __notnull();
|
|
1525
1530
|
try {
|
|
1526
|
-
return __liftTypedArray(Float64Array, exports.elliptic_pi_incomplete_f64(ns, phis, ms) >>> 0);
|
|
1531
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.elliptic_pi_incomplete_f64(ns, phis, ms), "elliptic_pi_incomplete_f64") >>> 0);
|
|
1527
1532
|
} finally {
|
|
1528
1533
|
__release(ns);
|
|
1529
1534
|
__release(phis);
|
|
@@ -1531,18 +1536,18 @@ async function instantiate(module, imports = {}) {
|
|
|
1531
1536
|
},
|
|
1532
1537
|
sort_f64(data) {
|
|
1533
1538
|
// src/sort/sort_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Float64Array
|
|
1534
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1535
|
-
return __liftTypedArray(Float64Array, exports.sort_f64(data) >>> 0);
|
|
1539
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 5) || __notnull();
|
|
1540
|
+
return __liftTypedArray(Float64Array, __writeBack(exports.sort_f64(data), "sort_f64") >>> 0);
|
|
1536
1541
|
},
|
|
1537
1542
|
argsort_f64(data) {
|
|
1538
1543
|
// src/sort/argsort_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Int32Array
|
|
1539
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1540
|
-
return __liftTypedArray(Int32Array, exports.argsort_f64(data) >>> 0);
|
|
1544
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
1545
|
+
return __liftTypedArray(Int32Array, __writeBack(exports.argsort_f64(data), "argsort_f64") >>> 0);
|
|
1541
1546
|
},
|
|
1542
1547
|
rank_f64(data) {
|
|
1543
1548
|
// src/sort/rank_f64(~lib/typedarray/Float64Array) => ~lib/typedarray/Int32Array
|
|
1544
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1545
|
-
return __liftTypedArray(Int32Array, exports.rank_f64(data) >>> 0);
|
|
1549
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
1550
|
+
return __liftTypedArray(Int32Array, __writeBack(exports.rank_f64(data), "rank_f64") >>> 0);
|
|
1546
1551
|
},
|
|
1547
1552
|
complex_array_zeros(n) {
|
|
1548
1553
|
// src/ops/complex-array/complex_array_zeros(i32) => ~lib/typedarray/Float64Array
|
|
@@ -1558,46 +1563,46 @@ async function instantiate(module, imports = {}) {
|
|
|
1558
1563
|
},
|
|
1559
1564
|
complex_array_get(data, index) {
|
|
1560
1565
|
// src/ops/complex-array/complex_array_get(~lib/typedarray/Float64Array, i32) => src/types/complex/Complex
|
|
1561
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1562
|
-
return __liftInternref(exports.complex_array_get(data, index) >>> 0);
|
|
1566
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
1567
|
+
return __liftInternref(__writeBack(exports.complex_array_get(data, index), "complex_array_get") >>> 0);
|
|
1563
1568
|
},
|
|
1564
1569
|
complex_array_set(data, index, value) {
|
|
1565
1570
|
// src/ops/complex-array/complex_array_set(~lib/typedarray/Float64Array, i32, src/types/complex/Complex) => void
|
|
1566
|
-
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data) || __notnull());
|
|
1571
|
+
data = __retain(__lowerTypedArray(Float64Array, 5, 3, data, 5) || __notnull());
|
|
1567
1572
|
value = __lowerInternref(value) || __notnull();
|
|
1568
1573
|
try {
|
|
1569
|
-
exports.complex_array_set(data, index, value);
|
|
1574
|
+
__writeBack(exports.complex_array_set(data, index, value), "complex_array_set");
|
|
1570
1575
|
} finally {
|
|
1571
1576
|
__release(data);
|
|
1572
1577
|
}
|
|
1573
1578
|
},
|
|
1574
1579
|
complex_array_set_parts(data, index, re, im) {
|
|
1575
1580
|
// src/ops/complex-array/complex_array_set_parts(~lib/typedarray/Float64Array, i32, f64, f64) => void
|
|
1576
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1577
|
-
exports.complex_array_set_parts(data, index, re, im);
|
|
1581
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 5) || __notnull();
|
|
1582
|
+
__writeBack(exports.complex_array_set_parts(data, index, re, im), "complex_array_set_parts");
|
|
1578
1583
|
},
|
|
1579
1584
|
complex_array_get_re(data, index) {
|
|
1580
1585
|
// src/ops/complex-array/complex_array_get_re(~lib/typedarray/Float64Array, i32) => f64
|
|
1581
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1582
|
-
return exports.complex_array_get_re(data, index);
|
|
1586
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
1587
|
+
return __writeBack(exports.complex_array_get_re(data, index), "complex_array_get_re");
|
|
1583
1588
|
},
|
|
1584
1589
|
complex_array_get_im(data, index) {
|
|
1585
1590
|
// src/ops/complex-array/complex_array_get_im(~lib/typedarray/Float64Array, i32) => f64
|
|
1586
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1587
|
-
return exports.complex_array_get_im(data, index);
|
|
1591
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
1592
|
+
return __writeBack(exports.complex_array_get_im(data, index), "complex_array_get_im");
|
|
1588
1593
|
},
|
|
1589
1594
|
complex_array_length(data) {
|
|
1590
1595
|
// src/ops/complex-array/complex_array_length(~lib/typedarray/Float64Array) => i32
|
|
1591
|
-
data = __lowerTypedArray(Float64Array, 5, 3, data) || __notnull();
|
|
1592
|
-
return exports.complex_array_length(data);
|
|
1596
|
+
data = __lowerTypedArray(Float64Array, 5, 3, data, 6, "data") || __notnull();
|
|
1597
|
+
return __writeBack(exports.complex_array_length(data), "complex_array_length");
|
|
1593
1598
|
},
|
|
1594
1599
|
complex_array_add(a, b, result) {
|
|
1595
1600
|
// src/ops/complex-array/complex_array_add(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1596
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1597
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
1598
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1601
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1602
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
1603
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1599
1604
|
try {
|
|
1600
|
-
exports.complex_array_add(a, b, result);
|
|
1605
|
+
__writeBack(exports.complex_array_add(a, b, result), "complex_array_add");
|
|
1601
1606
|
} finally {
|
|
1602
1607
|
__release(a);
|
|
1603
1608
|
__release(b);
|
|
@@ -1605,11 +1610,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1605
1610
|
},
|
|
1606
1611
|
complex_array_sub(a, b, result) {
|
|
1607
1612
|
// src/ops/complex-array/complex_array_sub(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1608
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1609
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
1610
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1613
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1614
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
1615
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1611
1616
|
try {
|
|
1612
|
-
exports.complex_array_sub(a, b, result);
|
|
1617
|
+
__writeBack(exports.complex_array_sub(a, b, result), "complex_array_sub");
|
|
1613
1618
|
} finally {
|
|
1614
1619
|
__release(a);
|
|
1615
1620
|
__release(b);
|
|
@@ -1617,11 +1622,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1617
1622
|
},
|
|
1618
1623
|
complex_array_mul(a, b, result) {
|
|
1619
1624
|
// src/ops/complex-array/complex_array_mul(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1620
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1621
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
1622
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1625
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1626
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
1627
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1623
1628
|
try {
|
|
1624
|
-
exports.complex_array_mul(a, b, result);
|
|
1629
|
+
__writeBack(exports.complex_array_mul(a, b, result), "complex_array_mul");
|
|
1625
1630
|
} finally {
|
|
1626
1631
|
__release(a);
|
|
1627
1632
|
__release(b);
|
|
@@ -1629,11 +1634,11 @@ async function instantiate(module, imports = {}) {
|
|
|
1629
1634
|
},
|
|
1630
1635
|
complex_array_div(a, b, result) {
|
|
1631
1636
|
// src/ops/complex-array/complex_array_div(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1632
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1633
|
-
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b) || __notnull());
|
|
1634
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1637
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1638
|
+
b = __retain(__lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull());
|
|
1639
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1635
1640
|
try {
|
|
1636
|
-
exports.complex_array_div(a, b, result);
|
|
1641
|
+
__writeBack(exports.complex_array_div(a, b, result), "complex_array_div");
|
|
1637
1642
|
} finally {
|
|
1638
1643
|
__release(a);
|
|
1639
1644
|
__release(b);
|
|
@@ -1641,191 +1646,180 @@ async function instantiate(module, imports = {}) {
|
|
|
1641
1646
|
},
|
|
1642
1647
|
complex_array_scale_real(a, scalar, result) {
|
|
1643
1648
|
// src/ops/complex-array/complex_array_scale_real(~lib/typedarray/Float64Array, f64, ~lib/typedarray/Float64Array) => void
|
|
1644
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1645
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1649
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1650
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1646
1651
|
try {
|
|
1647
|
-
exports.complex_array_scale_real(a, scalar, result);
|
|
1652
|
+
__writeBack(exports.complex_array_scale_real(a, scalar, result), "complex_array_scale_real");
|
|
1648
1653
|
} finally {
|
|
1649
1654
|
__release(a);
|
|
1650
1655
|
}
|
|
1651
1656
|
},
|
|
1652
1657
|
complex_array_scale_complex(a, re, im, result) {
|
|
1653
1658
|
// src/ops/complex-array/complex_array_scale_complex(~lib/typedarray/Float64Array, f64, f64, ~lib/typedarray/Float64Array) => void
|
|
1654
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1655
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1659
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1660
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1656
1661
|
try {
|
|
1657
|
-
exports.complex_array_scale_complex(a, re, im, result);
|
|
1662
|
+
__writeBack(exports.complex_array_scale_complex(a, re, im, result), "complex_array_scale_complex");
|
|
1658
1663
|
} finally {
|
|
1659
1664
|
__release(a);
|
|
1660
1665
|
}
|
|
1661
1666
|
},
|
|
1662
1667
|
complex_array_neg(a, result) {
|
|
1663
1668
|
// src/ops/complex-array/complex_array_neg(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1664
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1665
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1669
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1670
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1666
1671
|
try {
|
|
1667
|
-
exports.complex_array_neg(a, result);
|
|
1672
|
+
__writeBack(exports.complex_array_neg(a, result), "complex_array_neg");
|
|
1668
1673
|
} finally {
|
|
1669
1674
|
__release(a);
|
|
1670
1675
|
}
|
|
1671
1676
|
},
|
|
1672
1677
|
complex_array_conj(a, result) {
|
|
1673
1678
|
// src/ops/complex-array/complex_array_conj(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1674
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1675
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1679
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1680
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1676
1681
|
try {
|
|
1677
|
-
exports.complex_array_conj(a, result);
|
|
1682
|
+
__writeBack(exports.complex_array_conj(a, result), "complex_array_conj");
|
|
1678
1683
|
} finally {
|
|
1679
1684
|
__release(a);
|
|
1680
1685
|
}
|
|
1681
1686
|
},
|
|
1682
1687
|
complex_array_abs(a, result) {
|
|
1683
1688
|
// src/ops/complex-array/complex_array_abs(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1684
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1685
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1689
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1690
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1686
1691
|
try {
|
|
1687
|
-
exports.complex_array_abs(a, result);
|
|
1692
|
+
__writeBack(exports.complex_array_abs(a, result), "complex_array_abs");
|
|
1688
1693
|
} finally {
|
|
1689
1694
|
__release(a);
|
|
1690
1695
|
}
|
|
1691
1696
|
},
|
|
1692
1697
|
complex_array_arg(a, result) {
|
|
1693
1698
|
// src/ops/complex-array/complex_array_arg(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1694
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1695
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1699
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1700
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1696
1701
|
try {
|
|
1697
|
-
exports.complex_array_arg(a, result);
|
|
1702
|
+
__writeBack(exports.complex_array_arg(a, result), "complex_array_arg");
|
|
1698
1703
|
} finally {
|
|
1699
1704
|
__release(a);
|
|
1700
1705
|
}
|
|
1701
1706
|
},
|
|
1702
1707
|
complex_array_abs_squared(a, result) {
|
|
1703
1708
|
// src/ops/complex-array/complex_array_abs_squared(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1704
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1705
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1709
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1710
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1706
1711
|
try {
|
|
1707
|
-
exports.complex_array_abs_squared(a, result);
|
|
1712
|
+
__writeBack(exports.complex_array_abs_squared(a, result), "complex_array_abs_squared");
|
|
1708
1713
|
} finally {
|
|
1709
1714
|
__release(a);
|
|
1710
1715
|
}
|
|
1711
1716
|
},
|
|
1712
1717
|
complex_array_real(a, result) {
|
|
1713
1718
|
// src/ops/complex-array/complex_array_real(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1714
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1715
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1719
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1720
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1716
1721
|
try {
|
|
1717
|
-
exports.complex_array_real(a, result);
|
|
1722
|
+
__writeBack(exports.complex_array_real(a, result), "complex_array_real");
|
|
1718
1723
|
} finally {
|
|
1719
1724
|
__release(a);
|
|
1720
1725
|
}
|
|
1721
1726
|
},
|
|
1722
1727
|
complex_array_imag(a, result) {
|
|
1723
1728
|
// src/ops/complex-array/complex_array_imag(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1724
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1725
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1729
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1730
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1726
1731
|
try {
|
|
1727
|
-
exports.complex_array_imag(a, result);
|
|
1732
|
+
__writeBack(exports.complex_array_imag(a, result), "complex_array_imag");
|
|
1728
1733
|
} finally {
|
|
1729
1734
|
__release(a);
|
|
1730
1735
|
}
|
|
1731
1736
|
},
|
|
1732
1737
|
complex_array_exp(a, result) {
|
|
1733
1738
|
// src/ops/complex-array/complex_array_exp(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1734
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1735
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1739
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1740
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1736
1741
|
try {
|
|
1737
|
-
exports.complex_array_exp(a, result);
|
|
1742
|
+
__writeBack(exports.complex_array_exp(a, result), "complex_array_exp");
|
|
1738
1743
|
} finally {
|
|
1739
1744
|
__release(a);
|
|
1740
1745
|
}
|
|
1741
1746
|
},
|
|
1742
1747
|
complex_array_log(a, result) {
|
|
1743
1748
|
// src/ops/complex-array/complex_array_log(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1744
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1745
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1749
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1750
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1746
1751
|
try {
|
|
1747
|
-
exports.complex_array_log(a, result);
|
|
1752
|
+
__writeBack(exports.complex_array_log(a, result), "complex_array_log");
|
|
1748
1753
|
} finally {
|
|
1749
1754
|
__release(a);
|
|
1750
1755
|
}
|
|
1751
1756
|
},
|
|
1752
1757
|
complex_array_sqrt(a, result) {
|
|
1753
1758
|
// src/ops/complex-array/complex_array_sqrt(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1754
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1755
|
-
result = __lowerTypedArray(Float64Array, 5, 3, result) || __notnull();
|
|
1759
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1760
|
+
result = __lowerTypedArray(Float64Array, 5, 3, result, 1) || __notnull();
|
|
1756
1761
|
try {
|
|
1757
|
-
exports.complex_array_sqrt(a, result);
|
|
1762
|
+
__writeBack(exports.complex_array_sqrt(a, result), "complex_array_sqrt");
|
|
1758
1763
|
} finally {
|
|
1759
1764
|
__release(a);
|
|
1760
1765
|
}
|
|
1761
1766
|
},
|
|
1762
1767
|
complex_array_sum(a) {
|
|
1763
1768
|
// src/ops/complex-array/complex_array_sum(~lib/typedarray/Float64Array) => src/types/complex/Complex
|
|
1764
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
1765
|
-
return __liftInternref(exports.complex_array_sum(a) >>> 0);
|
|
1769
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull();
|
|
1770
|
+
return __liftInternref(__writeBack(exports.complex_array_sum(a), "complex_array_sum") >>> 0);
|
|
1766
1771
|
},
|
|
1767
1772
|
complex_array_mean(a) {
|
|
1768
1773
|
// src/ops/complex-array/complex_array_mean(~lib/typedarray/Float64Array) => src/types/complex/Complex
|
|
1769
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
1770
|
-
return __liftInternref(exports.complex_array_mean(a) >>> 0);
|
|
1774
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull();
|
|
1775
|
+
return __liftInternref(__writeBack(exports.complex_array_mean(a), "complex_array_mean") >>> 0);
|
|
1771
1776
|
},
|
|
1772
1777
|
complex_array_dot(a, b) {
|
|
1773
1778
|
// src/ops/complex-array/complex_array_dot(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => src/types/complex/Complex
|
|
1774
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1775
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
1779
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull());
|
|
1780
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
1776
1781
|
try {
|
|
1777
|
-
return __liftInternref(exports.complex_array_dot(a, b) >>> 0);
|
|
1782
|
+
return __liftInternref(__writeBack(exports.complex_array_dot(a, b), "complex_array_dot") >>> 0);
|
|
1778
1783
|
} finally {
|
|
1779
1784
|
__release(a);
|
|
1780
1785
|
}
|
|
1781
1786
|
},
|
|
1782
1787
|
complex_array_norm(a) {
|
|
1783
1788
|
// src/ops/complex-array/complex_array_norm(~lib/typedarray/Float64Array) => f64
|
|
1784
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
1785
|
-
return exports.complex_array_norm(a);
|
|
1789
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 6, "a") || __notnull();
|
|
1790
|
+
return __writeBack(exports.complex_array_norm(a), "complex_array_norm");
|
|
1786
1791
|
},
|
|
1787
1792
|
complex_array_scale_inplace(a, scalar) {
|
|
1788
1793
|
// src/ops/complex-array/complex_array_scale_inplace(~lib/typedarray/Float64Array, f64) => void
|
|
1789
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
1790
|
-
exports.complex_array_scale_inplace(a, scalar);
|
|
1794
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull();
|
|
1795
|
+
__writeBack(exports.complex_array_scale_inplace(a, scalar), "complex_array_scale_inplace");
|
|
1791
1796
|
},
|
|
1792
1797
|
complex_array_conj_inplace(a) {
|
|
1793
1798
|
// src/ops/complex-array/complex_array_conj_inplace(~lib/typedarray/Float64Array) => void
|
|
1794
|
-
a = __lowerTypedArray(Float64Array, 5, 3, a) || __notnull();
|
|
1795
|
-
exports.complex_array_conj_inplace(a);
|
|
1799
|
+
a = __lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull();
|
|
1800
|
+
__writeBack(exports.complex_array_conj_inplace(a), "complex_array_conj_inplace");
|
|
1796
1801
|
},
|
|
1797
1802
|
complex_array_add_inplace(a, b) {
|
|
1798
1803
|
// src/ops/complex-array/complex_array_add_inplace(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1799
|
-
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a) || __notnull());
|
|
1800
|
-
b = __lowerTypedArray(Float64Array, 5, 3, b) || __notnull();
|
|
1804
|
+
a = __retain(__lowerTypedArray(Float64Array, 5, 3, a, 5) || __notnull());
|
|
1805
|
+
b = __lowerTypedArray(Float64Array, 5, 3, b, 2, "b") || __notnull();
|
|
1801
1806
|
try {
|
|
1802
|
-
exports.complex_array_add_inplace(a, b);
|
|
1807
|
+
__writeBack(exports.complex_array_add_inplace(a, b), "complex_array_add_inplace");
|
|
1803
1808
|
} finally {
|
|
1804
1809
|
__release(a);
|
|
1805
1810
|
}
|
|
1806
1811
|
},
|
|
1807
1812
|
complex_array_copy(src, dst) {
|
|
1808
1813
|
// src/ops/complex-array/complex_array_copy(~lib/typedarray/Float64Array, ~lib/typedarray/Float64Array) => void
|
|
1809
|
-
src = __retain(__lowerTypedArray(Float64Array, 5, 3, src) || __notnull());
|
|
1810
|
-
dst = __lowerTypedArray(Float64Array, 5, 3, dst) || __notnull();
|
|
1814
|
+
src = __retain(__lowerTypedArray(Float64Array, 5, 3, src, 6, "src") || __notnull());
|
|
1815
|
+
dst = __lowerTypedArray(Float64Array, 5, 3, dst, 1) || __notnull();
|
|
1811
1816
|
try {
|
|
1812
|
-
exports.complex_array_copy(src, dst);
|
|
1817
|
+
__writeBack(exports.complex_array_copy(src, dst), "complex_array_copy");
|
|
1813
1818
|
} finally {
|
|
1814
1819
|
__release(src);
|
|
1815
1820
|
}
|
|
1816
1821
|
},
|
|
1817
1822
|
}, exports);
|
|
1818
|
-
function __liftString(pointer) {
|
|
1819
|
-
if (!pointer) return null;
|
|
1820
|
-
const
|
|
1821
|
-
end = pointer + new Uint32Array(memory.buffer)[pointer - 4 >>> 2] >>> 1,
|
|
1822
|
-
memoryU16 = new Uint16Array(memory.buffer);
|
|
1823
|
-
let
|
|
1824
|
-
start = pointer >>> 1,
|
|
1825
|
-
string = "";
|
|
1826
|
-
while (end - start > 1024) string += String.fromCharCode(...memoryU16.subarray(start, start += 1024));
|
|
1827
|
-
return string + String.fromCharCode(...memoryU16.subarray(start, end));
|
|
1828
|
-
}
|
|
1829
1823
|
function __liftTypedArray(constructor, pointer) {
|
|
1830
1824
|
if (!pointer) return null;
|
|
1831
1825
|
return new constructor(
|
|
@@ -1834,7 +1828,10 @@ async function instantiate(module, imports = {}) {
|
|
|
1834
1828
|
__dataview.getUint32(pointer + 8, true) / constructor.BYTES_PER_ELEMENT
|
|
1835
1829
|
).slice();
|
|
1836
1830
|
}
|
|
1837
|
-
|
|
1831
|
+
/* mathts: typed-array write-back */
|
|
1832
|
+
const __out = [];
|
|
1833
|
+
function __lowerTypedArray(constructor, id, align, values, track, name) {
|
|
1834
|
+
if (track & 4) __out.length = 0;
|
|
1838
1835
|
if (values == null) return 0;
|
|
1839
1836
|
const
|
|
1840
1837
|
length = values.length,
|
|
@@ -1845,8 +1842,29 @@ async function instantiate(module, imports = {}) {
|
|
|
1845
1842
|
__dataview.setUint32(header + 8, length << align, true);
|
|
1846
1843
|
new constructor(memory.buffer, buffer, length).set(values);
|
|
1847
1844
|
exports.__unpin(buffer);
|
|
1845
|
+
if (track) __out.push({ values, header, constructor, track, name, snapshot: track & 2 ? new constructor(memory.buffer, buffer, length).slice() : null });
|
|
1848
1846
|
return header;
|
|
1849
1847
|
}
|
|
1848
|
+
function __writeBack(result, exportName) {
|
|
1849
|
+
for (const { values, header, constructor, track, name, snapshot } of __out.splice(0)) {
|
|
1850
|
+
const view = new constructor(
|
|
1851
|
+
memory.buffer,
|
|
1852
|
+
__getU32(header + 4),
|
|
1853
|
+
__dataview.getUint32(header + 8, true) / constructor.BYTES_PER_ELEMENT
|
|
1854
|
+
);
|
|
1855
|
+
if (track & 2) {
|
|
1856
|
+
for (let i = 0; i < snapshot.length; i++) {
|
|
1857
|
+
if (!Object.is(view[i], snapshot[i])) {
|
|
1858
|
+
throw Error(`mathts glue: ${exportName} wrote its input parameter ${name}`);
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
continue;
|
|
1862
|
+
}
|
|
1863
|
+
if (ArrayBuffer.isView(values)) values.set(view);
|
|
1864
|
+
else for (let i = 0; i < view.length; i++) values[i] = view[i];
|
|
1865
|
+
}
|
|
1866
|
+
return result;
|
|
1867
|
+
}
|
|
1850
1868
|
class Internref extends Number {}
|
|
1851
1869
|
const registry = new FinalizationRegistry(__release);
|
|
1852
1870
|
function __liftInternref(pointer) {
|
|
@@ -1897,7 +1915,38 @@ async function instantiate(module, imports = {}) {
|
|
|
1897
1915
|
return __dataview.getUint32(pointer, true);
|
|
1898
1916
|
}
|
|
1899
1917
|
}
|
|
1900
|
-
|
|
1918
|
+
function __liftString(pointer) {
|
|
1919
|
+
if (!pointer) return null;
|
|
1920
|
+
const end = pointer + new Uint32Array(memory.buffer)[pointer - 4 >>> 2] >>> 1,
|
|
1921
|
+
memoryU16 = new Uint16Array(memory.buffer);
|
|
1922
|
+
let start = pointer >>> 1, string = "";
|
|
1923
|
+
while (end - start > 1024) string += String.fromCharCode(...memoryU16.subarray(start, start += 1024));
|
|
1924
|
+
return string + String.fromCharCode(...memoryU16.subarray(start, end));
|
|
1925
|
+
}
|
|
1926
|
+
function __abortError(error) {
|
|
1927
|
+
if (!(error instanceof WebAssembly.RuntimeError) || !exports.abort_take()) return error;
|
|
1928
|
+
const message = __liftString(exports.abort_message() >>> 0);
|
|
1929
|
+
const fileName = __liftString(exports.abort_file() >>> 0);
|
|
1930
|
+
return Error(`${message} in ${fileName}:${exports.abort_line() >>> 0}:${exports.abort_column() >>> 0}`, { cause: error });
|
|
1931
|
+
}
|
|
1932
|
+
function __abortAware(adapted) {
|
|
1933
|
+
const guarded = {};
|
|
1934
|
+
for (const key of new Set([...Object.keys(exports), ...Object.keys(adapted)])) {
|
|
1935
|
+
const value = adapted[key];
|
|
1936
|
+
guarded[key] =
|
|
1937
|
+
typeof value === "function" && !key.startsWith("abort_")
|
|
1938
|
+
? (...args) => {
|
|
1939
|
+
try {
|
|
1940
|
+
return value(...args);
|
|
1941
|
+
} catch (error) {
|
|
1942
|
+
throw __abortError(error);
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
: value;
|
|
1946
|
+
}
|
|
1947
|
+
return guarded;
|
|
1948
|
+
}
|
|
1949
|
+
return __abortAware(adaptedExports);
|
|
1901
1950
|
}
|
|
1902
1951
|
export const {
|
|
1903
1952
|
memory,
|
|
@@ -1907,6 +1956,11 @@ export const {
|
|
|
1907
1956
|
__collect,
|
|
1908
1957
|
__rtti_base,
|
|
1909
1958
|
heap_reset,
|
|
1959
|
+
abort_take,
|
|
1960
|
+
abort_message,
|
|
1961
|
+
abort_file,
|
|
1962
|
+
abort_line,
|
|
1963
|
+
abort_column,
|
|
1910
1964
|
complex,
|
|
1911
1965
|
complexFromPolar,
|
|
1912
1966
|
add_f64,
|