49 lines
1.9 KiB
Markdown
49 lines
1.9 KiB
Markdown
[simd.flags]
|
||
|
||
# 29 Numerics library [[numerics]](./#numerics)
|
||
|
||
## 29.10 Data-parallel types [[simd]](simd#flags)
|
||
|
||
### 29.10.5 Load and store flags [simd.flags]
|
||
|
||
#### [29.10.5.1](#overview) Class template flags overview [[simd.flags.overview]](simd.flags.overview)
|
||
|
||
[ð](#lib:flags,simd)
|
||
|
||
namespace std::simd {template<class... Flags> struct flags {// [[simd.flags.oper]](#oper "29.10.5.2 flags operators"), flags operatorstemplate<class... Other>friend consteval auto operator|(flags, flags<Other...>); };}
|
||
|
||
[1](#overview-1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17255)
|
||
|
||
[*Note [1](#overview-note-1)*:
|
||
|
||
The class template flags acts like an integer bit-flag for types[.](#overview-1.sentence-1)
|
||
|
||
â *end note*]
|
||
|
||
[2](#overview-2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17260)
|
||
|
||
*Constraints*: Every type in the parameter pack Flags is one of *convert-flag*,*aligned-flag*, or *overaligned-flag*<N>[.](#overview-2.sentence-1)
|
||
|
||
#### [29.10.5.2](#oper) flags operators [[simd.flags.oper]](simd.flags.oper)
|
||
|
||
[ð](#lib:operator%7c,simd::flags)
|
||
|
||
`template<class... Other>
|
||
friend consteval auto operator|(flags a, flags<Other...> b);
|
||
`
|
||
|
||
[1](#oper-1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17274)
|
||
|
||
*Returns*: A default-initialized object of type flags<Flags2...> for some Flags2 where every type in Flags2 is present either in template parameter pack Flags or in template parameter pack Other, and every type in template parameter
|
||
packs Flags and Other is present in Flags2[.](#oper-1.sentence-1)
|
||
|
||
If the packs Flags and Other contain two
|
||
different specializations *overaligned-flag*<N1> and *overaligned-flag*<N2>, Flags2 is not required to contain the
|
||
specialization *overaligned-flag*<std::min(N1, N2)>[.](#oper-1.sentence-2)
|