E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ reduce

callable_reduce_ eve::reduce = {}
inlineconstexpr

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
TODO
}
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  • TODO

Example

#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'
<< "-> splat(reduce)(pf,sum) = " << eve::splat(eve::reduce)(pf, sum) << '\n'
<< "<- qi = " << qi << '\n'
<< "-> splat(reduce)(qi,prod) = " << eve::splat(eve::reduce)(qi, prod) << '\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