[linalg.algs.blas1.scal]

# 29 Numerics library [[numerics]](./#numerics)

## 29.9 Basic linear algebra algorithms [[linalg]](linalg#algs.blas1.scal)

### 29.9.13 BLAS 1 algorithms [[linalg.algs.blas1]](linalg.algs.blas1#scal)

#### 29.9.13.4 Multiply the elements of an object in place by a scalar [linalg.algs.blas1.scal]

[ð](#lib:scale)

`template<class Scalar, [inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutObj>
  void scale(Scalar alpha, InOutObj x);
template<class ExecutionPolicy, class Scalar, [inout-object](linalg.helpers.concepts#concept:inout-object "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutObj>
  void scale(ExecutionPolicy&& exec, Scalar alpha, InOutObj x);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L13498)

[*Note [1](#note-1)*:

These functions correspond to the BLAS function xSCAL[[bib]](bibliography#bib:blas1 "Bibliography")[.](#1.sentence-1)

â *end note*]

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L13503)

*Effects*: Overwrites x with the result of
computing the elementwise multiplication Î±x,
where the scalar Î± is alpha[.](#2.sentence-1)
