Files
2025-10-25 03:02:53 +03:00

31 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[simd.permute.dynamic]
# 29 Numerics library [[numerics]](./#numerics)
## 29.10 Data-parallel types [[simd]](simd#permute.dynamic)
### 29.10.8 basic_vec non-member operations [[simd.nonmembers]](simd.nonmembers#simd.permute.dynamic)
#### 29.10.8.8 vec dynamic permute [simd.permute.dynamic]
[🔗](#lib:permute,simd)
`template<[simd-vec-type](simd.expos#concept:simd-vec-type "29.10.2Exposition-only types, variables, and concepts[simd.expos]") V, [simd-integral](simd.expos#concept:simd-integral "29.10.2Exposition-only types, variables, and concepts[simd.expos]") I>
constexpr resize_t<I::size(), V> permute(const V& v, const I& indices);
template<[simd-mask-type](simd.expos#concept:simd-mask-type "29.10.2Exposition-only types, variables, and concepts[simd.expos]") M, [simd-integral](simd.expos#concept:simd-integral "29.10.2Exposition-only types, variables, and concepts[simd.expos]") I>
constexpr resize_t<I::size(), M> permute(const M& v, const I& indices);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L18825)
*Preconditions*: All values in indices are in the range [0, V::size())[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L18829)
*Returns*: A data-parallel object where the ith element is initialized to the result of v[indices[i]] for all i in
the range [0, I::size())[.](#2.sentence-1)