DLL support for intrinsics?
randomnumbers23
So far the results have been positive.
I would like to know if the C/C++ DLL mechanism supports the use of intrinsics (i.e. MMX, SSE, etc.).
I have found that the overhead of creating multiple threads is a minor bottleneck for certain and single-threaded SSE optimised code is running significantly faster (in my non-Igor based test environment) than the multi-threaded code I have written.
I don't have an installation of Igor myself and only have limited access to the clients hardware, so I figured I would ask here before spending a lot of time writing code that will definitely not run!
Thanks in advance,
Andy McPherson
November 7, 2010 at 03:18 pm - Permalink
November 7, 2010 at 03:35 pm - Permalink
@Andy: Setting -02 or -03 just doesn't cut it. -O2 has a negligible effect and -O3 makes the core algorithm run almost twice as slow!
The SSE-optimised version I have been testing runs significantly faster (by a couple orders of magnitude) than the multi-threaded version I initially wrote.
The only downside is the requiredment to have input and output data aligned which means having to copy the incoming and result waves into my own bit-aligned array.
You make a valid point about architecture, but most CPUs these days support the SSE instruction set and the client will only be running the code on one specific machine.
I have run a non-Igor integrated test harness on a variety of machines and I am getting similar results for the most part. And if the hardware doesn't support SSE for some reason, it drops back to the regular multi-threaded algorithm.
@aclight: Thanks! Have downloaded and installed. Now just have to figure out how to generate some fake data that looks like the data that comes out of the clients insanely expensive measurement device!
November 9, 2010 at 12:13 am - Permalink