NOpenCL icon indicating copy to clipboard operation
NOpenCL copied to clipboard

Support copying data between Buffer and managed arrays

Open sharwell opened this issue 7 years ago • 1 comments

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.

sharwell avatar Jul 09 '17 21:07 sharwell

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.

Dima3108 avatar May 23 '21 16:05 Dima3108