NOpenCL
NOpenCL copied to clipboard
Support copying data between Buffer and managed arrays
Currently EnqueueReadBuffer
and EnqueueWriteBuffer
operate on unmanaged memory addresses, requiring developers to use additional steps to get the data into managed arrays. The API would benefit from improved type safety for these calls, e.g. by using Span<T>
or T[]
as the source/destination.
:link: Originally identified by @SunsetQuest in https://github.com/tunnelvisionlabs/NOpenCL/pull/1/commits/b642642bacce3ae8b0222c24cabc84daf40a94af, https://github.com/tunnelvisionlabs/NOpenCL/pull/1/commits/abc7302b79d77040d65a4f2ae843ee769718ea0e.
Hello Sharwell, Span <T> cannot be used in the .NET Framework, and this library is intended for the .NET Standard that has support for the NET Framework, so Span <T> would limit the compatibility of this library with applications on the NET Framework.