std::experi...al::none_of,(3)
π NAME
okay bestie, this is the manual page for std::experi...al::none_of,(3) from the C++ Standard Libary β yes, that spelling is literally in the header, iykyk π. The name block is giving:
std::experimental::all_of,std::experimental::any_of,std::experimental::none_of,
-
std::experimental::all_of,std::experimental::any_of,std::experimental::none_of,
So it's the whole squad: std::experimental::all_of, std::experimental::any_of, and std::experimental::none_of. πΈ
πΈ Synopsis
Defined in header <experimental/simd>
template< class T, class Abi > (1) (parallelism TS v2)
bool all_of( const simd_mask<T, Abi>& k );
template< class T, class Abi > (2) (parallelism TS v2)
bool any_of( const simd_mask<T, Abi>& k );
template< class T, class Abi > (3) (parallelism TS v2)
bool none_of( const simd_mask<T, Abi>& k );
template< class T, class Abi > (4) (parallelism TS v2)
bool some_of( const simd_mask<T, Abi>& k );
- Returns
trueif all values inkaretrue. - Returns
trueif at least one value inkistrue. - Returns
trueif all values inkarefalse. - Returns
trueif at least one value inkistruebut not all values inkaretrue.
π«Ά Parameters
kβ thesimd_maskto apply the reduction to.
β Return value
The boolean result of the horizontal reduction. literally it's just the boolean result of the horizontal reduction, periodt. β¨
β¨ Example
// Run this code
#include <cassert>
#include <experimental/simd>
namespace stq = std::experimental;
int main()
{
using mask = stq::fixed_size_simd_mask<int, 4>;
mask mask1{false}; // = {0, 0, 0, 0}
assert
(
stq::none_of(mask1) == true &&
stq::any_of(mask1) == false &&
stq::some_of(mask1) == false &&
stq::all_of(mask1) == false
);
mask mask2{true}; // = {1, 1, 1, 1}
assert
(
stq::none_of(mask2) == false &&
stq::any_of(mask2) == true &&
stq::some_of(mask2) == false &&
stq::all_of(mask2) == true
);
mask mask3{true};
mask3[0] = mask3[1] = false; // mask3 = {0, 0, 1, 1}
assert
(
stq::none_of(mask3) == false &&
stq::any_of(mask3) == true &&
stq::some_of(mask3) == true &&
stq::all_of(mask3) == false
);
}
mwah π β source: http://cppreference.com, date: 2024.06.10, and the footer/version string is std::experi...al::none_of,(3). that's the whole page, bestie, go slay those horizontal reductions π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms