You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This crate is not helpful - if I use the simd function, the SIMD will also be used in the default function. There is no way to use SIMD in the function, but no SIMD in the default, fallback function.
Second, loading from fields takes a considerable amount of time in SIMD, which is why I have that weird layout with the four-number array. The macro completely fails on arrays, it does not vectorize arrays at all.
I don't know what the goal is - if you want me to write hand-vectorized code, then you need to provide to write a manual fallback function. If you want to do this work "automagically", then the macro should be smarter about arrays.
Currently the code generated with arrays is horrible:
Now the default function has SIMD function, which is agains the point.
So, in practice, this library is currently useless.
The text was updated successfully, but these errors were encountered:
fschutt
changed the title
macro does not work on arrays, no way to have a default implementation
macro does not work on arrays, no way to have a manual default implementation
Dec 14, 2017
Currently it is not very useful for explicit SIMD because of rust-lang/rust#42515. It's current use is with autovectorization. Once that issue is fixed you should be able to
The problem is that I'm trying to vectorize this code:
https://github.com/fschutt/layout2d/blob/master/src/rect.rs#L43-L107
This crate is not helpful - if I use the
simd
function, the SIMD will also be used in the default function. There is no way to use SIMD in the function, but no SIMD in the default, fallback function.Second, loading from fields takes a considerable amount of time in SIMD, which is why I have that weird layout with the four-number array. The macro completely fails on arrays, it does not vectorize arrays at all.
I don't know what the goal is - if you want me to write hand-vectorized code, then you need to provide to write a manual fallback function. If you want to do this work "automagically", then the macro should be smarter about arrays.
Currently the code generated with arrays is horrible:
If I, however, use the stdsimd functions, I get those too in the
default()
function, which completely works against the point of this library:Now the default function has SIMD function, which is agains the point.
So, in practice, this library is currently useless.
The text was updated successfully, but these errors were encountered: