- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm new to IPP, and I have a somewhat basic question. Suppose I have a vector "v" of float32 values 1-9. I want to take some of the middle values (e.g. 5-7) and assign them to another vector "v_subset." I can't seem to find the function to do that. ippsMove_32f and ippsCopy_32f seem to only allow me to take the first x values of the vector, but I'm interested in a subset from the middle of the vector. Basically, what I'm trying to accomplish is something like the following:
void main()
{
Ipp32f v[9] = {1,2,3,4,5,6,7,8,9};
Ipp32f v_subset[3];
\\ some function that sets Ipp32f v_subset equal to {"5 6 7"}
}
Thanks for your help!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David, You need to do this:
...
Ipp32f v[9] = {1,2,3,4,5,6,7,8,9};
Ipp32f v_subset[3] = { 0, 0, 0 };
ippsCopy_32f( &v[4], &v_subset[0], 3 );
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Works! Thanks Sergey for your quick reply and help.
-David
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