On Fri, 2013-04-26 at 08:40 -0600, Zach wrote:
> Thanks Martin, that's just what I'll do.
> However, isn't the entire point of a groveler to build a little C
> program that gathers information like this for later use?

The groveler can only deal with compile-time constants. What Martin
means, I suppose, is that HUGE_VAL could be defined as a function call
to a compiler intrinsic, for instance. See
http://cvsweb.netbsd.org/bsdweb.cgi/src/include/math.h?rev=1.62


> If one were to write a general purpose way to do this, wouldn't the
> logical place to put that code be in cffi-groveler?

To do what exactly ?


> Is the main hurdle here the fact that HUGE_VAL doesn't necessarily
> have a representation as a Lisp integer or double-float, the only two
> types that cvar allows?

That too is an issue. There's another ASDF component in cffi-grovel,
named wrapper-file, that can help with automatically generating a shared
library that contains functions that wrap values which cannot be
portably grovelled, so your best choice might be to generate a wrapper
that returns an uint64_t which you then pass to
nlopt_set_lower_bounds(), completely avoiding the use of Lisp floats.

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to