Re: [racket] math/matrix <--> FFI/array

2013-02-13 Thread Pierpaolo Bernardi
On Wed, Feb 13, 2013 at 6:51 PM, Danny Yoo wrote: > On Wed, Feb 13, 2013 at 10:49 AM, Pierpaolo Bernardi > wrote: >> On Wed, Feb 13, 2013 at 6:14 PM, Danny Yoo wrote: >> >>> Other than that, this should work ok. Can you confirm? >> >> Yes, it works. Thanks! >> >> What's the difference between _

Re: [racket] math/matrix <--> FFI/array

2013-02-13 Thread Danny Yoo
On Wed, Feb 13, 2013 at 10:49 AM, Pierpaolo Bernardi wrote: > On Wed, Feb 13, 2013 at 6:14 PM, Danny Yoo wrote: > >> Other than that, this should work ok. Can you confirm? > > Yes, it works. Thanks! > > What's the difference between _byte and _int8 ? Wow. There should have not been any differ

Re: [racket] math/matrix <--> FFI/array

2013-02-13 Thread Pierpaolo Bernardi
On Wed, Feb 13, 2013 at 6:14 PM, Danny Yoo wrote: > Other than that, this should work ok. Can you confirm? Yes, it works. Thanks! What's the difference between _byte and _int8 ? Racket Users list: http://lists.racket-lang.org/users

Re: [racket] math/matrix <--> FFI/array

2013-02-13 Thread Danny Yoo
On Wed, Feb 13, 2013 at 9:41 AM, Pierpaolo Bernardi wrote: > Another FFI question: > > I want to interface a C function which has the following signature: > > void iauA2tf(int ndp, double angle, char *sign, int ihmsf[4]) Example written: https://github.com/dyoo/ffi-tutorial/tree/master/ffi/

Re: [racket] math/matrix <--> FFI/array

2013-02-13 Thread Pierpaolo Bernardi
Another FFI question: I want to interface a C function which has the following signature: void iauA2tf(int ndp, double angle, char *sign, int ihmsf[4]) The "char *sign" parameter is a single char, not a string, output only, and is giving me problems. The C code uses this parameter simply: *

Re: [racket] math/matrix <--> FFI/array

2013-01-22 Thread Neil Toronto
On 01/22/2013 12:33 PM, Tobias Hammer wrote: When you pass it directly to c-code, maybe you can completely bypass the array and convert matrix -> flarray -> flvector -> cpointer the last 3 conversions should be blazing fast but i guess that won't matter much for 16 elements. Neil, can you neverth

Re: [racket] math/matrix <--> FFI/array

2013-01-22 Thread Tobias Hammer
When you pass it directly to c-code, maybe you can completely bypass the array and convert matrix -> flarray -> flvector -> cpointer the last 3 conversions should be blazing fast but i guess that won't matter much for 16 elements. Neil, can you nevertheless tell me more about the expected perf

Re: [racket] math/matrix <--> FFI/array

2013-01-21 Thread Neil Toronto
On 01/21/2013 02:48 AM, Pierpaolo Bernardi wrote: Hello, what's the most convenient way to convert between math/matrices and FFI/arrays? To reduce the scope of the question, at the moment I'm only interested in conversions from and to the following FFI types: (_array _double 3 3) (_array _

[racket] math/matrix <--> FFI/array

2013-01-21 Thread Pierpaolo Bernardi
Hello, what's the most convenient way to convert between math/matrices and FFI/arrays? To reduce the scope of the question, at the moment I'm only interested in conversions from and to the following FFI types: (_array _double 3 3) (_array _double 3) (_array _double 2 3) Thanks! P. __