Intel® Business Client Software Development
Support for Intel® vPro™ software development and technologies associated with Intel vPro platforms.

IPP IIR Function

tomerme
Beginner
352 Views

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);

assert(s==ippStsNoErr);

Ipp8u* Buffer = new Ipp8u[BufferSize];

pBufferVec.push_back(Buffer);

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);

assert(s==ippStsNoErr);

pStateVec.push_back(State);

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]);

assert(s==ippStsNoErr);

}

The Terminate Function is not stated here

NOTES

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?

Tomer

0 Kudos
1 Reply
Ylian_S_Intel
Employee
352 Views

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.

Thanks,
Ylian

0 Kudos
Reply