The attached archive is
ArrayCopy.zip. The C program is only the frame. The real work is done by the assembly language procedures.
The application checks if the AVX instruction set is available (since Sandy Bridge and Bulldozer) and if the Operating System supports it. If so, it copies an array of doubles with AVX instructions. If not, it uses SSE2 instructions.
The strange thing is: Under Windows 7, SP1 (32-bit), the program output is this:
AVX support not available:
==========================
X[0] = 1.00 Y[0] = 1.00
X[1] = 2.00 Y[1] = 2.00
X[2] = 3.00 Y[2] = 3.00
X[3] = 4.00 Y[3] = 4.00
Please, press enter to end the application ...
The same program brings under Windows 7, SP1 (64-bit) in the compatibility mode:
AVX support available:
======================
X[0] = 1.00 Y[0] = 1.00 Z[0] = 1.00
X[1] = 2.00 Y[1] = 2.00 Z[1] = 2.00
X[2] = 3.00 Y[2] = 3.00 Z[2] = 3.00
X[3] = 4.00 Y[3] = 4.00 Z[3] = 4.00
Please, press enter to end the application ...
The compatibility mode seems to be the only chance to use AVX, AVX2 etc. instruction sets. But I can test it only under a virtual machine. What is with a native Win7 (32-bit) with SP1? That must be tested. The C source should be compile after a few minor changes with VC, too. But that must also be tested. Your help and comments are very welcome.
Gunther