On Wed, Feb 8, 2012 at 6:01 AM, Juan Jose Garcia-Ripoll <
juanjose.garciarip...@googlemail.com> wrote:
> On Wed, Feb 8, 2012 at 6:59 AM, Raymond Toy <toy.raym...@gmail.com> wrote:
>
>> Does ecl have the equivalent of cmucl's (and sbcl's)
>> with-float-traps-masked
>
>
> Not yet. This can be implemented using SI::TRAP-FPE
>
> (defmacro with-float-traps-masked (&body body)
> `(let ((%trap-bits (si::trap-fpe 'cl:last t)))
> (unwind-protect
> (progn (si::trap-fpe %trap-bits nil) ,@body)
> (si::trap-fpe %trap-bits t))))
>
This will probably work. I take it that this will disable all traps? This
would be the typical expected Fortran mode, so that's perfect.
>
>
>> and vector-sap?
>>
>
> 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.
>
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.
>
> Oh, I also need the equivalent of without-gcing.
>>
>
> You only need them to keep the arrays from gc, but this can be ensured by
> simply storing the arrays in special or local variables. ECL never moves
> data around: it relies on conservative garbage collectors.
>
Ok. I'll make sure the arrays are stored in local (lexical) variables, if
they aren't already.
Thanks,
Ray
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list