YaccConstructor / Brahma.FSharp

F# quotation to OpenCL translator and respective runtime to utilize GPGPUs in F# applications.
http://yaccconstructor.github.io/Brahma.FSharp
Eclipse Public License 1.0
74 stars 17 forks source link

Use unsafe instead of reflection for transferring non-blittable types #142

Open dpanfilyonok opened 2 years ago

dpanfilyonok commented 2 years ago

Is your feature request related to a problem? Please describe. Using reflection to transfer non-blittable types can be quite slow.

Describe the solution you'd like Use unsafe calls for transferring non-blittable types. Namely, modify CustomMarshaler class and related to use Unsafe instead of Marshal.StructureToPtr etc.

Additional context Version: 2.0.0

Related WIP