1. 29 Nov, 2008 1 commit
    • Liam Healy's avatar
      Combinations are garbage-collected; restore floating-point and mathematical · 59f80be4
      Liam Healy authored
      Redefine #'alloc-gsl-struct as a generic function and define a method
      specifically for combinations.  Define #'native-pointer in
      defmfun.lisp with a new function #'native-pointer-protect made from
      its body left in data.lisp, so that now floating-point and
      mathematical can be compiled and loaded as defined in the asd file.
      Use :pointer for foreign argument types instead of gsl-vector-c.
      59f80be4
  2. 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
  3. 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
  4. 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
  5. 16 Nov, 2008 5 commits
    • Liam Healy's avatar
      Renamed conditions to more lisp-like names · 4f2c390f
      Liam Healy authored
      Renamed conditions in init/conditions.lisp and elsewhere to be more
      lisp like; e.g. EDOM is not 'input-domain.  All tests except one pass.
      4f2c390f
    • Liam Healy's avatar
      Tests in separate system gsll-tests · f42d6f00
      Liam Healy authored
      Tests are now separated from examples and defined in a new system
      gsll-tests.  Change name of condition 'input-error from 'EDOM.
      f42d6f00
    • Liam Healy's avatar
      Sclar addition/multiplication use doubles for the scalar · 9b15d4b5
      Liam Healy authored
      GSL uses doubles for scalar addition and multiplication, regardless of
      the element type of the array, so modified the definitions of #'m*c,
      #'m+c accordingly.
      9b15d4b5
    • Liam Healy's avatar
      Updated documentation · 817cdcef
      Liam Healy authored
      New dependency; simplified terminology.
      817cdcef
    • Liam Healy's avatar
      Removed dependence on FFA and iterate · c561b4d5
      Liam Healy authored
      By incorporating a few definitions modified from Tamas Papp's FFA
      directly into GSLL, there is no dependence anymore on FFA separately.
      With the conversion of a few definitions, the dependency on iterate
      has therefore been eliminated also.  This compiles without errors or
      warnings on SBCL.
      c561b4d5
  6. 12 Nov, 2008 3 commits
    • Liam Healy's avatar
      Include #'make-ffa · 22f2a25f
      Liam Healy authored
      Include #'make-ffa from Tamas Papp's ffa/ffa.lisp to
      foreign-friendly.lisp and eliminate the call to
      #'match-array-element-type, so that 'element-type must be a CL type.
      Temporarily rename this to #'make-ffa*; once I no longer load or
      import ffa, it can be renamed back to #'make-ffa.
      22f2a25f
    • Liam Healy's avatar
      New function #'cl-cffi renamed from #'cl-ffa · d9e5bb32
      Liam Healy authored
      To make terminology consistent, the "C standard" form of type, also
      what I call "CFFI" form, is called that instead of "FFA" in some
      places.  Specifically, #'cl-cffi is renamed from #'cl-ffa and now the
      name matches the already-existing #'cffi-cl.
      d9e5bb32
    • Liam Healy's avatar
      Delete early experiment with foreign-friendly arrays · 1e3e4a57
      Liam Healy authored
      In early experimentation with foreign-friendly arrays, I developed a
      way to directly use the foreign-friendly arrays in GSL code using raw
      C arrays.  This was successful.  Subsequently, I rewrote the gsl-data
      objects to have foreign-friendly arrays underlying them, whether they
      create raw C arrays, GSL arrays, or both, so the early experiment is
      obsolete and is deleted in this commit.
      1e3e4a57
  7. 09 Nov, 2008 6 commits
    • Liam Healy's avatar
      Tests for BLAS2 and BLAS3 · 1518473a
      Liam Healy authored
      Added tests for all array element types for BLAS2 and BLAS3.  Those
      functions that take complex scalars as arguments will not work due to
      CFFI's lack of support for passing structs directly.  The rank n
      update functions in BLAS2 gives an "Matrix, vector lengths are not
      conformant" error (EBADLEN), which needs to be tracked down.
      Therefore, none of these tests are defined in either file.  Fixed
      arguments to C function in #'matrix-product-symmetric and
      #'inverse-matrix-product in BLAS3.
      1518473a
    • Liam Healy's avatar
      BLAS1 tests · 4c095d18
      Liam Healy authored
      Defined a complete set of BLAS1 tests for all element types.  The
      duplicate Givens function and the "modified" Givens rotations, which
      are not explained in the GSL documentation, are excluded.
      4c095d18
    • Liam Healy's avatar
      Sorting tests, definitions for matrices · 135620f7
      Liam Healy authored
      Define some sorting functions for matrices, using the gsl_sort
      functions that work on C pointers.  Define sorting tests for all
      element types.  Update documentation to clarify lack of stride option.
      135620f7
    • Liam Healy's avatar
      Mean and variance for all arrays · 370307e4
      Liam Healy authored
      Define mean and variance functions for matrices as well as vectors.
      This required a modification to #'expand-defmfun-generic and to
      #'actual-array-c-type to permit the use of "both" when there is an
      optional argument, and thus two C argument lists.  Defined tests for
      all unweighted functions and element types.  Because there appears to
      be a bug in the GSL library in computing single floats, no tests have
      yet been defined for these functions.
      370307e4
    • Liam Healy's avatar
      Create vector-only and matrix-only tests · af2866c2
      Liam Healy authored
      Create vector-only and matrix-only tests, and eliminate old comments
      and test definitions.  Define outputs and returns for some vector and
      matrix functions that didn't have them.
      af2866c2
    • Liam Healy's avatar
      Complete "both" array tests · 32b971a4
      Liam Healy authored
      Complete set of tests on array operations that are defined for both
      vectors and matrices.  Added documentation to generate-tests to
      explain how it works and why it's there.  Fixed bug in
      #'expand-defmfun-generic that occured when both arrays are generated,
      due to key-args being altered.
      32b971a4
  8. 02 Nov, 2008 2 commits
    • Liam Healy's avatar
      #'array-default makes both vectors and matrices; pool numbers with correct type · f8adee82
      Liam Healy authored
      For testing, both vectors and matrices can be made with
      #'array-default, replacing #'vector-default.  The numbers in
      *double-float-pool* in are now double floats (with d0), and the
      #'make-list-from-pool coerces to the right type.  In both.lisp,
      #'set-value and #'get-value are for vectors only, not both, because
      matrices require an extra index argument.  Since these functions are
      for debugging only as the comment says, I'm writing equivalent matrix
      functions, and I'm not doing tests for them.
      f8adee82
    • Liam Healy's avatar
      Complex arrays initialize correctly; pool data 8-bit correct; new array tests · 8f43fe94
      Liam Healy authored
      Complex arrays can be initialized with either reals or complexes.  If
      initialized with reals, there must be an even number.  Now created
      complex arrays are the right length and are not always zero in the
      imaginary part.  Pool data supplied in *signed-byte-pool* is between
      ±127 inclusive, instead of ±255, which is required for making
      (signed-byte 8).  Added some tests from functions in both.lisp to
      generate-tests.lisp.
      8f43fe94
  9. 25 Oct, 2008 1 commit
    • Liam Healy's avatar
      Port tests to save-test · 0343f3ce
      Liam Healy authored
      All remaning tests are now defined with save-test, and the
      LISP-UNIT:DEFINE-TEST has been eliminated from the definition files,
      except for arrays.
      0343f3ce
  10. 22 Oct, 2008 1 commit
    • Liam Healy's avatar
      Save test forms with save-test; generate separate files with actual tests · 0fb0effc
      Liam Healy authored
      New function #'save-test saves test forms to a special, and nothing
      more.  Function #'write-test-to-file in generate-tests.lisp will write
      it to a file, which ought to be done rarely.  I have started the task
      of moving all test definitions to save-test, in the
      special-functions.  The files generated have been checked against the
      old definitions, but they have not been checked in yet.
      0fb0effc
  11. 14 Oct, 2008 1 commit
    • Liam Healy's avatar
      Test generation (including arrays) with save-tests · 6bb17e91
      Liam Healy authored
      New macro #'save-tests will put list of tests onto
      *all-generated-tests*.  The corresponding lisp-unit test can be
      generated with #'create-test.  The macro #'generate-all-array-tests
      now uses #'save-tests, so all tests defined that way will be put onto
      the lists.  All tests can be written to a file with
      #'write-tests-to-file, but this writes to a single file and I think I
      will want to write each test to a separate file so that it is easier
      to replace or augment one test without touching the others.  Two
      sections, Airy and Clausen, use these definitions.
      6bb17e91
  12. 21 Sep, 2008 2 commits
    • Liam Healy's avatar
      Restoration of tests complete except for arrays · 4e6d5886
      Liam Healy authored
      All the lisp-unit tests defined in the old GSLL have been updated and
      will load by default, with all tests passing on Debian Lenny amd64 and
      GSL 1.11.
      TOTAL: 491 assertions passed, 0 failed, 0 execution errors.
      4e6d5886
    • Liam Healy's avatar
      Replace tests · d0d17af0
      Liam Healy authored
      Several random distribution functions have new tests as the previous
      test results are no longer generated; it is not clear why.  New tests
      for numerical-differentiation based on GSL's own tests in
      deriv/test.c.  Fixed typo in #'integration-workspace-free which caused
      crash.  All uncommented tests now pass.
      TOTAL: 452 assertions passed, 0 failed, 0 execution errors.
      d0d17af0
  13. 15 Sep, 2008 1 commit
    • Liam Healy's avatar
      Restore some tests · fe339ae4
      Liam Healy authored
      Multiple fixes to restore tests: change to #'cl-array from #'data, use
      #'a macro, comment out a few tests do defer repair until later.  Two
      errors in definitions of functions in
      histogram/updating-accessing.lisp fixed.  Some uncommented-out test
      failures remain.
      fe339ae4
  14. 14 Sep, 2008 1 commit
  15. 01 Sep, 2008 1 commit
    • Liam Healy's avatar
      Updated documentation · 8d9ce4e8
      Liam Healy authored
      Updated the documentation to reflect changes in the new branch with
      foreign-friendly arrays.  This is now better reflective or the current
      definitions, but work needs to be done.  Added a dependency that was
      missing: matrix exponential needs special functions to define sf-mode.
      8d9ce4e8
  16. 31 Aug, 2008 4 commits
    • Liam Healy's avatar
      Merge branch 'pre-ffa' · 1decdc13
      Liam Healy authored
      Brought forward commits from the pre-ffa branch that were made after
      the two branches were split.
      1decdc13
    • Liam Healy's avatar
      Port remainder of solve-minimize-fit to ffa · 1082a0f5
      Liam Healy authored
      Tests work and duplicate results from pre-ffa results.  This puts
      completes the initial phase of the ffa port.
      1082a0f5
    • Liam Healy's avatar
      Fix definition of #'euclidean-norm and defmfun :component-float-type · c6fa7363
      Liam Healy authored
      The function #'euclidean-norm (gsl_blas_*_nrm2) takes one vector
      argument, not two, and returns the result as a return from the
      function.  Handling of return declaration :component-float-type for a
      method created with defmfun was wrong, because #'component-type alread
      returns the C type and does not need to be converted with #'cl-ffa.
      c6fa7363
    • Liam Healy's avatar
      Clean up several compilation problems · 134132bc
      Liam Healy authored
      Several bugs with small fixes, modifications to eliminate warnings:
      - Bad names for argument variables in maref fixed.
      - Add depenedencies in gsll.asd to avoid warnings.
      - Histogram needs #'assign-pointer function which was previously
        eliminated.
      - #'scale is a generic function, change defun to defmethod in
        histogram.
      - New #'variables-used-in-c-arguments replaces #'c-arguments in
        defmfun, now is a simplistic code walker but goes to arbitrary
        depth.  This will do for current uses of defmfun.
      - Export and defgenerics for #'alloc, #'free which are used by
        histogram and random.  In gsl-objects.lisp for lack of a better
        place.
      System now completely compiles from scratch with only one warning 
      "Implicitly creating new generic function BIND-GENERATE-BINDINGS."
      which is from metabang-bind.  No new testing.
      134132bc
  17. 29 Aug, 2008 1 commit
    • Liam Healy's avatar
      Complete #'maref and #'cl-array generic functions · 60551931
      Liam Healy authored
      Put maref and cl-array into a new file maref.lisp, each one has three
      methods (gsl-data, CL array, GSL pointer).  The pointer method for
      maref selects over all possible element types.  This compiles but is
      not tested.
      60551931
  18. 24 Aug, 2008 3 commits
    • Liam Healy's avatar
      Method #'cl-array for pointers (gsl-vector-c doubles) · 9bf385d1
      Liam Healy authored
      Define '+foreign-pointer-class+ to be the class name for foreign
      pointers, which will be assumed to be GSL vectors or matrix pointers.
      Use in new method #'cl-array to return a CL array from a pure GSL
      vector double pointer, such as is returned by several functions in
      solve-minimize-fit.
      9bf385d1
    • Liam Healy's avatar
      Deleted histogram read-write · 1243f6e7
      Liam Healy authored
      Any use of foreign read-write is going to require some thought; these
      can be eliminated for now.
      1243f6e7
    • Liam Healy's avatar
      Port to ffa · 217fea01
      Liam Healy authored
      Port new chapters to ffa.  Fix up BLAS.  Compiles; no testing.
      217fea01
  19. 23 Aug, 2008 2 commits
    • Liam Healy's avatar
      Fix histogram etc. missed changes · 533b2126
      Liam Healy authored
      Missed #'mpointer changes and some renames; also change to new args
      for maref.
      533b2126
    • Liam Healy's avatar
      Maref and (setf maref) for GSL vector pointers; optional arguments in :method · 3cf4781e
      Liam Healy authored
      The generic function #'maref will work on foreign pointers and assume
      them to be pointing to either a gsl-vector-c or a gsl-matrix-c,
      depending on how many indices are given.  This then functions like the
      old #'vref and #'mref.  It is used in the new function
      #'make-vector-from-gsl which creates a CL vector (using make-array*)
      which is needed by several functions in solve-minimize-fit.  It is
      also useful in the callbacks a user would define for
      solve-minimize-fit functions.  Similar functionality added to (setf
      aref) which was turned into a generic function.
      
      As part of the changes needed to define these methods, the defmfun
      family was modified to accept optional arguments in
      #'expand-defmfun-method, which is invoked when :definition :method is
      given.  Functions with optional arguments fall into two categories as
      far as defmfun is concerned: those that correspond to multiple GSL
      functions, and those that don't.  This should work in both cases.
      3cf4781e
  20. 22 Aug, 2008 2 commits