The C++ algorithm program is written following the STL standard. It
works but I feel it runs very slow, even slower than the MATLAB program.
So I use the Visual Studio Team Profiling Tools to check the CPU time
used by each module and function and locate the bottleneck. To my
surprise, I find libiomp5md.dll itself takes 46.22% individual work
(please see attachment for summary report of the profiler), so it is
very CPU time consuming. I don't know if libiomp5md.dll is related to
Visual Studio Team Profiling Tools, and why it is so time-consuming.
Could anybody please help me?
BTW, is it a wise choice to use STD C++ instead of ANSI C to implement
the algorithm in terms of the speed? It is my first time to write an
algorithm in STD. The main reason behind is to avoid pointers, which are
too powerful and may cause troubles.
Thank you in advance.
Johnson
Functions Causing Most Work Name Samples %
_mainCRTStartup 4,253 52.91
_main 4,238 52.72
__tmainCRTStartup 4,238 52.72
MathLib::CL_Acquisition::Acquisition(void) 4,196 52.20
[libiomp5md.dll] 3,856 47.97
Functions Doing Most Individual Work Name Samples %
[libiomp5md.dll] 3,715 46.22
std::valarray<double>::operator[](unsigned int) 633 7.88
std::_Construct<double,double>(double *,double const &) 578 7.19
operator new(unsigned int,void *) 432 5.37
std::_Destroy<double>(double *) 417 5.19
--- news://freenews.netfront.net/ - complaints: ne...@netfront.net ---
May I suggest you check with either your library vendor,
or on an MS forum? There was no C++ language question.
Plus, we're not psychic. We have absolutely no idea what
this lib is supposed to be doing, or how it's coded.
It seems to be an IPP dll.Probably related to Intel's OpenMP, which is not
related to IPP or FFT stuff but to multi threading and compiler stuff.
> BTW, is it a wise choice to use STD C++ instead of ANSI C to implement the
> algorithm in terms of the speed? It is my first time to write an algorithm
> in STD. The main reason behind is to avoid pointers, which are too
> powerful and may cause troubles.
I'm pretty sure you won't notice any differences in speed since your
bottleneck is probably the fft stuff which is handled by IPP. By the way I
can assure you that IPP implementation of the FFT is really fast.
Never forget this:
Premature optimization is the root of all evil (Donald Knuth)
It look like you are trying to use IPP, OpenMp and the Intel compiler in
your quest of performance...
Start with IPP, make thing works (cause IPP itself is not that easy to use),
then move on with the compiler, check out all the optimization options it
has to offer and finally try OpenMP.
Eric Pruneau