1. 01 Jan, 2009 1 commit
    • Liam Healy's avatar
      No 64 bit integers on 32 bit platforms · c057c7f3
      Liam Healy authored
      Both CLISP and SBCL fail when making arrays of 64 bit integers,
      despite cffi-features:no-long-long being absent for either.
      Therefore, conditionalize away these types in *array-element-types* on
      32 bit platforms in general, and conditionalize away all the 64 bit
      tests as well.  Separated out integer size check into types.lisp.
      Restored tests vector-min and vector-max which fail in SBCL for
      (signed-integer 8) and (signed-integer 16) for unknown reasons. 
      Test results:
      64 bit SBCL:   TOTAL: 1223 assertions passed, 5 failed, 0 execution errors.
      64 bit CCL:    TOTAL: 1228 assertions passed, 0 failed, 0 execution errors.
      32 bit SBCL:   TOTAL: 1069 assertions passed, 31 failed, 0 execution errors.
      32 bit CLISP:  TOTAL: 1051 assertions passed, 27 failed, 5 execution errors.
      c057c7f3
  2. 31 Dec, 2008 3 commits
    • Liam Healy's avatar
      Fully functional on CCL · 26ad3502
      Liam Healy authored
      After exiting the foreign call, defmfun now inserts a form to set
      C-invalid to nil for outputs, as well as CL-invalid to T.
      Conditionalize the definition of native-pointer to native, because
      it's only used on native implementations and its definition in CCL was
      causing a spurious warning.  Removed defmfun expansion examples
      because there are plenty of examples available now.  From scratch,
      gsll and gsll-tests compiles and runs cleanly on CCL with no warnings
      or errors, and all 1208 tests pass.
      26ad3502
    • Liam Healy's avatar
      Redesign polynomial-solve, invert matrix · 4f581352
      Liam Healy authored
      The function #'polynomial-solve is now directly defined with defmfun
      with a single required argument and two optional arguments: the answer
      vector-complex-double-float and the workspace, both of which default
      to the right thing.  The returned is now the this marray instead of a
      list.  Simplify the definition of #'invert-matrix and return the
      matrix-double-float instead of the CL array.  All tests pass SBCL and
      CCL with trace.
      4f581352
    • Liam Healy's avatar
      Specify :inputs and :outputs; CCL works · 54353bcb
      Liam Healy authored
      More :inputs and :outputs specified.  CCL now passes all 1208 tests if
      certain functions are traced (bug in CCL?)
      (trace polynomial-eval-divided-difference swap-elements
             permutation-reverse lu-invert permutation-next)
      54353bcb
  3. 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
  4. 29 Dec, 2008 3 commits
    • Liam Healy's avatar
      Better support for non-native implementations · c01366d6
      Liam Healy authored
      Testing with Clozure reveals more details on the stack overflow
      problem than what CLISP reveals.  This is fixed by using #'slot-value
      instead of #'cl-array in  #'copy-c-to-cl and #'copy-cl-to-c.
      Non-complex arrays were not handled correctly in
      #'copy-array-from-pointer; fixed.  There is a dependency of
      permutation and combination on the definition of #'data-class-name
      through defmfun.  Test results:
      CCL: TOTAL: 1143 assertions passed, 52 failed, 3 execution errors.
      CLISP: TOTAL: 996 assertions passed, 149 failed, 11 execution errors.
      SBCL: TOTAL: 1208 assertions passed, 0 failed, 0 execution errors.
      (But only the second time it's run in SLIME.)
      Variable *print-contents* to disable printing of marray contents in
      print-object; this is helpful for debugging.
      c01366d6
    • Liam Healy's avatar
      Port to non-native implementation and CLISP · b3c65d75
      Liam Healy authored
      Make functional for non-native CL implementation, with allocation of C
      arrays and correct copying between CL and C sides.  Testbed for this
      is CLISP, but CLISP has several problems which may be a problem with
      the GSLL code or may be in CLISP:
       - need to set sys::*inhibit-floating-point-underflow*
       - CLISP doesn't see defconstant defined when it's used in the same file
       - many tests give "Program stack overflow" error and debugging
          procedure not clear
       - failure on amd64 bit platform
      b3c65d75
    • Liam Healy's avatar
      GSL arrays created by GSL functions · 38ddfa1a
      Liam Healy authored
      Made the generic function #'contents-from-pointer that takes a pointer
      to a GSL struct and produces a list of the contents suitable for the
      :initial-contents argument to #'make-marray.  Added an argument
      :from-pointer to #'make-marray that then creates a new marray with the
      same contents.  Some functions in solve-minimize-fit return a pointer
      to a GSL vector with double-floats.  Copying in this way is necessary
      because GSL has malloced the data in a non-CL place.  Sometimes, this
      results in the copying of data whose only further use will be to
      extract a pointer to pass to another GSL function.  Added a method
      to #'mpointer that permits directly passing a pointer, but this isn't
      useful for arrays because there are many element types so the
      functions have been defined as methods.
      38ddfa1a
  5. 28 Dec, 2008 2 commits
  6. 27 Dec, 2008 3 commits
    • Liam Healy's avatar
      Updated tests; all pass · 64fea6a9
      Liam Healy authored
      Fixes to some definitions 
      lognormal, discrete: use #'mpointer
      lu: new syntax for making array
      quasi: order of arguments fixed in make-quasi-random-number-generator
      sorting: syntax to make combination
      All tests have been regenerated because syntax for arrays etc. has
      changed.  Visually inspected that results match previous check in.
      64fea6a9
    • Liam Healy's avatar
      New function #'mpointer replaces #'generator · e88a5593
      Liam Healy authored
      New function #'mpointer replaces #'generator for random functions.
      e88a5593
    • 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
  7. 26 Dec, 2008 5 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
    • Liam Healy's avatar
      New class foreign-array, new names: marray, make-marray, mobject.lisp · 7c66d57b
      Liam Healy authored
      New class foreign-array represents foreign (C) arrays, without GSL or
      mobject superclass.  New class name 'marray was 'gsl-data,
      representing arrays in GSL.  These objects are made by #'make-marray,
      formerely #'make-array*.  New file names: init/mobject.lisp was
      init/gsl-objects.lisp and data/marray.lisp was data/data.lisp.
      7c66d57b
    • Liam Healy's avatar
      Added wavelet defmobject · a9dda7c4
      Liam Healy authored
      Didn't see this in previous checkin.
      a9dda7c4
    • Liam Healy's avatar
      Permit alternate origin of mpointer; #'clone · 38d9c4f4
      Liam Healy authored
      Redesign #'defmobject so that a new method #'allocate is defined that
      calls the standard GSL allocate function for each object.  Shrink the
      initialize-instance :after method to call #'allocate if the mpointer
      isn't given, and then set the finalizer.  This way, an :mpointer made
      by something other than the allocate function may be supplied to the
      make-instance, and the object will be made correctly.  This is used by
      #'clone functions in histogram and random number generators.  Not
      compiled or tested, but macroexpansions look right.
      38d9c4f4
  8. 25 Dec, 2008 1 commit
  9. 24 Dec, 2008 2 commits
    • Liam Healy's avatar
      More GSL objects now defined with defmobject · e5e286ac
      Liam Healy authored
      More GSL objects now defined with defmobject; they look like they
      expand correctly but are not compiled.
      e5e286ac
    • Liam Healy's avatar
      GSL object makers with mixed arguments · adbbbbcd
      Liam Healy authored
      GSL objects made with defmobject and that have use at least one
      argument in some way for both initialization and reinitialization, or
      for using functions of those arguments, are accomodated with an
      optional argument 'arglists-function to defmobject.  This should be a
      function that produces three arglists: for the maker, the
      initialization method, and the reinitialization method.  The order of
      arguments generated for other cases is now preserved with :from-end in
      #'variables-used-in-c-arguments.  Examples for interpolation and
      acceleration (lookup), still commented out.
      adbbbbcd
  10. 22 Dec, 2008 2 commits
    • Liam Healy's avatar
      Merge from master · d310adfd
      Liam Healy authored
      Merged in minor changes from master.
      d310adfd
    • Liam Healy's avatar
      New class mobject, new hierarchy, clean up files · 9b588763
      Liam Healy authored
      Redefine 'mobject from 'gsl-object.  The class 'gsl-data in data.lisp
      is now a subclass of it, and does not explicitly have the mpointer
      slot, because mobject does.  Adapted #'defmobject to work with objects
      that have no "setter" (initialization).  This expands correctly for
      basis-splines (no setter) and hankel (setter).  The basis-splines
      defintions rely on the new mobjects.
      9b588763
  11. 16 Dec, 2008 1 commit
  12. 15 Dec, 2008 2 commits
    • Liam Healy's avatar
      Prototype defmobject · ed5ce113
      Liam Healy authored
      In gsl-objects, define a prototype defmobject which defines:
       - the class for the gsl object
       - initialize-instance :after method to correspond to GSL
        "alloc" and attach the finalizer,
       - define reinitialize-instance :after method to correspond to a setter
        or intialize in GSL,
       - define a make-<class-name> function that will be the customary user
        interface, and will call make-instance and possibly
        reinitialize-instance if defined.
      Worked up example in hankel.lisp.  This compiles successfully and
      looks correct, but has not been tested.
      ed5ce113
    • Liam Healy's avatar
      d207414c
  13. 14 Dec, 2008 1 commit
    • Liam Healy's avatar
      Changes to defmfun to permit method qualifiers and &key arguments · 92b0b413
      Liam Healy authored
      Add :qualifier argument to defmfun, used when methods are defined to
      allow qualifiers such as :after or :before.  Permit &key arguments.
      Check the :after argument to defmfun for usage of argument variables
      to prevent them from being declared ignored.  Note:  This uses
      stupid-code-walk-find-variables, and is, well, stupid.  These changes
      are all designed to permit the definition of #'initialize-instance and
      #'reinitialize-instance methods for GSL objects.
      92b0b413
  14. 08 Dec, 2008 1 commit
    • Liam Healy's avatar
      Array input and output declarations · 1a2ebe96
      Liam Healy authored
      A somewhat comprhensive attempt to make sure :inputs, :outputs, and
      :return arguments in defmfuns match what the function is expecting and
      will return, so that non-native implementations will work correctly
      for copying, and native ones will work correctly for pinning.  The
      :return argument now defaults to :outputs in most circumstances.
      1a2ebe96
  15. 07 Dec, 2008 2 commits
    • Liam Healy's avatar
      Non-native synchronization · bca08efd
      Liam Healy authored
      Define and call copy-cl-to-c and copy-c-to-cl only for non-native
      implementations; they include checks of the flags c-invalid and
      cl-invalid.  Make sure synchronization is called at the right points.
      Make sure that flags are set at the right points and cleared after a
      copy.  Not tested yet.  Any per-function problems are likely from
      incorrect listing of inputs and/or outputs.
      bca08efd
    • Liam Healy's avatar
      Make FFA at initialize-instance time for gsl-data; restore permutations and combinations · 4c380808
      Liam Healy authored
      Instead of making the ffa in make-array*, we now make it in the
      initialize-instance :after method for gsl-data.  This means that
      subclasses (permutations, combinations) will automatically make the
      arrays.  Rewrote make-array* so that it is just a wrapper for
      make-instance, computing the dimensions from the specified initial
      parameters.  Permutations and combinations are now made with make-*
      functions.
      4c380808
  16. 06 Dec, 2008 1 commit
    • Liam Healy's avatar
      Eliminate letm expansions etc. for data · 95be73ee
      Liam Healy authored
      The letm expansion definitions for arrays, permutations, and
      combinations has been eliminated.  These objects are now made with
      there own functions and may be created anywhere, not necessarily
      inside a letm.
      95be73ee
  17. 01 Dec, 2008 1 commit
    • Liam Healy's avatar
      GSL array making with make-array* and #m · 83cd8040
      Liam Healy authored
      GSL arrays are garbage-collected objects, and so can be made like any
      other lisp object; they do not need to be make inside a wrapper form.
      #m is a macro which makes them; it expands to a #'make-array* call.
      Examples and usage ported to this new form.  Compiled only; not tested
      yet.  No effort to port to non-native implementation yet; tests as
      expanded in the tests/ directory are not ported yet.
      83cd8040
  18. 29 Nov, 2008 2 commits
  19. 28 Nov, 2008 1 commit
    • Liam Healy's avatar
      Native arrays do not need wrapper · 9b1ed35d
      Liam Healy authored
      Native arrays are now completely dynamic, i.e., they are garbarge
      collected and there is no need for any kind of wrapper, because the
      with-pinned-objects is wrapped at the defmfun level.  Most tests pass
      on SBCL, but there are still a number that fail.  The GSL parts are
      always present; there is potentially unnecessary allocation of all
      GSL-required structs at creation time, which might merit some
      investigation for a more just-in-time creation procedure.  Potential
      problems on non-native implementations completely uninvestigated.
      9b1ed35d
  20. 23 Nov, 2008 1 commit
    • Liam Healy's avatar
      Finalizer in alloc-gsl-struct replaces free-gsl-struct · 87723ec1
      Liam Healy authored
      Using trivial-garbage to define a portable finalizer in
      #'alloc-gsl-struct.  Removed #'free-gsl-struct; #'expand-data no
      longer calls #'free-gsl-struct.  As in the old free-gsl-struct, the
      finalizer removes the gsl-vector-c or gsl-matrix-c, and the
      gsl-block-c if applicable.  Test results are the same (1 failure for
      unrelated reason).
      87723ec1
  21. 17 Nov, 2008 1 commit
    • Liam Healy's avatar
      Analysis of port progress; improve documentation · ebf82b24
      Liam Healy authored
      Started in file init/analysis.lisp some definitions that will aid in
      gauging how much of GSL GSLL covers.  It will not normally be loaded
      (and depends on port system which is not required for GSLL) because it
      is mainly used by developers.  It is not yet finished.  Hash size for
      *gsl-symbol-equivalence* increased to reflect actual number of symbols
      present when GSLL is loaded.  Improved documentation.
      ebf82b24
  22. 16 Nov, 2008 2 commits