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 ne
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 package
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 s
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 = vload(Vec{N,T
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