Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Adrian_Edmonds1
Beginner
76 Views

ippiZigzagInv8x8_16s_C1

Hi all;
We have a fairly complex algorithm running on about 6 Mbytes of data under Windows 7 64 bit using the Intel ipp libraries throughout. As part of optimization, the profiler consitently showsippiZigzagInv8x8_16s_C1 as the most expensive function interms of time. We do not call this directly but it appears to get called after a call toippiSqr_32f_C1IR orippiMulC_32f_C1IR.
What is this function and is there any way of reducing the approximately 40% of our process time by either eliminating or replacing it? All our applications are 64 bit.
0 Kudos
6 Replies
SergeyKostrov
Valued Contributor II
76 Views

...What is this function...


Here are sometechnical detailsfrom ippi.h header file:

...
// Name:
// ippiZigzagInv8x8_16s_C1
// ippiZigzagFwd8x8_16s_C1
//
// Purpose:
// reorder natural to zigzag 8x8 block (forward funnction) and
// reorder zigzag to natural 8x8 block (inversion function)
//
// Parameter:
// pSrc - pointer to source block
// pDst - pointer to destination block
//
// Returns:
// IppStatus
...

Unfortunately, I don't knowif it could be optimized to work faster.

Best regards,
Sergey

Adrian_Edmonds1
Beginner
76 Views

Thanks Sergey;
Regretfully, the algorithm people indirectly produced this from some chunky MatLab code converted by hand to C++ so they have no idea what to do either. Guess we're stuck with it.
Adrian
Thomas_Jensen1
Beginner
76 Views

Isn't the function ippiZigzagInv8x8_16s_C1 related to FFT?
The functions ippiSqr_32f_C1IR and ippiMulC_32f_C1IR should not call FFT routines...
So, if you do not call ippiZigzagInv8x8_16s_C1, what other code is calling it?

Adrian_Edmonds1
Beginner
76 Views

According to the call stack it'sippiSqr_32f_C1IR and ippiMulC_32f_C1IR. The last line of code before it's out of the source is:
IppStatus ippStat=ippiSqr_32f_C1IR(SrcDst.PData(),SrcDst.NBytesRowBuff(),SrcDst.GetSize());
My two math PHDs are stumped.
The profiler shows the ZigZig being called 58 times for each call ofippiSqr_32f_C1IR
Thomas_Jensen1
Beginner
76 Views

I still think you are executing fast fourier functions, since those use all the mentioned functions.

However, it is also odd that ippiZigzagInv8x8_16s_C1 is for 16s (16-bit signed), implying 16s FFT, so why is 32f then use in the other functions...

Anyway, we need more info to give a good suggstion.

Adrian_Edmonds1
Beginner
76 Views

When the short program below is run and analysed with Very Sleepy I get:
#include "stdafx.h"
#include "GIIppExtinc.h"
int _tmain(int argc, _TCHAR* argv[])
{
while (1==1)
{
Ipp32f src[8*4] = {8, 4, 2, 1, 0, 0, 0, 0,
8, 4, 2, 1, 0, 0, 0, 0,
8, 4, 2, 1, 0, 0, 0, 0,
8, 4, 2, 1, 0, 0, 0, 0};
Ipp32f srcdst[8*4] = {4, 3, 2, 1, 0, 0, 0, 0,
4, 3, 2, 1, 0, 0, 0, 0,
4, 3, 2, 1, 0, 0, 0, 0,
4, 3, 2, 1, 0, 0, 0, 0};
IppiSize srcRoi = { 8, 4 };
while (1==1)
{
ippiAdd_32f_C1IR(src, 8, srcdst, 8, srcRoi);
ippiMul_32f_C1IR(src, 8, srcdst, 8, srcRoi);
}
}
return 0;
}
ippiZigzagInv8x8_16s_C1,5.796705,5.796705,95.755457,95.755457,ippie9-7.0,[unknown],0
wmain,0.091018,6.053655,1.503521,100.000000,Console,d:\projects\experimental\console\console\console.cpp,8
ippiMul_32f_C1IR,0.041101,0.041101,0.678945,0.678945,ippi-7.0,[unknown],0
ippiAdd_32f_C1IR,0.034012,0.034012,0.561842,0.561842,ippi-7.0,[unknown],0
ippiAdd_32f_C1IR,0.031993,0.031993,0.528491,0.528491,ippie9-7.0,[unknown],0
ippiMul_32f_C1IR,0.025898,0.025898,0.427808,0.427808,ippie9-7.0,[unknown],0
ippiAdd_32f_C1IR,0.020914,0.020914,0.345477,0.345477,Console,[unknown],0
ippiMul_32f_C1IR,0.012014,0.012014,0.198459,0.198459,Console,[unknown],0
BaseThreadInitThunk,0.000000,6.053655,0.000000,100.000000,kernel32,[unknown],0
RtlUserThreadStart,0.000000,6.053655,0.000000,100.000000,ntdll,[unknown],0
__tmainCRTStartup,0.000000,6.053655,0.000000,100.000000,Console,f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c,410
It seems it's always going to be with us.
Reply