1. 19 Mar, 2009 1 commit
    • Liam Healy's avatar
      Add 'scalarsp, eliminate 'callback-dynamic from callback-included · 88076763
      Liam Healy authored
      Add the slot 'scalarsp and eliminate the slot 'callback-dynamic from
      the class callback-included, and modify the defmobject uses
      accordingly.  All dynamic quantities (function, scalarsp, dimensions)
      will be set from slot values at run time.  This works for the objects
      ported so far:
       (lisp-unit:run-tests chebyshev)
       CHEBYSHEV: 1 assertions passed, 0 failed.
       (lisp-unit:run-tests roots-one)
       ROOTS-ONE: 6 assertions passed, 0 failed.
       (lisp-unit:run-tests minimization-one)
       MINIMIZATION-ONE: 2 assertions passed, 0 failed.
      Started working on roots-multi; it now compiles but does not run.
      88076763
  2. 17 Mar, 2009 1 commit
    • Liam Healy's avatar
      Map marrayp, roots-one and minimization-one work · 2a96cfe3
      Liam Healy authored
      The array-type as given in the callback-argspec is either :cvector or
      :marray.  The functions list-to-arrays and list-to-array expect
      argument 'marrayps or 'marrayp which are T or NIL.  That means I need
      to map the 'marrays argument in #'call-maybe-scalar which is :marray
      or :cvector to T/NIL.  Wrote function #'marrayp to do this.
      Example in one-dimensional-root-solver-fdf
      (roots-one-example-derivative +newton-fdfsolver+ nil)
      now works; in fact all roots-one tests pass:
      (lisp-unit:run-tests roots-one)
      ROOTS-ONE: 6 assertions passed, 0 failed.
      Ported minimization-one, tests pass:
      (lisp-unit:run-tests minimization-one)
      MINIMIZATION-ONE: 2 assertions passed, 0 failed.
      2a96cfe3
  3. 15 Mar, 2009 1 commit
    • Liam Healy's avatar
      Better support for array returns (prototype roots-one), ordering of load · 94bcffd5
      Liam Healy authored
      In roots-one.lisp, added arguments for dynamic callbacks.  This is not
      complete; 
       (roots-one-example-derivative +newton-fdfsolver+ nil)
      causes both SBCL and CCL to crash to low-level debuggers.
      These changes included using a new function list-to-arrays in
      call-maybe-scalar so that multiple arrays can be set. 
      New file callback-compile-defs has definitions that are needed at
      compile time of later files.  Added a call record-callbacks-for-class
      in defmobject, in addition to the expansion in the form, because the
      hash table *callbacks-for-classes* needs to be updated with the class
      being defined for the macro make-cbstruct-object to work.  Added
      comments above defmobject to explain some of the arguments.
      94bcffd5
  4. 16 Feb, 2009 1 commit
  5. 15 Feb, 2009 1 commit
    • Liam Healy's avatar
      Make 'single-function "class" for (def-)make-callbacks · e236d8d7
      Liam Healy authored
      Many callback users need just a single function taking and returning
      scalars.  These are all defined the same way.  So I have defined in
      callbacks.lisp a def-make-callbacks for 'single-function.  This works
      for chebyshev, minimization-one, and roots-one, and it should be
      applicable to callbacks sent directly to functions without being
      stored in mobjects.
      e236d8d7
  6. 11 Feb, 2009 1 commit
    • Liam Healy's avatar
      Make mobjects with :singular arguments · 5df3cc8b
      Liam Healy authored
      Some parameters to the make-* function for mobjects are taken as lists
      (like 'functions, 'dimensions) but for some mobjects it only makes sense
      to supply one.  In these cases, the :singular argument to defmobject
      indicates that that argument is to be put in a list before being
      passed to the next function.
      5df3cc8b
  7. 09 Feb, 2009 1 commit
    • Liam Healy's avatar
      New macro #'def-make-callbacks · 6b35d063
      Liam Healy authored
      New macro #'def-make-callbacks will expand to the appropriate
      defmethod for make-callback-fn, so that the defmcallbacks are defined
      appropriately.
      6b35d063
  8. 08 Feb, 2009 2 commits
    • Liam Healy's avatar
      One-dimensional root solver ported to callbacks-included · b44593b7
      Liam Healy authored
      The one-dimensional root solvers in roots-one.lisp now works in the
      callbacks-included object, including both examples, with and without
      derivatives.  The no-derivative case has been modified to
      automatically listify the function name given.  For callbacks-included
      classes that do not define 'dimensions (because they are
      one-dimensional), there is a new macro def-ci-subclass-1d that makes
      'dimensions slot a class slot with '(1).  Defined a print-object
      method for callbacks-included classes.
      b44593b7
    • Liam Healy's avatar
      Build 'one-dimensional-root-solver-f on 'callbacks-included · 19dbbe90
      Liam Healy authored
      Now define one-dimensional-root-solver-f on 'callbacks-included.  This
      needs some modification to mobject to add the 'functions slot argument
      and remove 'dimensions from the cbstruct when it is not in the
      allocation arguments.  The :functions argument must be given as a
      list, even though there's only one function.  The example
      (roots-one-example-no-derivative) works.
      19dbbe90
  9. 27 Jan, 2009 1 commit
    • Liam Healy's avatar
      Non-native and :callback-toplevel-only fixes · 86da4ec7
      Liam Healy authored
      Fixed several bugs that affected non-native implementations, where
      :inputs, :outputs, or both were not properly declared.  According to
      the CFFI manual, "Portability note: defcallback will not work
      correctly on some Lisps if it's not a top-level form." Evidently, this
      includes Clozure CL, so a new symbol :callback-toplevel-only has been
      pushed onto *features* if openmcl.  This changes examples with
      callbacks to define the callbacks in a separate defparameter rather
      than in-line when the mobject is made of the function is called.  As a
      result of both these changes, the only errors left in CCL tests were
      ones seen previously.  
      CCL 64: TOTAL: 1259 assertions passed, 3 failed, 0 execution errors.
      SBCL 64: TOTAL: 1257 assertions passed, 5 failed, 0 execution errors.
      86da4ec7
  10. 25 Jan, 2009 1 commit
    • Liam Healy's avatar
      Keyword arguments to defmobject · cd6a85f8
      Liam Healy authored
      Change optional arguments to defmobject to keyword arguments, and add
      :gsl-version argument that will create the maker function to signal an
      error if the installed version of GSL is too old.
      cd6a85f8
  11. 24 Jan, 2009 1 commit
    • Liam Healy's avatar
      Define callbacks by returning the struct pointer, without setting specials · f0c7ecec
      Liam Healy authored
      Macro defcbstruct and all the macros built on it now simply return the
      C struct needed by GSL functions instead of binding a special whose
      name is then passed to the GSL functions.  Specials can still be used
      of course in the standard way like defparameter, but the results can
      also be bound locally with a let or passed in directly.  The name of a
      callback passed to defmcallback and to defcbstruct in all the macros
      that expand both is now gensymmed (since it is used only long enough
      to put in a slot of the cbstruct) instead of taken to be the name of
      the CL function, in order to make clear the different objects.
      Unfortunately, there is appears to be a bug in CFFI using defcallback
      with an uninterned symbol in CCL, so I have put a workaround in.
      However, there is still another error even with this workaround.
      Thus test results are:
      SBCL 64: TOTAL: 1248 assertions passed, 5 failed, 0 execution errors.
      CCL 64: TOTAL: 1229 assertions passed, 2 failed, 6 execution errors.
      f0c7ecec
  12. 23 Jan, 2009 1 commit
    • Liam Healy's avatar
      Minimization will take scalar functions, added tests, optional printing · 78b88074
      Liam Healy authored
      The minimization functions may now take and return scalars or marrays.
      The examples take optional arguments with the solver method and
      whether to print the steps.  They are now part of the #'examples and
      test suite.  Use maref instead of cl-array in
      #'roots-multi-example-no-derivative.  Add optional solver method to
      roots one and roots multi, and add tests for all solvers.
      78b88074
  13. 20 Jan, 2009 1 commit
    • Liam Healy's avatar
      Least squares added to tests, make arguments optional · f755beaf
      Liam Healy authored
      Coverted required args to optional args defmfun weighted-linear-mfit
      and replaced 'parameters with 'parameters-or-size.  Added print-steps
      options for several more examples, and put the newline at the end of
      the format string.  Added tests; CCL 64 bit now fails one of the
      linear least squares (returns zeros) and the nonlinear least squares
      (good to 6 or so significant figures).
      SBCL 64: TOTAL: 1231 assertions passed, 5 failed, 0 execution errors.
      CCL 64: TOTAL: 1234 assertions passed, 2 failed, 0 execution errors.
      f755beaf
  14. 19 Jan, 2009 1 commit
    • Liam Healy's avatar
      More callbacks take and return scalars · f15ffdda
      Liam Healy authored
      More usage of callbacks using or computing multiple quantities
      now do so on scalars because the macros in GSLL pull out the
      individual elements of foreign arrays, and accept multiple values and
      put them into the right foreign arrays.  In roots-multi,
      #'multiroot-slot takes a mobject and extracts the mpointer before
      calling the foreign slot value.  Several examples in
      solve-minimize-fit now have optional 'print-steps argument.  These
      examples are now the basis for additional tests.
      f15ffdda
  15. 03 Jan, 2009 1 commit
    • Liam Healy's avatar
      Generic functions for solve-minimize-fit · f6c5e260
      Liam Healy authored
      Introduced in generic.lisp the generic functions iterate, solution,
      function-value, last-step.  These replace regular functions with
      solver-specific names.
      f6c5e260
  16. 30 Dec, 2008 2 commits
    • Liam Healy's avatar
      Define duplicate functions with defun · 8a8148f8
      Liam Healy authored
      The duplicate example functions for solving and minimizing are defined
      with defun now instead of setf fdefinition in the hopes of minimizing
      warnings and messages from some compilers.  Eliminated obsolete
      comments.
      8a8148f8
    • Liam Healy's avatar
      Specify :inputs and :outputs; more tests pass on non-native · 03e76278
      Liam Healy authored
      Several functions had incorrect :inputs and/or :outputs, which caused
      them to fail on non-native implementations.  BLAS2 and BLAS3 tests did
      not properly initialize all arrays.  Now 1187 tests pass in CCL.
      03e76278
  17. 27 Dec, 2008 1 commit
    • Liam Healy's avatar
      Set mpointer vlaue, show relevant .h file; non-int return for reinitialize-instance · 8a0ac730
      Liam Healy authored
      In defmobject, set the mpointer value if #'allocate is being called.
      For each file that defines a defmobject, I put a comment at the top
      showing the relevant GSL header file.  For generators and quasi, the
      (re)initializing function returns void and not an :int, so that is
      changed in the defmobject definition, which now permits a list of two
      elements in initialize-suffix, with the second element indicating the
      :c-return.
      8a0ac730
  18. 26 Dec, 2008 2 commits
    • Liam Healy's avatar
      Calling mobjects with #'mpointer, generic function #'name · 297c08b2
      Liam Healy authored
      GSL functions that take GSL objects as arguments must have #'mpointer
      called on each argument.  Created a generic function #'name and
      changed all the *-name (or name-*) functions that acted on mobjects to
      this function.
      297c08b2
    • Liam Healy's avatar
      Full use of defmobject; elimination of letm · b09dc9d2
      Liam Healy authored
      All GSL objects are full CL objects with garbage collection.  There is
      no need to manually free the associated memory.  All objects may be
      assigned in the normal CL way, e.g. let, so there is not #'letm macro
      anymore.  Everything compiles cleanly in gsll, but nothing has been
      tested.
      b09dc9d2
  19. 25 Dec, 2008 1 commit
  20. 24 Dec, 2008 1 commit
  21. 16 Nov, 2008 1 commit
  22. 25 Jul, 2008 1 commit
  23. 18 Feb, 2008 1 commit
  24. 16 Feb, 2008 1 commit
  25. 03 Feb, 2008 2 commits
  26. 28 Jan, 2008 1 commit
  27. 21 Jan, 2008 3 commits
  28. 16 Jan, 2008 1 commit
  29. 14 Jan, 2008 1 commit
  30. 13 Jan, 2008 1 commit
  31. 09 Jan, 2008 1 commit
  32. 08 Jan, 2008 1 commit