Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Welcome to the Intel IPP forum

Amanda_S_Intel
Employee
918 Views
Welcome to the Intel Integrated Performance Primitives (Intel IPP) user forum. This forum is an online community where developers can exchange ideas, suggestions, and tips and tricks. Contributors to this forum include Intel IPP users as well as members of the Intel IPP engineering and technical consulting teams. We would like to hear from you about how the Intel IPP is being used in your software development. Please introduce yourself to the Intel IPP community.
0 Kudos
2 Replies
kunal_v_
Beginner
918 Views

Hi,

I am getting a IppStsContextMatchErr(-17) when I use ippsHilbertInitAlloc_32f_32fc in the following code. I notice that there are some times when no error is reported when I run this in a loop but I get the context error on most of the iterations. Any help would be appreciated.

 

int EnvDtc(INT* buf1,PCM_PIPE_TDP_VOL pPipe,Engine *m_pengine)
{
   IppStatus status;
   IppsHilbertSpec_32f32fc *struc;
   status = ippsHilbertInitAlloc_32f32fc(&struc, (int)pPipe->samPerPri, ippAlgHintNone);
   Ipp32fc* dst = ippsMalloc_32fc(pPipe->samPerPri);
   Ipp32f* magDst = ippsMalloc_32f(pPipe->samPerPri);
   //Ipp32f* src = ippsMalloc_32f(pPipe->samPerPri);
   status = ippsHilbert_32f32fc((Ipp32f*)buf1,dst,struc);
   status = ippsMagnitude_32fc(dst,magDst,pPipe->samPerPri);
   status = ippsHilbertFree_32f32fc(struc);
   const int len = pPipe->samPerPri;
   double* temp = new double[len];
   for(int i=0;i<pPipe->samPerPri;i++){
   temp = (double)magDst;
   }
   mxArray* proc2 = mxCreateDoubleMatrix(pPipe->samPerPri,1,mxREAL);
   memcpy((void *)mxGetPr(proc2), temp,sizeof(double)*pPipe->samPerPri);
   engPutVariable(m_pengine, "Env",proc2);
   mxDestroyArray(proc2);
   // Free memory
   ippsFree(dst);
   ippsFree(magDst);
   free(temp);
   return 0;
}

 

 

 

0 Kudos
Igor_A_Intel
Employee
918 Views

Hi Kunal,

your code is not self-sufficient - so it is not compilable. Could you provide compilable reproducer? (it is not clear which parameters are used for Hilbert, also you don't check ippStatus after each IPP call - may be something is wrong before you applying Hilbert - may you use wrong parameters for InitAlloc and has bad status after it and -17 after Hilbert is just a result that struc has not been created...

regards, Igor

0 Kudos
Reply