(05-10-2012, 11:04 PM)Krude Wrote: [ -> ]So what happens if i don't have a CPU that supports AVX? Or 4.2? Do i have to use the normal version? Will it just not work or use the existing instructions and ignore optimizations for those not supported? Does it run slower than normal instead?
As long as you are using a L101 or higher build, it should not crash
due to unsupported instruction set. My older builds did, but those were
from back long before the switch to GIT.
It uses whatever instructions the CPU currently supports, as long as
they are one of the following: SSE3, SSSE3, SSE4.1, SSE4.2, or AVX.
For example, if the CPU supports SSSE3, but not the higher ones, it
will only use SSSE3. Each set includes support for the instructions of
the previous set, so by saying it uses SSSE3, it will also use SSE,
SSE2, and SSE3 instructions when applicable.
When the program is run, it detects what instruction sets are supported
and uses only those. My builds currently have 6 code paths in them
that can be run depending on what the CPU supports. It's basically like
having 6 different builds combined into one.
The "baseline code path" uses SSE2, so as long as the CPU supports
at least that, my L101 builds and higher will run. Of course, if SSE2 is
the only instruction set it supports, you may experience very slow
gaming due to old slow CPU
(05-11-2012, 07:39 AM)neobrain Wrote: [ -> ]It won't work if those "special optimized builds" contain any instructions which aren't supported by the CPU. In that case, the program will just crash with an error message IIRC. If you don't get any error even though your CPU doesn't support that instruction set, that basically means the compiler didn't do any special optimizations for AVX and, in turn, that advertising AVX optimizations is kinda stupid.
That's the way my builds *used* to be compiled. I had a separate build
for each type of instruction set. L101 and higher are built with support
for all of the instruction sets listed. If the CPU supports it, it uses it. If not,
it doesn't use it. Either way, my L101 builds and higher should not be
crashing on any computers with a CPU that supports SSE2 or higher,
whether or not they support higher instructions.
I would also like to note that the instruction sets are not the only optimizations
in these builds. The Intel C++ Composer offers a wide array of different
optimizations that can be applied when the code is compiled. While I have tested
and gone through many of them, there are still others I have yet to test.