GetNumThreads should return default number which is equal to number of cores on your system if you did not call SetNumThreads before. But after you set some particular number of threads with SetNumThreads call, then GetNumThreads should return this number.
Regards,
Vladimir
I absolutely agree, but my question was pointing on another issue. According to your comment, Open MP in the Intel IPP starts a number of threads according to the number of cores in the system? These threads are switched to sleep state, if
ippSetNumThreads was called with a number less than the available number of cores.
Furthermore, the IPP manual says that the initial number of threads returned by ippGetNumThreads (previously to any call of ippSetNumThreads)is equal to the number of cores in a system.
So my question is, why is the number of threads returned by ippGetNumThreads (directly after starting the program and without calling ippSetNumThreads) different to the number of observable threads when the program is running? In my case the number of 'possible' threads returned by ippGetNumThreads (without calling ippSetNumThreads before) is 8 and the number of observable threads running in the system after calling ippSetNumThreads( 1 ) is 4. I'm not sure, but considering your post, I think, there should be 8 threads again (7 threads in the sleep state and one thread working)?
Maybe this is due to some internals of the library and there are always 4 threads independent of the number of available cores in the system, or some of the threads are destroyed?
ippGetNumThreads in the manual:This function returns the number of OMP threads specified by the user previously. If it has not been specified,the function returns the initial number of threads that depends on the number of logical processors.
Best regards,
Thomas