◆ logspace_add
Callable object computing the logspace_add operation: \(\log\left(\sum_{i = 0}^n e^{x_i}\right)\). Required header: Members Functions
template< floating_value T, floating_value U, floating_value ...Ts> auto operator()( T arg0, U arg1, Ts... args ) const noexcept
requires (compatible_values< T, U, Ts > && ...);
Definition: value.hpp:83 Parameters
Return value The call The result type is the common compatible type of the parameters. auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::logspace_add Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/logspace_add.hpp>
#include <eve/literals.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
using w_t = eve::wide<float, eve::fixed<4>>;
w_t pi = {3, 2, 3, 3}, qi = {4, 1, 1, ~0};
std::cout << "---- simd" << '\n'
<< " <- qi = " << qi << '\n'
float xi = 3, yi = 4;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " yi = " << yi << '\n'
return 0;
}
constexpr callable_logspace_add_ logspace_add Callable object computing the logspace_add operation: . Definition: logspace_add.hpp:84 |