function returns wrongly!

Hi guys,

I am implementing a class under visual studio using Intel library functions and basically there is Black function that calls Correlation function. When I output the results in the Correlation function, it is ok but when I output the results after the call in the Black function, then the output is wrong. I will appreciate if someone can help me?


In the header file of Colour.h:

private:

Ipp32fc* pZero;

-----------------------

In the cpp file:

Colour::Colour(void)
{
pZero = NULL;
}

void Colour::allocate(int nLenOr)
{
pZero = ippsMalloc_32fc(5*len);
}

void Colour::Black(Ipp32f *samples, Ipp32f *s, int sampleSize, int *Size)
{
Correlation(pSignal, pInvZero, 2*len-2, 3*nFFTlenSegment-5, pZero );

for(int r=0; r<5*len-7; r++)
{
stream<<r<< "\t"<<pZero[r].re<<"\t"<<pZero[r].im<<endl;
}
}



void Colour::Correlation (Ipp32fc *sample1, Ipp32fc *sample2, int len1, int len2, Ipp32fc *pSamplesOut)
{
int sumlen = len1+len2-1;

for(int rr = 0; rr< sumlen; rr++)
{
pSamplesOut[rr].re = pSamplesOut[rr].re;
pSamplesOut[rr].im = pSamplesOut[rr].im;
stream<<rr<<"\t"<<pSamplesOut[rr].re<<"\t"<<pSamplesOut[rr].im<<endl;
}
}
closed account (4z0M4iN6)
Then I suggest, you shouldn't call the Black function.
Topic archived. No new replies allowed.