E.V.E
v2022.03.00

◆ wide()

template<arithmetic_scalar_value Type, typename Cardinal >
template<eve::invocable< size_type, size_type > Generator>
eve::wide< Type, Cardinal >::wide ( Generator &&  g)
inlinenoexcept

Constructs a eve::wide from a Callable Object.

The Callable Object must satisfy the following prototype:

T generator(std::ptrdiff_t index, std::ptrdiff_t cardinal);
Definition: generator.hpp:47
Computes the cardinal of a given type.
Definition: cardinal.hpp:55


and is supposed to return the value computed from the current index and the cardinal to store at said index.

Parameters
gThe Callable Object to use as a value generator

Example:

#include <eve/wide.hpp>
#include <iostream>
int main()
{
// Generates the wide [N-1 ... 0]
eve::wide<int> r = [](auto i, auto c) { return c - i - 1;};
std::cout << r << "\n";
}
constexpr callable_i_ i
Callable object computing the pure imaginary ( ) value.
Definition: i.hpp:51
Wrapper for SIMD registers.
Definition: wide.hpp:65