- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Provided the following inputs, the CrossCorrNormGetBufferSize function returns ippStsNoErr and pBufferSize = 0:
- src1Len = 205
- src2Len = 1632
- dstLen = 1632
- lowLag = 0
- dataType = ipp32fc
- algType = ippsNormNone
Is this an expected result? Follow on calls to the CrossCorrNorm function with pBufferSize = 0 result in an output of all zeros. Are there restrictions on the input parameters to this function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The get buffer size API sometimes returns 0 depending on input length. IPP internally calculates whether it is expected to allocate buffer size or not. As a test sample, if you change src1Len = 205 to more than 255, for example, set src1Len = 256, then you can get the size of the buffer would not be zero anymore.
In addition, you could test the example provided in this link, print the buffer size before ippsMalloc and you could see the buffer size as 0 and you could see the correct results as well.
Best Regards,
Shanmukh.SS
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel communities.
Could you please share with us the IPP version details, environment details, and complete source code, so that it helps us in analyzing the issue better?
Best Regards,
Shanmukh.ss
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested 2 different versions of IPP: 2017.0.1 (r53196) and 2019.0.3 (r61817). Both version showed the same result.
I am developing on a CentOS 7 system and compiling with devtoolset-11 (gcc 11.2.1)
The below source code replicates the behavior I am seeing:
#include "ipp.h"
#include <stdio.h>
int main()
{
int src1Len = 205;
int src2Len = 1632;
int dstLen = 1632;
int bufSize = 0;
int lowLag = 0;
IppStatus status = ippsCrossCorrNormGetBufferSize(src1Len, src2Len, dstLen, lowLag, ipp32fc, ippsNormNone, &bufSize);
printf("%s \n", ippGetStatusString(status));
printf("bufSize %i \n", bufSize);
return 0;
}
The output I am seeing is:
ippStsNoErr: No errors
bufSize 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for sharing the sample reproducer.
We are able to reproduce it on our end. We will get back to you soon with an update.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Brandon,
In continuation of the earlier thread, could you please let us know the compilation command used for the compilation of your code?
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compilation command used was:
g++ test.cpp -o ipptest -I <location of ipp.h> -lippi -lipps -lippcore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The get buffer size API sometimes returns 0 depending on input length. IPP internally calculates whether it is expected to allocate buffer size or not. As a test sample, if you change src1Len = 205 to more than 255, for example, set src1Len = 256, then you can get the size of the buffer would not be zero anymore.
In addition, you could test the example provided in this link, print the buffer size before ippsMalloc and you could see the buffer size as 0 and you could see the correct results as well.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. I confirmed that src1Len > 255 does produce buffer sizes > 0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for accepting our solution. If you have any other queries, please post a new question as this thread will no loner be monitored by Intel.
Best Regards,
Shanmukh.SS

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