IPP IIR Function

IPP IIR Function

about a month ago i posted a question about the "ippsIIR"

An application that had used this function was crashing on a Core 2 duo, and not on a regular Pentium 4 PC.

It is still happening, but now i have some more details about the problem.

Here Is The Code I'm Using:

static std::vector pStateVec;

static std::vector pBufferVec;

int InitIIRFilter(const double NUM[], const double DEN[], int FilterOrder)


IppsIIRState_64f* State;

int BufferSize;

Ippstatus = ippsIIRGetStateSize_64f(FilterOrder,&BufferSize);


Ipp8u* Buffer = new Ipp8u[BufferSize];


Ipp64f* pTaps =new Ipp64f[2*(FilterOrder+1)];

memcpy(pTaps, NUM, (FilterOrder+1)*sizeof(Ipp64f));

memcpy(pTaps+ (FilterOrder+1), DEN, (FilterOrder+1)*sizeof(Ipp64f));

s = ippsIIRInit_64f(&State, pTaps, FilterOrder, NULL, Buffer);



delete [] pTaps;

return static_cast(pStateVec.size()-1);


void IIRFilter(const double FilterInput[], int len,

double FilterOutput[],intindInFiltStruct)


IppStatus s = ippsIIR_64f(FilterInput, FilterOutput, len, pStateVec[indInFiltStruct]);



The Terminate Function is not stated here


When I debug this code on both PC's, I notice that on the single core, The Value of "State" assumes the Value of "Buffer", after IIRInit, i.e. , points to the start of the buffer, whereas, on the dual core, before the application crashes, "State" points to "Buffer" + 4 bytes, and not to Buffer, i.e. does not point to the start of the buffer, but to 4 bytes after the start.Moreover, I have&
nbsp;one filter with a different filter order, which succeeds running on the dual core. when this filter runs, "State" and "Buffer" point to the same address.

What Do I Do? Could this be related to alignment issues, and if so, what is the solution?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Tomer,

I few of us have been trying to figure out how to answer you question.. Could you re-port the question in the threading forum? This is the managibility forum and we focus on Intel AMT and other such issues. I am affraid I can't help you with your threading problem.


Leave a Comment

Please sign in to add a comment. Not a member? Join today