- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
In one of my algorithms I am computing a moving sum of a vector. Say my vector( VEC ) is length N and my window size is W I compute it like this:
ippsSum_32f(VEC+1,W,VEC,ippAlgHintFast);
int endIndx = FULL_WINDOW_SIZE+1,frontIndx = 0;
for(int k=1;k(N-W);k++,endIndx++,frontIndx++)
{
VEC = VEC[frontIndx] - VEC + VEC[endIndx];
}
Is there a faster way? Thank you for any help. Thorsan
In one of my algorithms I am computing a moving sum of a vector. Say my vector( VEC ) is length N and my window size is W I compute it like this:
ippsSum_32f(VEC+1,W,VEC,ippAlgHintFast);
int endIndx = FULL_WINDOW_SIZE+1,frontIndx = 0;
for(int k=1;k(N-W);k++,endIndx++,frontIndx++)
{
VEC
}
Is there a faster way? Thank you for any help. Thorsan
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
you can use IPP function:
/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name: ippsSumWindow_8u32f ippsSumWindow_16s32f
// Purpose:
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr one or more pointers are NULL
// ippStsMaskSizeErr maskSize has a field with zero, or negative value
// Arguments:
// pSrc Pointer to the source vector
// pDst Pointer to the destination vector
// maskSize Size of the mask in pixels
*/
IPPAPI(IppStatus,ippsSumWindow_8u32f ,(const Ipp8u* pSrc,Ipp32f* pDst,int len, int maskSize ))
IPPAPI(IppStatus,ippsSumWindow_16s32f,(const Ipp16s* pSrc,Ipp32f* pDst,int len, int maskSize ))
Regards,
Vladimir
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