@@ -213,27 +213,30 @@ public extension Tensor where Scalar: Numeric {
213
213
return lhs - Tensor( rhs)
214
214
}
215
215
216
- /// Returns the tensor produced by adding the two tensors .
216
+ /// Adds two tensors and stores the result in the left-hand-side variable .
217
217
/// - Note: `+=` supports broadcasting.
218
218
@inlinable
219
219
static func += ( lhs: inout Tensor , rhs: Tensor ) {
220
220
lhs = lhs + rhs
221
221
}
222
222
223
- /// Returns the scalar by adding it to every scalar of the tensor.
223
+ /// Adds the scalar to every scalar of the tensor and stores the result in the left-hand-side
224
+ /// variable.
224
225
@inlinable
225
226
static func += ( lhs: inout Tensor , rhs: Scalar ) {
226
227
lhs = lhs + rhs
227
228
}
228
229
229
- /// Returns the tensor by subracting the second tensor from the first.
230
+ /// Subtracts the second tensor from the first and stores the result in the left-hand-side
231
+ /// variable.
230
232
/// - Note: `-=` supports broadcasting.
231
233
@inlinable
232
234
static func -= ( lhs: inout Tensor , rhs: Tensor ) {
233
235
lhs = lhs - rhs
234
236
}
235
237
236
- /// Returns the scalar by subtracting every scalar of the tensor from it.
238
+ /// Subtracts the scalar from every scalar of the tensor and stores the result in the
239
+ /// left-hand-side variable.
237
240
@inlinable
238
241
static func -= ( lhs: inout Tensor , rhs: Scalar ) {
239
242
lhs = lhs - rhs
@@ -261,14 +264,14 @@ public extension Tensor where Scalar: Numeric {
261
264
return lhs * Tensor( rhs)
262
265
}
263
266
264
- /// Returns the tensor produced by multiplying the two tensors .
267
+ /// Multiplies two tensors and stores the result in the left-hand-side variable .
265
268
/// - Note: `*=` supports broadcasting.
266
269
@inlinable
267
270
static func *= ( lhs: inout Tensor , rhs: Tensor ) {
268
271
lhs = lhs * rhs
269
272
}
270
273
271
- /// Returns the tensor by multiplying it with the scalar, broadcasting the scalar.
274
+ /// Multiplies the tensor with the scalar, broadcasting the scalar, and stores the result in the
272
275
/// left-hand-side variable.
273
276
@inlinable
274
277
static func *= ( lhs: inout Tensor , rhs: Scalar ) {
0 commit comments