Proposed C++ SIMD extensions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Proposed C++ SIMD extensions

Simon Byrne
I recently saw a talk by Mathias Gaunard on the proposed SIMD extensions for C++ (of which he is one of the main developers). There were some interesting ideas there, which I thought might be of interest to others in the Julia community, so here are his slides (posted with his permission).

Gaunard-simd.pdf (2M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proposed C++ SIMD extensions

Kenta Sato
I really want to see `datapar<T,N>` type in Julia. This will greatly improve the performance of pariwise sequence alignment algorithms in bioinformatics. I've ever written such a SIMD algorithm in C++ and called it from Julia through a C wrapper. Will `VecElement{T}` make it possible?

On Friday, May 27, 2016 at 5:17:53 PM UTC+9, Simon Byrne wrote:
I recently saw a talk by Mathias Gaunard on the proposed SIMD extensions for C++ (of which he is one of the main developers). There were some interesting ideas there, which I thought might be of interest to others in the Julia community, so here are his slides (posted with his permission).
Reply | Threaded
Open this post in threaded view
|

Re: Proposed C++ SIMD extensions

Erik Schnetter
There is a SIMD package <https://github.com/eschnett/SIMD.jl> for Julia. It offers a type Vec{N,T}, which is internally represented as (sequence of) SIMD vectors, by using the respective LLVM instructions. Today, the Travis and Appveyor tests for SIMD finally went green for the master branch of Julia, after a long struggle to add certain features to Julia and circumvent certain bugs in LLVM (thanks, @ArchRobison!).

The Vec{N,T} looks very much like NTuple{N,T}, with the addition of element-wise arithmetic operations, and mechanisms to load/store Vecs from arrays.

I've used the equivalent of the SIMD package on C++ for a few years to improve performance for the Einstein Toolkit <https://einsteintoolkit.org>. I haven't looked at the slides yet, but if they contain new ideas I'd be happy to add them to SIMD.

-erik

On Fri, May 27, 2016 at 1:12 PM, Kenta Sato <[hidden email]> wrote:
I really want to see `datapar<T,N>` type in Julia. This will greatly improve the performance of pariwise sequence alignment algorithms in bioinformatics. I've ever written such a SIMD algorithm in C++ and called it from Julia through a C wrapper. Will `VecElement{T}` make it possible?

On Friday, May 27, 2016 at 5:17:53 PM UTC+9, Simon Byrne wrote:
I recently saw a talk by Mathias Gaunard on the proposed SIMD extensions for C++ (of which he is one of the main developers). There were some interesting ideas there, which I thought might be of interest to others in the Julia community, so here are his slides (posted with his permission).



--
Reply | Threaded
Open this post in threaded view
|

Re: Proposed C++ SIMD extensions

Páll Haraldsson
In reply to this post by Simon Byrne


On Friday, May 27, 2016 at 8:17:53 AM UTC, Simon Byrne wrote:
I recently saw a talk by Mathias Gaunard on the proposed SIMD extensions for C++ (of which he is one of the main developers). There were some interesting ideas there, which I thought might be of interest to others in the Julia community, so here are his slides (posted with his permission).

Interesting, e.g. slide 4 on where "Future C++ Standard" fits in. Not it (C++ and C) has [more explicit] intrinsics (and inline assembly, or is that only C [in GCC]?).

Would you say that Julia has (@simd) at a similar level? E.g. already ahead* of C++ (while yes, Julia isn't standardized in any way..)? Is C++ practically ahead, just using non-standardized ways? [I know of e.g. ParallelAccelerator and what is possible (and what is possible additionally with GPUs), that is of course not used in Julia benchmarks on it homepage, but didn't look if @simd is used there..].


* I guess this answers that (and Vc library):

https://github.com/NumScale/boost.simd "Portable SIMD computation library - To be proposed as a Boost library"

in other words: practically C++ is good, using libraries, that are not standardized, not even for Boost yet, but work portably.. (but not to Windows, at least this library?)


Question: C (but not Fortran), assumed aliasing, and restrict keyword to get fast, C++ has similar. Doesn't Julia in general assume no aliasing (or it's your problem if you make it happen..), e.g. has nothing similar to the restrict keyword, and doesn't need it. [I know @simd, allows slightly changed semantics.]

--
Palli.