Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support XSimd #86

Open
Tracked by #16
anutosh491 opened this issue Feb 7, 2024 · 2 comments
Open
Tracked by #16

Support XSimd #86

anutosh491 opened this issue Feb 7, 2024 · 2 comments

Comments

@anutosh491
Copy link

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
@anutosh491
Copy link
Author

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)

@certik certik mentioned this issue Feb 7, 2024
9 tasks
@certik
Copy link
Contributor

certik commented Feb 7, 2024

Yes, for xsimd we should use our "SIMD" physical array in LCompilers, to generate vectorized code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants