Skip to content

Logical functions

all function

template <typename T, size_t N>
bool all(const mask<T, N> &x)

Returns x[0] && x[1] && ... && x[N-1]

Source code
template <typename T, size_t N>
KFR_INTRINSIC bool all(const mask<T, N>& x)
{
    return intrinsics::bittestall(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/logical.hpp#L40

any function

template <typename T, size_t N>
bool any(const mask<T, N> &x)

Returns x[0] || x[1] || ... || x[N-1]

Source code
template <typename T, size_t N>
KFR_INTRINSIC bool any(const mask<T, N>& x)
{
    return intrinsics::bittestany(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/math/logical.hpp#L49


Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/