#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.5f,1.5f,2.5f,3.f};
wide_it qi = {2,3,4,5};
auto const sum = [](auto a, auto b) { return a+b; };
auto const prod = [](auto a, auto b) { return a*b; };
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<<
"-> reduce(pf,sum) = " <<
eve::reduce(pf, sum) <<
'\n'
<< "<- qi = " << qi << '\n'
<<
"-> reduce(qi,prod) = " <<
eve::reduce(qi, prod) <<
'\n';
std::cout << "---- simd with splat" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qi = " << qi << '\n'
return 0;
}
constexpr callable_reduce_ reduce
Computes the TODO.
Definition reduce.hpp:49
constexpr splat_type const splat
Computes the TODO.
Definition splat.hpp:60
Wrapper for SIMD registers.
Definition wide.hpp:86