<br><br><div class="gmail_quote">On Mon, Oct 29, 2012 at 12:50 PM, Boudewijn Rempt <span dir="ltr"><<a href="mailto:boud@valdyas.org" target="_blank">boud@valdyas.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As far as I know Vc does its own check for the presence of a particular instruction set on the runtime, so it<br>
won't crash at least. But as reported by Sven its own fallbacks are slower than our integer implementation of<br>
the routines.<br>
</blockquote><br>
<br></div>
I came across something yesterday that I cannot find that said that, yes, if you use a binary compiled for avx on a non-avx system, as soon as the instructions are executed you'll get a crash.</blockquote><div><br>It might be not Vc, but our problem. The point is right now we compile our own sources with all the compiler switches possible. So the illegal instruction might appear in our own code.<br>
<br>Well, of course we need to do something with it. The Intel's manual suggests creating separate dynamic libraries and load the only one that is supported by the host CPU. We could do something like that. We could move all the code using Vc into a separate library and compile, say, 5 copies of it: for SSE2, SSE3, SSSE3, SSE4 and AVX. The on Krita start we could choose the needed library. The problem is I don't know how to dynamically load a library. More than that I can't imagine how to do that in a crossplatform way.<br>
<br clear="all"></div></div>-- <br>Dmitry Kazakov<br>