@@ -126,6 +126,24 @@ extension SIMD${n} where Scalar == ${Scalar} {
126
126
Builtin . cmp_ ${ s} ge_${ Builtin} ( a. _storage. _value, b. _storage. _value)
127
127
)
128
128
}
129
+
130
+ /// The wrapping sum of two vectors.
131
+ @_alwaysEmitIntoClient
132
+ public static func &+ ( a: Self, b: Self) - > Self{
133
+ Self ( Builtin . add_ ${ Builtin} ( a. _storage. _value, b. _storage. _value) )
134
+ }
135
+
136
+ /// The wrapping difference of two vectors.
137
+ @_alwaysEmitIntoClient
138
+ public static func &- ( a: Self, b: Self) - > Self{
139
+ Self ( Builtin . sub_ ${ Builtin} ( a. _storage. _value, b. _storage. _value) )
140
+ }
141
+
142
+ /// The pointwise wrapping product of two vectors.
143
+ @_alwaysEmitIntoClient
144
+ public static func &* ( a: Self, b: Self) - > Self{
145
+ Self ( Builtin . mul_ ${ Builtin} ( a. _storage. _value, b. _storage. _value) )
146
+ }
129
147
}
130
148
131
149
% end
@@ -193,6 +211,30 @@ extension SIMD${n} where Scalar == ${Scalar} {
193
211
Builtin . fcmp_oge_ ${ Builtin} ( a. _storage. _value, b. _storage. _value)
194
212
)
195
213
}
214
+
215
+ /// The sum of two vectors.
216
+ @_alwaysEmitIntoClient
217
+ public static func + ( a: Self, b: Self) - > Self{
218
+ Self ( Builtin . fadd_ ${ Builtin} ( a. _storage. _value, b. _storage. _value) )
219
+ }
220
+
221
+ /// The difference of two vectors.
222
+ @_alwaysEmitIntoClient
223
+ public static func - ( a: Self, b: Self) - > Self{
224
+ Self ( Builtin . fsub_ ${ Builtin} ( a. _storage. _value, b. _storage. _value) )
225
+ }
226
+
227
+ /// The pointwise product of two vectors.
228
+ @_alwaysEmitIntoClient
229
+ public static func * ( a: Self, b: Self) - > Self{
230
+ Self ( Builtin . fmul_ ${ Builtin} ( a. _storage. _value, b. _storage. _value) )
231
+ }
232
+
233
+ /// The pointwise quotient of two vectors.
234
+ @_alwaysEmitIntoClient
235
+ public static func / ( a: Self, b: Self) - > Self{
236
+ Self ( Builtin . fdiv_ ${ Builtin} ( a. _storage. _value, b. _storage. _value) )
237
+ }
196
238
}
197
239
% if bits == 16 :
198
240
#endif
0 commit comments