mathnet-numerics icon indicating copy to clipboard operation
mathnet-numerics copied to clipboard

Span<T> & Memory<T> on Fourier

Open macaba opened this issue 3 years ago • 2 comments

An example how an updated API might look (and naive fixing of unit tests).

Whilst doing this, I saw many opportunities for reducing memory allocations so this would probably be the subject of a 2nd pass through this.

macaba avatar Nov 13 '21 16:11 macaba

Pain points:

The CommonParallel.For and Storage<T> APIs are not Span compatible, hence the fallback to Memory<T> and .ToArray(). Hopefully someone more familiar with Math.Net can weigh in here with possible solutions.

macaba avatar Nov 13 '21 17:11 macaba

Thank you!

I really would like to move forward in this direction, and also have some thoughts already. I'll try to get back to you as soon as time permits!

cdrnet avatar Nov 29 '21 20:11 cdrnet