@stdlib/blas-base-wasm-dsdot 0.1.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/src/main.wat ADDED
@@ -0,0 +1,233 @@
1
+ ;; @license Apache-2.0
2
+ ;;
3
+ ;; Copyright (c) 2025 The Stdlib Authors.
4
+ ;;
5
+ ;; Licensed under the Apache License, Version 2.0 (the "License");
6
+ ;; you may not use this file except in compliance with the License.
7
+ ;; You may obtain a copy of the License at
8
+ ;;
9
+ ;; http://www.apache.org/licenses/LICENSE-2.0
10
+ ;;
11
+ ;; Unless required by applicable law or agreed to in writing, software
12
+ ;; distributed under the License is distributed on an "AS IS" BASIS,
13
+ ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ;; See the License for the specific language governing permissions and
15
+ ;; limitations under the License.
16
+
17
+ (module
18
+ (type (;0;) (func))
19
+ (type (;1;) (func (param i32 i32 i32 i32 i32) (result f64)))
20
+ (type (;2;) (func (param i32 i32 i32 i32 i32 i32 i32) (result f64)))
21
+ (import "env" "memory" (memory (;0;) 0))
22
+ (func (;0;) (type 0)
23
+ nop)
24
+ (func (;1;) (type 1) (param i32 i32 i32 i32 i32) (result f64)
25
+ local.get 0
26
+ local.get 1
27
+ local.get 2
28
+ i32.const 1
29
+ local.get 0
30
+ i32.sub
31
+ local.tee 0
32
+ local.get 2
33
+ i32.mul
34
+ i32.const 0
35
+ local.get 2
36
+ i32.const 0
37
+ i32.le_s
38
+ select
39
+ local.get 3
40
+ local.get 4
41
+ local.get 0
42
+ local.get 4
43
+ i32.mul
44
+ i32.const 0
45
+ local.get 4
46
+ i32.const 0
47
+ i32.le_s
48
+ select
49
+ call 2)
50
+ (func (;2;) (type 2) (param i32 i32 i32 i32 i32 i32 i32) (result f64)
51
+ (local i32 f64)
52
+ block ;; label = @1
53
+ local.get 0
54
+ i32.const 0
55
+ i32.le_s
56
+ if ;; label = @2
57
+ br 1 (;@1;)
58
+ end
59
+ local.get 2
60
+ i32.const 1
61
+ i32.ne
62
+ local.get 5
63
+ i32.const 1
64
+ i32.ne
65
+ i32.or
66
+ i32.eqz
67
+ if ;; label = @2
68
+ block ;; label = @3
69
+ local.get 0
70
+ i32.const 5
71
+ i32.rem_u
72
+ local.tee 5
73
+ i32.eqz
74
+ br_if 0 (;@3;)
75
+ loop ;; label = @4
76
+ local.get 5
77
+ local.get 7
78
+ i32.eq
79
+ br_if 1 (;@3;)
80
+ local.get 1
81
+ local.get 3
82
+ i32.const 2
83
+ i32.shl
84
+ i32.add
85
+ f32.load
86
+ f64.promote_f32
87
+ local.get 4
88
+ local.get 6
89
+ i32.const 2
90
+ i32.shl
91
+ i32.add
92
+ f32.load
93
+ f64.promote_f32
94
+ f64.mul
95
+ local.get 8
96
+ f64.add
97
+ local.set 8
98
+ local.get 7
99
+ i32.const 1
100
+ i32.add
101
+ local.set 7
102
+ local.get 6
103
+ i32.const 1
104
+ i32.add
105
+ local.set 6
106
+ local.get 3
107
+ i32.const 1
108
+ i32.add
109
+ local.set 3
110
+ br 0 (;@4;)
111
+ end
112
+ unreachable
113
+ end
114
+ local.get 0
115
+ i32.const 5
116
+ i32.lt_s
117
+ br_if 1 (;@1;)
118
+ loop ;; label = @3
119
+ local.get 0
120
+ local.get 5
121
+ i32.le_s
122
+ br_if 2 (;@1;)
123
+ local.get 8
124
+ local.get 1
125
+ local.get 3
126
+ i32.const 2
127
+ i32.shl
128
+ i32.add
129
+ local.tee 2
130
+ f32.load offset=16
131
+ f64.promote_f32
132
+ local.get 4
133
+ local.get 6
134
+ i32.const 2
135
+ i32.shl
136
+ i32.add
137
+ local.tee 7
138
+ f32.load offset=16
139
+ f64.promote_f32
140
+ f64.mul
141
+ local.get 2
142
+ f32.load offset=12
143
+ f64.promote_f32
144
+ local.get 7
145
+ f32.load offset=12
146
+ f64.promote_f32
147
+ f64.mul
148
+ local.get 2
149
+ f32.load offset=8
150
+ f64.promote_f32
151
+ local.get 7
152
+ f32.load offset=8
153
+ f64.promote_f32
154
+ f64.mul
155
+ local.get 2
156
+ f32.load
157
+ f64.promote_f32
158
+ local.get 7
159
+ f32.load
160
+ f64.promote_f32
161
+ f64.mul
162
+ local.get 2
163
+ f32.load offset=4
164
+ f64.promote_f32
165
+ local.get 7
166
+ f32.load offset=4
167
+ f64.promote_f32
168
+ f64.mul
169
+ f64.add
170
+ f64.add
171
+ f64.add
172
+ f64.add
173
+ f64.add
174
+ local.set 8
175
+ local.get 5
176
+ i32.const 5
177
+ i32.add
178
+ local.set 5
179
+ local.get 6
180
+ i32.const 5
181
+ i32.add
182
+ local.set 6
183
+ local.get 3
184
+ i32.const 5
185
+ i32.add
186
+ local.set 3
187
+ br 0 (;@3;)
188
+ end
189
+ unreachable
190
+ end
191
+ loop ;; label = @2
192
+ local.get 0
193
+ local.get 7
194
+ i32.eq
195
+ br_if 1 (;@1;)
196
+ local.get 1
197
+ local.get 3
198
+ i32.const 2
199
+ i32.shl
200
+ i32.add
201
+ f32.load
202
+ f64.promote_f32
203
+ local.get 4
204
+ local.get 6
205
+ i32.const 2
206
+ i32.shl
207
+ i32.add
208
+ f32.load
209
+ f64.promote_f32
210
+ f64.mul
211
+ local.get 8
212
+ f64.add
213
+ local.set 8
214
+ local.get 7
215
+ i32.const 1
216
+ i32.add
217
+ local.set 7
218
+ local.get 5
219
+ local.get 6
220
+ i32.add
221
+ local.set 6
222
+ local.get 2
223
+ local.get 3
224
+ i32.add
225
+ local.set 3
226
+ br 0 (;@2;)
227
+ end
228
+ unreachable
229
+ end
230
+ local.get 8)
231
+ (export "__wasm_call_ctors" (func 0))
232
+ (export "c_dsdot" (func 1))
233
+ (export "c_dsdot_ndarray" (func 2)))