cpu detection
Dmitry Kazakov
dimula73 at gmail.com
Mon Oct 29 12:12:10 UTC 2012
On Mon, Oct 29, 2012 at 12:50 PM, Boudewijn Rempt <boud at valdyas.org> wrote:
> As far as I know Vc does its own check for the presence of a particular
>> instruction set on the runtime, so it
>> won't crash at least. But as reported by Sven its own fallbacks are
>> slower than our integer implementation of
>> the routines.
>>
>
>
> 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.
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.
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.
--
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20121029/33ebbd98/attachment.html>
More information about the kimageshop
mailing list