Ignoring more efficient ways to pass memory to C for a moment,
superficially I do think your code using Pinner should work. Do you have a
full reproducer? It's hard to tell from just looking at your code if your
code is the problem, or its just enough to trigger some other cgo issue
elsewhere i
To convert a Go slice to C array is easy with unsafe.Slice.
The problem is that the multi-dimensional C array is an array of pointers
(*(*float64))
which cannot travel between the C/Go barrier.
In your example, you flatten your slice, and recreate the pointers in that
one big slice.
You could g