45 lines
1.3 KiB
Markdown
45 lines
1.3 KiB
Markdown
[simd.subscr]
|
||
|
||
# 29 Numerics library [[numerics]](./#numerics)
|
||
|
||
## 29.10 Data-parallel types [[simd]](simd#subscr)
|
||
|
||
### 29.10.7 Class template basic_vec [[simd.class]](simd.class#simd.subscr)
|
||
|
||
#### 29.10.7.3 basic_vec subscript operator [simd.subscr]
|
||
|
||
[ð](#lib:operator%5b%5d,basic_vec)
|
||
|
||
`constexpr value_type operator[](simd-size-type i) const;
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17903)
|
||
|
||
*Preconditions*: i >= 0 && i < size() is true[.](#1.sentence-1)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17907)
|
||
|
||
*Returns*: The value of the ith element[.](#2.sentence-1)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17911)
|
||
|
||
*Throws*: Nothing[.](#3.sentence-1)
|
||
|
||
[ð](#lib:operator%5b%5d,basic_vec_)
|
||
|
||
`template<[simd-integral](simd.expos#concept:simd-integral "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") I>
|
||
constexpr resize_t<I::size(), basic_vec> operator[](const I& indices) const;
|
||
`
|
||
|
||
[4](#4)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17923)
|
||
|
||
*Effects*: Equivalent to: return permute(*this, indices);
|