- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
I use the ippsStdDev_32f with "ippAlgHintFast" mode to calculate standard deviation of a vector. It seems than the standard deviation value is zero when the length of vector is greater than 10000(maybe 8192). For comparison, the standard deviation value in ippsMeanStdDev_32f is not zero with the same parameters.
It was described in the document that "ippAlgHintFast is
I am using IPP version 2021.7.0, windows10 1809, visual studio 2019.
I tested three hint mode of both two functions in c++:
int iSrcLength = 10000;
float fStdDevValue = 123.0f; //initialize
float fMeanValue = 123.0f; //initialize
std::unique_ptr<float[]> pInput(new float[iSrcLength]);
for (int idx = 0; idx < iSrcLength; ++idx)
{
pInput[idx] = static_cast<float>(idx);
}
std::cout << "the length of the vector is: " << iSrcLength << std::endl;
if (ippStsNoErr != ippsStdDev_32f(pInput.get(), iSrcLength, &fStdDevValue, ippAlgHintNone))
{
std::cout << "ERROR:ippsStdDev_32f" << std::endl;
}
std::cout << "StdDev Value in ippsStdDev_32f() with ippAlgHintNone:" << fStdDevValue << std::endl;
if (ippStsNoErr != ippsStdDev_32f(pInput.get(), iSrcLength, &fStdDevValue, ippAlgHintFast))
{
std::cout << "ERROR:ippsStdDev_32f" << std::endl;
}
std::cout << "StdDev Value in ippsStdDev_32f() with ippAlgHintFast:" << fStdDevValue << std::endl;
if (ippStsNoErr != ippsStdDev_32f(pInput.get(), iSrcLength, &fStdDevValue, ippAlgHintAccurate))
{
std::cout << "ERROR:ippsStdDev_32f" << std::endl;
}
std::cout << "StdDev Value in ippsStdDev_32f() with ippAlgHintAccurate:" << fStdDevValue << std::endl;
if (ippStsNoErr != ippsMeanStdDev_32f(pInput.get(), iSrcLength, &fMeanValue, &fStdDevValue, ippAlgHintNone))
{
std::cout << "ERROR:ippsMeanStdDev_32f" << std::endl;
}
std::cout << "StdDev Value in ippsMeanStdDev_32f() with ippAlgHintNone:" << fStdDevValue << std::endl;
if (ippStsNoErr != ippsMeanStdDev_32f(pInput.get(), iSrcLength, &fMeanValue, &fStdDevValue, ippAlgHintFast))
{
std::cout << "ERROR:ippsMeanStdDev_32f" << std::endl;
}
std::cout << "StdDev Value in ippsMeanStdDev_32f() with ippAlgHintFast:" << fStdDevValue << std::endl;
if (ippStsNoErr != ippsMeanStdDev_32f(pInput.get(), iSrcLength, &fMeanValue, &fStdDevValue, ippAlgHintAccurate))
{
std::cout << "ERROR:ippsMeanStdDev_32f" << std::endl;
}
std::cout << "StdDev Value in ippsMeanStdDev_32f() with ippAlgHintAccurate:" << fStdDevValue << std::endl;
results:
the length of the vector is: 10000
StdDev Value in ippsStdDev_32f() with ippAlgHintNone:2886.9
StdDev Value in ippsStdDev_32f() with ippAlgHintFast:0
StdDev Value in ippsStdDev_32f() with ippAlgHintAccurate:2886.9
StdDev Value in ippsMeanStdDev_32f() with ippAlgHintNone:2886.9
StdDev Value in ippsMeanStdDev_32f() with ippAlgHintFast:2886.9
StdDev Value in ippsMeanStdDev_32f() with ippAlgHintAccurate:2886.9
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lei,
Thanks for reaching out to us and bringing up this issue.
I could reproduce the issue in the Windows environment with large vector size and could see the mismatch in the results same as yours
the length of the vector is: 10000
StdDev Value in ippsStdDev_32f() with ippAlgHintNone:2886.9
StdDev Value in ippsStdDev_32f() with ippAlgHintFast:0
StdDev Value in ippsStdDev_32f() with ippAlgHintAccurate:2886.9
StdDev Value in ippsMeanStdDev_32f() with ippAlgHintNone:2886.9
StdDev Value in ippsMeanStdDev_32f() with ippAlgHintFast:2886.9
StdDev Value in ippsMeanStdDev_32f() with ippAlgHintAccurate:2886.9
But the same code when tried running in a Linux environment the results are the same for both APIs
Anyways we will update you with the reason behind the mismatch in the results of standard deviation on Windows and till then we appreciate your patience.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vidya,
Thanks for your reply. I haven't tried it in a Linux environment. But, in Windows IPP version 2019.0.4, the results are the same as Linux environment. If there is any update on this issue, please let me know, thanks.
Regards,
Lei.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lei,
>>If there is any update on this issue, please let me know, thanks.
Sure, we will get back to you if there is any update on this issue and till then we appreciate your patience.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lei,
Thanks for your patience.
The issue raised by you has been fixed in the Intel IPP version 2021.10 which is the latest version and you can download the latest version by using this link Could you please try with the latest version of IPP and let us know if your issue still persists?
Have a Good Day!
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @zhulei2017,
We have not heard back from you. The issue raised by you has been fixed in the Intel IPP version 2021.10 which is the latest version and you can download the latest version by using this link
Have a Good Day!
Thanks & Regards,
Varsha

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page