1. 20 Jan, 2010 1 commit
  2. 03 Jan, 2010 1 commit
  3. 27 Dec, 2009 1 commit
  4. 26 Dec, 2009 2 commits
    • Liam Healy's avatar
      Be strict on initial marray values; default marrays · 2a6a743f
      Liam Healy authored
      Removed some marrays marked as :input when their values were not used.
      This failed in CCL because the arrays in those cases were created with
      no initial values, and no values were set, so that they were marked
      cl-invalid.  Created #'make-marray-or-default to facilitate defaulting
      of marrays in defmfun, and marking validity appropriately.
      Test results:
      SBCL 64:
      TOTAL: 1627 assertions passed, 6 failed, 0 execution errors.
      CCL 64:
      TOTAL: 1620 assertions passed, 13 failed, 0 execution errors.
      2a6a743f
    • Liam Healy's avatar
      Use symbols exported from c-array · a13502c2
      Liam Healy authored
      Some symbols that were formerly in the GSLL package and now are in
      c-array need to imported from that package.  This only affects
      non-native implementation and so was discovered in trying to compile
      in CCL.  There are still too many test failures in CCL.
      a13502c2
  5. 25 Dec, 2009 1 commit
  6. 24 Dec, 2009 1 commit
    • Liam Healy's avatar
      Remove grid to the gsd/c-array repository · c75e91d2
      Liam Healy authored
      The grid subdirectory is now the c-array system within the GSD
      repository, as it has no GSL-dependent definitions and is potentially
      useful on its own for other C libraries.  There is a bare minimum
      mention of GSD in the documentation, which needs to be enhanced as it
      is required for GSLL to compile/load.
      c75e91d2
  7. 23 Dec, 2009 1 commit
    • Liam Healy's avatar
      Replace create-matrix and constant-matrix using grid functions · e48ba0cb
      Liam Healy authored
      Replace create-matrix and constant-matrix by using the grid functions
      grid:map-grid and grid:make-grid; eliminate create-vector because
      vectors can be generated with create-matrix and using nil for the
      second dimension argument.  In the grid:make-grid-data method for
      make-marray, the first argument, which is the element type, needs to
      be extracted from the rest spec with a newly-changed
      grid:spec-scalar-p because compound types like (complex double-float)
      were not being recognized as element types.
      e48ba0cb
  8. 22 Dec, 2009 1 commit
    • Liam Healy's avatar
      Integrate marrays into grid · 1a4cb94f
      Liam Healy authored
      The GSLL marrays now function correctly as instances of grid:grid; for
      example, (grid:transpose *m35*) works.  All previous tests pass in
      SBCL.
      1a4cb94f
  9. 21 Dec, 2009 3 commits
    • Liam Healy's avatar
      Move copy, copy-making-destination to grid · 3680b307
      Liam Healy authored
      Moved the definition of the generic function copy-making-destination
      to copy objects while making a destination object, and the wrapper
      function #'copy for that and copy-to-destination to grid/ and c-array:
      package.
      3680b307
    • Liam Healy's avatar
      Move copy-to-destination to grid · 06f99392
      Liam Healy authored
      The generic function definition for copy-to-destination is now in
      grid/ and the c-array package.  This will make it accessible to
      non-GSLL foreign library interfaces, but the new location is a bit
      deceptive because a new method needn't be a subclass of foreign-array.
      06f99392
    • Liam Healy's avatar
      Move foreign-array and foreign-friendly to grid · a9cf4a74
      Liam Healy authored
      Continuing the separation of definitions useful for any libraries
      using C arrays, foreign-array.lisp and foreign-friendly.lisp have been
      moved to the grid subdirectory and placed in the c-array package.
      All tests pass on SBCL 64,
      TOTAL: 1627 assertions passed, 6 failed, 0 execution errors.
      a9cf4a74
  10. 08 Dec, 2009 2 commits
    • Liam Healy's avatar
      Moved element-types.lisp from init to grid · 2317ccf0
      Liam Healy authored
      Continued separation of GSLL into two packages and eventually systems,
      the definitions in element-types.lisp are now in the c-array package.
      2317ccf0
    • Liam Healy's avatar
      Split off grid directory · 8d5cd4a5
      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.
      8d5cd4a5
  11. 06 Jun, 2009 1 commit
    • Liam Healy's avatar
      Define C structures using CFFI-grovel · 8c0e6eb7
      Liam Healy authored
      Almost all GSL structures are now defined using CFFI-grovel, which
      makes the code more robust should there be changes in GSL.  The
      exceptions are complex-float-c, complex-double-c, and
      simulated-annealing-parameters; because these structures are used by
      value, they need to be defined with fsbv:defcstruct at the present.
      8c0e6eb7
  12. 05 Jun, 2009 2 commits
    • Liam Healy's avatar
      Export row separator symbol, use with-unique-names in iterate · 8c71e859
      Liam Healy authored
      The row separator symbol in #m, '^, is now exported.  Since
      cl-utilities is now required for the macro reader, we might as well
      use it in iterate.lisp for the names in the defmacro-driver clauses.
      8c71e859
    • Liam Healy's avatar
      Reader macro #m evaluates arguments · 70bd2986
      Liam Healy authored
      The reader macro #m now evaluates its arguments, so creating a vector
      with e.g. #m(pi (sqrt 3) (cos (/ pi 4))) is now possible.  Matrices
      are specified by using ^ in the list to separate rows.  GSLL now
      requires cl-utilities once again.
      70bd2986
  13. 25 May, 2009 1 commit
  14. 20 Mar, 2009 2 commits
    • Liam Healy's avatar
      Make marrays make from pointer with copy · de18c122
      Liam Healy authored
      Make marrays from pointer with #'copy instead of make-marray;
      :from-pointer argument removed from #'make-marray.  Define a macro
      foreign-pointer-method that for most implementations just returns the
      form.  For CLISP however, it checks that the pointer is of type
      +foreign-pointer-type+, because in CLISP the foreign pointer class is
      T.  Export marray subclass names.
      de18c122
    • Liam Healy's avatar
      Extend #'copy to copy to or from mpointers · efa2315f
      Liam Healy authored
      Both copy-to-array and copy-making-destination have been extended so
      that an mpointer can occur as the first or second argument.  If the
      first argument, the second argument should be a symbol representing a
      subclass of marray.  If the second argument is not present
      (copy-making-destination), 'vector-double-float is assumed.  If the
      mpointer is the second argument, the marray contents are copied into
      its contents.  These methods are useful for callbacks and GSL
      functions that send raw mpointers.  For example, a callback that uses
      foreign arrays directly can simply copy from and to them.  This has
      been applied in the solve-minimize-fit functions that return a raw
      mpointer, replacing the explicit call to make-marray.  The first
      argument to #'marray can now be either the class name or element-type.
      efa2315f
  15. 16 Mar, 2009 2 commits
    • Liam Healy's avatar
      Minor fixes · 514d575c
      Liam Healy authored
      In defmethod mpointer ((object marray)) just introduced, use
      (call-next-method) instead of direct slot access.  Improve punctuation
      for error messages.
      514d575c
    • Liam Healy's avatar
      Native: set the 'data slot in GSL structs in the #'mpointer method · 40e1bfce
      Liam Healy authored
      For native implementations (i.e., SBCL), the 'data slot of gsl-block-c
      and gsl-vector-c or gsl-matrix-c is set when mpointer is called.
      Previously, as currently for non-native implementations, it is set
      only when the marray is made.  This can fail in native implementations
      because the garbage collection can move the array around.  Therefore,
      since mpointer is only called inside a native-pointer-protect, the
      GSL structure slot is set to the current value of #'c-pointer, which
      is computed on the fly.  
      
      The test case reported by Viktor Leis for a matrix 1000x1000 which was
      generating an memory fault error now gives no error and reasonable
      output.
      40e1bfce
  16. 11 Feb, 2009 1 commit
  17. 29 Dec, 2008 1 commit
    • 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
  18. 28 Dec, 2008 2 commits
  19. 26 Dec, 2008 2 commits
    • 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
  20. 25 Dec, 2008 1 commit
  21. 22 Dec, 2008 1 commit
    • 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 16 Nov, 2008 1 commit
    • 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
  29. 12 Nov, 2008 1 commit
    • 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
  30. 02 Nov, 2008 1 commit
    • 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