It would be great to have a partial sum (a.k.a. cumulative sum) added to ipps for 1d arrays, similar to C++'s std::partial_sum/inclusive_scan.
The current closest alternative which I've found is ippIntegral under ipp's image processing, but it has some drawbacks:
1) When using the function for summing just one row, the i-th element of the row isn't included in the i-th element of the partial sum (similar to C++'s std::exclusive_scan), making it awkward to use when what you want is an inclusive scan.
2) It supports 2d arrays (for images), which means:
- The interface is overly-complex for the simple common use-case of partial-summing a 1d array
- Some performance is probably left on the table since the algorithm is overly-generic for the 1d use case
I suggest adding both flavors of the 1d partial sum, both the inclusive and the exclusive one.
I've seen additional indications of interest in this functionality in these posts:
thanks for your suggestion.
Could you share more of your situation like, what project are you working on that needs this particular function?
It sounds great but it needs to go through internal discussions to put it on the process.
Could you submit your request through https://supporttickets.intel.com/?lang=en-US ?
This is official online service center.
Done, the request number is 03510375.
As for the use case - we make audio processing effects in Sound Radix, for which we implement various algorithms. This is a function which we would use in such algorithms.
unfortunately, the engineering decided not to implement this feature.
The reason is that It can’t be vectorized because of the feedback dependency (each next point depends on all previous) – therefore we can’t expect any significant speedup because of optimization in IPP.
Rather we can use very simple C-loop and try to compile it with ICC with the corresponding arch switch – but we don’t guarantee that it will create any significant speedup over MS std lib.
Because of the reason above we decided not to implement this functionality in IPP.
thank you for your request and using IPP.