Re: [julia-users] Re: What's the status of SIMD instructions from a user's perspective in v0.5?

2016-10-14 Thread Milan Bouchet-Valat
Le jeudi 13 octobre 2016 à 07:27 -0700, Florian Oswald a écrit : > > Hi Erik, > > that's great thanks. I may have a hot inner loop where this could be > very helpful. I'll have a closer look and come back with any > questions later on if that's ok.  Maybe I'm stating the obvious, but you don't

Re: [julia-users] Re: What's the status of SIMD instructions from a user's perspective in v0.5?

2016-10-13 Thread Florian Oswald
Hi Erik, that's great thanks. I may have a hot inner loop where this could be very helpful. I'll have a closer look and come back with any questions later on if that's ok. cheers florian On Thursday, 13 October 2016 16:24:03 UTC+2, Erik Schnetter wrote: > > If you want to use the SIMD

Re: [julia-users] Re: What's the status of SIMD instructions from a user's perspective in v0.5?

2016-10-13 Thread Erik Schnetter
If you want to use the SIMD package, then you need to manually vectorized the code. That is, all (most of) the local variables you're using will have a SIMD `Vec` type. For convenience, your input and output arrays will likely still hold scalar values, and the `vload` and vstore` functions access

[julia-users] Re: What's the status of SIMD instructions from a user's perspective in v0.5?

2016-10-13 Thread Florian Oswald
ok thanks! and so I should define my SIMD-able function like function vadd!{N,T}(xs::Vector{T}, ys::Vector{T}, ::Type{Vec{N,T}}) @assert length(ys) == length(xs) @assert length(xs) % N == 0 @inbounds for i in 1:N:length(xs) xv = vload(Vec{N,T}, xs, i) yv =

[julia-users] Re: What's the status of SIMD instructions from a user's perspective in v0.5?

2016-10-13 Thread Valentin Churavy
If you want explicit simd the best way right now is the great SIMD.jl package https://github.com/eschnett/SIMD.jl it is builds on top of VecElement. In many cases we can perform automatic vectorisation, but you have to start Julia with -O3 On Thursday, 13 October 2016 22:15:00 UTC+9, Florian