[cffi-devel] How to define a pointer to a 2d array

Joeish W joeish80829 at yahoo.com
Sat Nov 23 01:09:50 UTC 2013


I have a function that accepts a  void* as a parameter

Im trying to convert this to use as the void* 


float trainingData[4][2] = { {501, 10}, {255, 10}, {501, 255}, {10, 501} };

this is how i do a void* 1d array 


  float labels[4] = {1.0, -1.0, -1.0, -1.0};

(labels (foreign-alloc :float :initial-contents '(1.0 -1.0 -1.0 -1.0)))

so how  do i do the 2d array
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20131122/90a33a05/attachment.html>


More information about the cffi-devel mailing list