[Ecls-list] Ecl version of with-float-traps-masked and vector-sap?

Raymond Toy toy.raymond at gmail.com
Wed Feb 8 16:59:49 UTC 2012

On Wed, Feb 8, 2012 at 5:23 AM, Stas Boukarev <stassats at gmail.com> wrote:

> Raymond Toy <toy.raymond at gmail.com> writes:
> > Does ecl have the equivalent of cmucl's (and sbcl's)
> > with-float-traps-masked and vector-sap?
> >
> > With-float-traps-masked sets up the fpu state to mask certain
> > floating-point exceptions.
> >
> > Vector-sap basically takes a specialized array and returns the address
> > of where the data actually is.  This assumes that (simple-array
> > double-float (*)) is stored in memory as one or more header words
> > followed by consecutive double-floats.
> >
> > Oh, I also need the equivalent of without-gcing.
> I assume that you need without-gcing to use vector-sap safely, but SBCL
> has WITH-PINNED-OBJECTS, which prevents the GC from moving objects. So
> if ECL has something like this, I'd think it's more preferable than
> without-gcing.
That would work too.  But turning off gc shouldn't be too bad either since
it is only turned off while setting up the call, the call, and the return
from the foreign function.  Perhaps this has an impact on threaded lisps,
but matlisp is not, I think, thread-safe.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20120208/57402c0a/attachment.html>

More information about the ecl-devel mailing list