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

need more info on ippsConvBiased_32f

Adam_Strasel
Beginner
354 Views
Can someone help me understand what this function is doing? An expression of what is happening would be helpful. I think I want to use this function but don't really understand what it is doing.

Here is the sample code from the documentation:

void func_convbiased()
{
Ipp32f pSrc1[5] = {1.1, -2.0, 3.5, 2.2, 0.0};
Ipp32f pSrc2[4] = {0.0, 0.2, 2.5, -1.0};
const int len = 10;
Ipp32f pDst[len];
int bias = 1;
ippsZero_32f(pDst, len);
ippsConvBiased_32f(pSrc1, 5, &pSrc2[1], 3, pDst, len, bias);
}
Result: pDst -> 0.2 2.3 -4.3 9.2 5.5 0.0 0.0 0.0 0.0 0.0

Starting address and length for src2 seem to be offset by the value of 'bias', is this intentional or just an accident when creating the sample code?

Can someone tell me the expression that results in the first result (0.2)?

(BTW, results from documentation are rounded, here is what I get when I run the sample code:

0.22000001 2.3499999 -4.3000002 9.1899996 5.5000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000)


-Thanks
0 Kudos
2 Replies
Adam_Strasel
Beginner
354 Views
still not entirely sure how this works but I got it to work for my needs, think the line
Ipp32f pSrc2[4] = {0.0, 0.2, 2.5, -1.0};
is a red herring however, example produces same result with
Ipp32f pSrc2[3] = {0.0, 0.2, 2.5};

was trying to use this to multiply (and sum result) two vectors where existing code was first flipping one of the vectors left to right. got this to work for this, however it was slower then the two vector calls I was useing before, not sure why, have to assume it is doing more than it needs to or has something to do with the backward ptr use
0 Kudos
SergeyKostrov
Valued Contributor II
354 Views
Please take a look at:

http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/ipp/ipps/ipps_ch6/functn_ConvBiased.html

A biased convolution function should calculate first two elements of an output vector as follows:

i = 0
+ ( 1.100000 * 0.200000 )
0.220000

i = 1
+ ( 1.100000 * 2.500000 )
+ ( -2.000000 * 0.200000 )
2.350000

and so on...

I would like to confirm from Intel Software Engineersthat in case of'ippsConvBiased...' functionthe bias is applied only
for a kernel ( that is,2nd vector )? Is that correct?

Best regards,
Sergey

0 Kudos
Reply