- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI,
I am using the function ippsCdbkInitAlloc_L2_32f with parameter IPP_CDBK_KMEANS_NUM to train the codebook for VQ.
I would like to know what is the difference between the parameter "width" and the parameter "step".
Is step the length in bytes of a row of the input matrix?
If no what is the use of "step". Is it relatedto the memory allongnment of the input data?
If yes do you have an example of how toallocate the memory for the input?
Thanks
Emilio
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, Emilio,
Row step in all functions from ippsr.h are in array elements, not in bytes.
The goal of step argument is the memory alignment. width should be less than or equal to step.
To allocate the aligned memory you can use ippsMalloc_32f function and step that is the multiple of 4 for 32f data or multiple of 8 for 16s data.
step=(width+3)&(~3);
ptr=ippsMalloc_32f(height*step);
Alexander
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page