Liste des Groupes | Revenir à c arch |
MitchAlsup1 <mitchalsup@aol.com> schrieb:
Now, if &b[1] happens to = &a[0], then your construction fails while
VVM
succeeds--it just runs slower because there IS a dependency checked by
HW and enforced. In those situations where the dependency is
nonexistent,
then the loop vectorizes--and the programmer remains blissfuly unaware.
The performance loss can be significant, unfortunately, dependingBetween 2000 and 2006 I was enamored with SIMD as a proxy for
on the ratio of the width of the data in quesiton to the width of
the SIMD which actually performs the operation. In the case of
8-bit data and 256-bit wide SIMD, this would be a factor of 32,
which could lead to a slowdown of a factor of... 25, maybe?
This would be enough to trigger bug reports, I can tell you from
experience :-)
One technique that could get around that would be loop reversal,Costing code density, compiler complexity, assembly language
with a branch to the correct loop at runtime (or a predicate
choosing the right values for the loop constants).
An option to raise an exception when there is a slowdown dueMaking the slow down even slower/greater.
to loops running the wrong direction could be helpful in this
context.
Les messages affichés proviennent d'usenet.