- Nov 25, 2010
-
-
Liam Healy authored
New macros #'maref and #'(setf maref) get and set elements of the GSL array directly from the mpointer. These are not used by users, but in the make-funcallable-form expansion of callbacks when scalarsp = T is specified. This fixes an error in the argument order in the (setf get-value) generic function that this replaces.
-
- Jul 14, 2010
-
-
Liam Healy authored
Define get-value and (setf get-value) methods for matrices, and compute two indices when used, by making use of affi::delinearize-index. Add &rest to *defmfun-llk* so that it won't be included in the ignore list. Minor fixes to make more tests work.
-
Liam Healy authored
-
- Jul 13, 2010
-
-
Liam M. Healy authored
-
Liam M. Healy authored
Using the new function faify-form, pointers passed by GSL to callbacks are converted to foreign-array objects if scalarsp is nil. This has been tested on multidimensional minimization only so far, and works. Note that this is potentially inefficient, as each time the callback is called, new objects are made and in the callback itself any grefs involve a generic function dispatch. However, it is easier to write the callback than dealing with the raw pointer.
-
Liam Healy authored
The functions get-value and (setf get-value) are now used in #'reference-foreign-element for scalarsp. They are also used as a demonstration for vector callbacks in minimization-multi, but perhaps a better interface could be constructed.
-
- Jul 11, 2010
-
-
Liam Healy authored
-
Liam Healy authored
In reference-foreign-element for callbacks being passed scalars, use the new function gref-mpointer-form instead of grid:gref. This function expands to one of the gsl_*_get functions to directly get an element from the GSL mpointer, instead of using the foreign-array mechanism.
-
- Jul 01, 2010
-
-
Liam Healy authored
-
- Jun 30, 2010
-
-
Liam Healy authored
-
- Jun 27, 2010
-
-
Liam Healy authored
Package renamed to :grid from :c-array, function renamed to 'foreign-pointer from 'c-pointer. Eliminate reference to native. Port make-marray-or-default to foreign-array.
-
- Dec 27, 2009
-
-
Liam Healy authored
Add copyright and license information to each file, include a copy of the GPL under documentation/COPYING.
-
- Dec 08, 2009
-
-
Liam Healy authored
Eventually, the definitions used for dealing with types and foreign arrays that aren't specific to GSL will be split off into another system, so that it will be easier to build other foreign library interfaces using these definitions. As a start, the grid/ directory defines a package 'c-array and some of the type definitions formerly in init/. Everything compiles and tests as before, on SBCL TOTAL: 1627 assertions passed, 6 failed, 0 execution errors.
-
- Apr 05, 2009
-
-
Liam Healy authored
Internally call the :callbacks argument to defmobject or defmfun 'cbinfo, to better distinguish it in the source code. In numerical integration example functions, apply #'realpart, because implementations are permitted to return complex numbers from #'expt when the second argument is a float.
-
- Apr 03, 2009
-
-
Liam Healy authored
Created file init/utility.lisp, which now includes make-symbol-cardinal and make-symbol-cardinals. These functions in turn will now take a list for name, and join the symbols together with "-", and will optionally intern in a package. In #'callback-args in callback.lisp, the args are now numbered sequentionally (still uninterned, but no longer gensymmed). In #'expand-defmfun-wrap in defmfun.lisp, the symbols for specials "dynfn" and "cbfn" that are made are now interned, numbered sequentially, and named after the function in which they occur. This doesn't affect the functionality of the functions, it is just for readability of the macroexpansion. Expected tests pass.
-
- Apr 01, 2009
-
-
Liam Healy authored
Redefine the form of :callback-dynamic to be (dimensions (function scalarsp) ...) and usage in numerical-differentiation, numerical-integration, and monte-carlo. Parse this variable in callbacks.lisp with #'cbd-dimensions and #'cbd-functions. Fix error in wfo-declare which had gsl-function hardwired. If manually defined (defconstant +success+ 0), all tests that pass in master also pass here: SBCL TOTAL: 1451 assertions passed, 5 failed, 0 execution errors. CCL TOTAL: 1454 assertions passed, 2 failed, 0 execution errors.
-
- Mar 31, 2009
-
-
Liam Healy authored
Both numerical-differentiation and numerical-integration have new :callbacks and the expansion calls new function #'make-compiled-funcallable which makes the funcallable at function-call time. Spot tests of both work. If a function passed to set-slot-function is nil, it will set the slot to null-pointer.
-
- Mar 30, 2009
-
-
Liam Healy authored
Changed the defmobject definitions to handle a 'callback-included-cl object. Changed the ODE solver definitions to take separate arguments for the function and Jacobian, as well as scalarsp. Not completely finished, but tests (integrate-vanderpol 1.0d0 1.d-4 +step-rk2+ nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rkf45+ nil) work correctly.
-
- Mar 29, 2009
-
-
Liam Healy authored
All mobject-based callbacks now use the funcallable mechanism, except ODE, which has been ported but fails to compile. All other tests pass. In the event of some or all arguments are scalars and not arrays, #'array-element-refs will return just the argument symbol. To avoid double quoting the function name when calling the object maker, let bind 'function-designator in #'make-funcallable-form which does the quoting.
-
Liam Healy authored
The callback-included objects now have a slot 'funcallables which is set by a function #'make-funcallables-for-object which is used by make-reinitialize-instance. This required swapping the order of :callback-object and :before in body-expand, which shouldn't affect anything else. New name #'make-funcallable-form renamed from #'make-funcallable to clarfiy distinction with #'make-funcallables-for-object. Eliminated select-dynamic-values.
-
Liam Healy authored
The callback call chain (for mobjects at the moment) now calls make-funcallable when the mobject is made. The :callbacks format is slightly different in that :slug is required. The derivative-free minimization-multi example works, but requires a double quote on the function name, which should be fixed. The runtime-called function #'call-maybe-scalar and its supporting definitions have been removed, in anticipation of all callbacks using make-funcallable.
-
- Mar 28, 2009
-
-
Liam Healy authored
The function #'make-funcallable creates a lambda form that acts as a bridge between the callback as passed to GSL and the user's function. It can be optionally compiled and is funcalled in the defmcallback expansion; it takes the user's function as an argument.
-
- Mar 27, 2009
-
-
Liam Healy authored
Write and rewrite in terms of parse-callback-fnspec and parse-callback-argspec: make-symbol-cardinal reference-foreign-element callback-set-mvb make-funcallable The goal is to generate a lambda that wraps the user function and makes a funcallable function that defmcallback can call. Not finished, not compilable.
-
- Mar 26, 2009
-
-
Liam Healy authored
New specification of callback arguments parse-callback-argspec takes io, element-type, array-type, dimensions Not at all implemented anywhere in the code. Made file funcallable.lisp out of the old defmcallback, designed to create a lambda for compilation that will be funcalled by the (new) defmcallback body. This still uses the old specification for function arguments. Started porting ODE callbacks, but this has been suspended while the first two changes are being completed. None of this works in any way.
-