- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include "ipp.h"
#pragma comment (lib,"ippi20.lib")
{
// SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_NORMAL);
Ipp32f pDst[100*100];
int srcDestStep = 100*sizeof(Ipp32f);
int ROIStartIndex = 100*2 + 1;
IppiSize filterRoiSize={96,96};
const Ipp32f pKernel[25]= {1,1,1,1,1,
1,1,1,1,1,
1,1,1,1,1,
1,1,1,1,1,
1,1,1,1,1};
const IppiSize kernelSize ={5,5};
IppiPoint m_anchor = {2,2};
return 0;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, I have the answer now.
First of all, I am a newby so my terms will be inexact, so I will ask everyones to excuse (and correct my terminology if I am wrong).
IPP lib can be used in 2 ways :
1) Creates extra threads for doing the computation
2) No extra threads.
This problem happens when you work with IPP with the first method. Now the extra threads are created (with a default priority) but they have different priorities then "My thread" (becuase I had changed my threads priority above). Now I do not have Hyper Threading, so the whole game is done on my CPU. Now, the job is being split between the threads but in order for me to return from this ipp function all threads should finish their part. Now the method probably chosed by intel for these thread to wait for other threads id (once again : probably) "busy wait", i.e. the thread is holding the CPU, expecting other threads to work on the second CPU. remeber that I have only one CPU (NO HT), so "My thread" with a high priority is occupying the CPU, until Windows raises the priorities of other threads (by it's logic of starvation, which takes longer the more I raise "My thread's" priority).
I hope I am clear with this explanation.
To make things short : working in the second mode (i.e. no extra threads) worked great, and was not effected by the priority bussiness.
Thanks for the effort.
Maurice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page