<br><br><div class="gmail_quote">On Wed, Feb 8, 2012 at 12:38 PM, Juan Jose Garcia-Ripoll<span dir="ltr"></span> <br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote"><div>
</div><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





and vector-sap?<br></blockquote><div><br></div><div>Hmm, is this for the CFFI? Because it is going to depend very much on what VECTOR-SAP has to return. For UFFI you have SI::MAKE-FOREIGN-DATA-FROM-ARRAY which takes an array and returns an UFFI pointer. Alternatively, C-INLINE may be easily used to retrieve the pointer in a C format.</div>



</div></blockquote></div><div><br>Thanks for the tips.  I'm not very familiar with cffi or uffi.  Basically, vector-sap needs to return something that can be made into a pointer for a foreign function to use as the address of an array/vector.<br>


</div></div></blockquote><div><br></div></div><div>I do not know how MATLISP invokes BLAS or equivalent functions. If you need a pointer, then you need to know in which format MATLISP needs it.</div></div></blockquote><div>
<br>The pointer is a C style pointer to a vector of double-floats.<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote">
<div><br></div><div>I had a look at MATLISP. It is probably not unconceivable to translate it all to ECL's FFI constructs. Seems that all the fortran interface is in one file (ffi-*.lisp) and generates code automatically. Producing the associated C code would be easy and more efficient.</div>
<br></div></blockquote><div><br>I don't doubt this, but since I'm not at all familiar with ecl's ffi, I'd like to leverage cffi to do all the dirty work.<br><br>Ray<br><br></div></div>