On 29/11/2014 19:12, Joel Falcou wrote:
> IIRC we optimize case like a(_,n) where _ alone means all elements of
> this dimension. I *think* we also SIMD over _(1,n) which is equivqlent
> to _(1,1,n).
We optimize the case where it can statically be deduced that the data
being extracted is fully contiguous.
Basically, it means using '_' on all first arguments, with the
possibility of using _(a, b) once, followed exclusively by scalars.
So x(_, _(a, b), c) is optimized
x(_(a, b), _, c) isn't
We do not treat _(1,1,n) and _(1,n) as being equivalent since there is
no static way to tell that they're the same.
There are plans however to introduce better support for strides.
The idea would be to be able to fully optimize things such as
x(_(a0,c0), _(a1,b1,c1), ...)
It would however only get vectorized on the innermost non-singleton
dimension.