Open anutosh491 opened 9 months ago
A simple example for the same would be
#include "xsimd/xsimd.hpp"
#include <iostream>
namespace xs = xsimd;
int main(int, char*[])
{
xs::batch<double, xs::avx> a = { 1.5, 2.5, 3.5, 4.5 };
xs::batch<double, xs::avx> b = { 2.5, 3.5, 4.5, 5.5 };
auto mean = (a + b) / 2;
std::cout << mean << std::endl;
return 0;
}
(2.0, 3.0, 4.0, 5.0)
Yes, for xsimd we should use our "SIMD" physical array in LCompilers, to generate vectorized code.
The project looks great. It would be nice if there could be some support for libraries providing C++ wrappers for SIMD intrinsics. A prime example for this could be 1) https://github.com/xtensor-stack/xsimd 2) https://xsimd.readthedocs.io/en/latest/index.html