◆ zip
Callable object constructing a SoA value. Required header: Members Functions
For scalar types returns a kumi::tuple or a product type template<simd_value... Ws>
auto operator()(Ws... ws) const noexcept;
template<product_type Target, simd_value... Ws>
Return value Construct an instance of ExampleSee it live on Compiler Explorer #include <eve/wide.hpp>
#include <eve/function/zip.hpp>
#include <eve/product_type.hpp>
#include <iostream>
struct data_block : eve::struct_support<data_block, float, std::int16_t,double>
{
friend std::ostream& operator<<(std::ostream& os, data_block const& d)
{
return os << "{" << get<0>(d) << " x " << get<1>(d) << " - " << get<2>(d) << "}";
}
};
int main()
{
using card_t = eve::cardinal_t<eve::wide<double>>;
std::cout << "---- values" << std::endl
<< "wf = " << wf << std::endl
<< "wi = " << wi << std::endl
<< "wd = " << wd << std::endl << std::endl;
std::cout << "---- zip as tuple" << std::endl
<< "-> zip(wf,wi,wd) = " << eve::zip(wf,wi,wd) << std::endl << std::endl;
std::cout << "---- zip as UDT" << std::endl
return 0;
}
|