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

49 lines
1.9 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.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.2flags 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)