Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

accuracy AddProduct function?

marquito
Beginner
512 Views
dear all,

recently i experienced maybe accuracy problems when using ippsAddProduct_64f function to calculate the dot product of 2 vectors. please find an example in pseudo-code below:

2 input vectors:
v1: 0.9916417944, 0.0710609594, -0.1076888651
v2: 0.0010000000, 0.0010000000, -0.0010000000

**** method 1: ipps AddProduct ****
Ipp64f tmp_value1 = 0.0;
ippsAddProduct_64f(v1,v2,&tmp_value1, 3);

output: tmp_value1: 0.0009916418


**** method 2: ipp matrix library ****
Ipp64f tmp_value1 = 0.0;
Ipp32s stride_Ipp64f = sizeof(Ipp64f);
ippmDotProduct_vv_64f(v1, stride_Ipp64f, v2, stride_Ipp64f, &tmp_value1, 3);

output: tmp_value1: 0.0011703916

**** method 3: by hand ****
Ipp64f tmp_value1 = v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2];

output: tmp_value1: 0.0011703916

the correct value is delivered by method 2 and 3. now my question is, what did i do wrong or is this some kind of accuracy problem? has anyone experienced similar problems?

i am grateful for any hints or thoughts.

best regards,
markus
0 Kudos
1 Reply
Ying_S_Intel
Employee
512 Views

Dear Customer,

Thanks for reporting and we generated this issue in #441601 via Intel Premier Support, our support engineer will contact you for further assistance.

Thanks,
Ying

0 Kudos
Reply