Try passing `a[0].addr` and changing the type of your sequence to 
`seq[cfloat]`. Arrays in C/C++ are just a pointer to consecutive elements in 
memory. Nim sequences are also that, but with a couple fields to track length 
and capacity. So by getting the pointer to the first element you have a pointer 
to contiguous elements. Changing to `cfloat` is just to make sure that the 
float types used my C and the one used by Nim is the same. `float` in Nim is 
set to `float64` while `float` in C is often 32 bits. This would lead to very 
strange output.

Reply via email to