Comment #0 by ilyayaroshenko — 2016-09-17T01:21:53Z
Slice
{
front
opIndex
ptr
...
}
auto sl1 = slice!double(...);
auto sl2 = slice!double(...);
@fastmath ... {
// loop for strides == 1
c += sl1.ptr[i] * sl2.ptr[i];
}
c's computation can not be fully optimized because Slice primitives has not fastmath attribute.
In the same time this is safe TODO:
Slice
{
@fastmath:
front
opIndex
...
}
auto sl = slice!double(...);
... { // no fastmath
// loop for strides == 1
c += sl1.ptr[i] * sl2.ptr[i];
}
No optimisations in the last case.
So, we can just mark all ndslice except mapSlice as @fastmath :-)
Comment #1 by github-bugzilla — 2016-09-28T22:09:16Z