Fill series from unsafe memory buffers
Posted: Tue Mar 06, 2018 6:48 am
Hi.
I have a setup where I get live data at >200kHz sampling rate with multiple channels. This data is processed (e.g. FFT) and then fed into LC. Since all calculations are done with the help of external libraries (e.g. Intel IPP), the data resides in unmanaged buffers. To get the data into a series object, I have to marshal the unmanaged memory to double[] and then create a PointLineSeries (or similar) per FFT spectrum. I guess, you turn that managed double[] back into unmanaged DirectX magic. My question is now if there is a way to fill a series directly from a vector in unmanaged memory (e.g. I give you a pointer and a length). This would really speed thing up and prohibit the excessive creation/destruction cycle of intermediate double[].
Regards, tmp
I have a setup where I get live data at >200kHz sampling rate with multiple channels. This data is processed (e.g. FFT) and then fed into LC. Since all calculations are done with the help of external libraries (e.g. Intel IPP), the data resides in unmanaged buffers. To get the data into a series object, I have to marshal the unmanaged memory to double[] and then create a PointLineSeries (or similar) per FFT spectrum. I guess, you turn that managed double[] back into unmanaged DirectX magic. My question is now if there is a way to fill a series directly from a vector in unmanaged memory (e.g. I give you a pointer and a length). This would really speed thing up and prohibit the excessive creation/destruction cycle of intermediate double[].
Regards, tmp