E.V.E
v2022.09.01

◆ logical_not

eve::logical_not = {}
inlineconstexpr

Computes the logical NOT of its argument.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
eve::as_logical_t<T> logical_or(T x) noexcept;
}
constexpr callable_logical_or_ logical_or
Computes the logical OR of its arguments.
Definition: logical_or.hpp:67
Definition: all_of.hpp:22

Parameters

Return value

The call logical_not(x) is semantically equivalent to is_eqz(x). Infix notation can be used with !x.

Note
Although the infix notation with ! is supported, the ! operator on standard scalar types is the original one and so will return bool instead of eve::logical_value.

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {-1.0f, -1.3f, -0.0f, -1.7f, 0.0f, 2.3f, 2.5f, 2.7f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> logical_not(pf) = " << eve::logical_not(pf) << '\n';
float xf = -32.768f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> logical_not(xf) = " << eve::logical_not(xf) << '\n';
return 0;
}
constexpr callable_logical_not_ logical_not
Computes the logical NOT of its argument.
Definition: logical_not.hpp:65
Wrapper for SIMD registers.
Definition: wide.hpp:65