Skip to content
Snippets Groups Projects
  1. Nov 25, 2010
    • Liam Healy's avatar
      New macros #'maref and #'(setf maref) · 9becff94
      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.
      9becff94
  2. Nov 24, 2010
    • Liam M. Healy's avatar
      New macro access-value · a2284097
      Liam M. Healy authored
      New macro access-value to call gsl_*_set and gsl_*_get, as yet unused.
      It will eventually replace get-value and (setf get-value) as used in
      reference-foreign-element, but has the arguments in the right order
      and because it's a macro, expands immediately to a
      cffi:foreign-funcall instead of doing a generic function dispatch on
      an eql spcializer of the class name.
      a2284097
  3. Jul 14, 2010
    • Liam Healy's avatar
      Define get-value and (setf get-value) methods for matrices · 8d898b21
      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.
      8d898b21
  4. Jul 12, 2010
  5. Jul 11, 2010
  6. Jul 07, 2010
    • Liam Healy's avatar
      Add :grid-type keyword to copy function call · 46532b12
      Liam Healy authored
      The generic function #'copy now needs a keyword argument for the
      destination :grid-type.  Eliminate unnecessary copy tests; these are
      better tested in grid as they didn't use any GSL functions.
      46532b12
  7. Jul 01, 2010
  8. Jun 30, 2010
  9. Jun 28, 2010
    • Liam Healy's avatar
      Reorder block allocation, replace marray class · e5d0cfa7
      Liam Healy authored
      Set the contents of the block structure before using it in
      alloc-from-block.  Replace the 'marray class with 'foreign-array.
      Quote foreign struct slots.  Eliminate copy methods.  Now simple
      operations like 'vector-reverse work.
      e5d0cfa7
  10. Jun 27, 2010
  11. Dec 27, 2009
  12. Dec 26, 2009
    • 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
  13. Dec 21, 2009
    • 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
  14. Nov 18, 2009
  15. May 25, 2009
    • Liam Healy's avatar
      Use CFFI-grovel to define enumerations and programming constants · 5b255beb
      Liam Healy authored
      Instead of hardwiring GSL's #define or enum values, define them in
      init/libgsl-unix.lisp and run CFFI-grovel on them.  This has the
      advantage that if these values change in GSL, GSLL will automatically
      get the new values; also, there was an error in the 'integrate-method
      enum due to an incorrect starting value.  It has the disadvantage that
      building GSLL now requires a C compiler and some of the header (.h)
      files for GSL.  Also, it's not clear what the form for libgsl-*.lisp
      files are for non-unix OSes.
      5b255beb
    • Liam Healy's avatar
      Generic function #'size replaces #'total-size for marrays · 938ae6d6
      Liam Healy authored
      Use #'size instead of #'total-size for marrays.
      938ae6d6
  16. May 03, 2009
    • Liam Healy's avatar
      Conditionalize FSBV · 8a08f552
      Liam Healy authored
      All source code is now conditionalized so that FSBV is optional.  If
      present, functions using complex scalars will work.  If absent, GSLL
      will compile and load correctly, and all functions except those using
      complex scalars will work.  The examples and tests are defined
      appropriately.  Documentation on FSBV dependence has been added to
      index.html.
      8a08f552
  17. Apr 27, 2009
    • Liam Healy's avatar
      Redeclare foreign-allocated variables called by reference · 9848c6ad
      Liam Healy authored
      Variables called using with-foreign-objects that are passed to GSL for
      the purposes of returning computed values (i.e., are not mentioned in
      the CL arglist) need to be declared (:pointer type) because they are
      calls by reference.  Everything now compiles though there are
      execution errors in the tests.
      9848c6ad
  18. Apr 26, 2009
    • Liam Healy's avatar
      Use fsbv:defcstruct for complex, type spec (:pointer type) · 0b3847ba
      Liam Healy authored
      Define complex-float-c and complex-double-c using fsbv:defcstruct so
      that they can be passed by value.  A type specification of the form
      (:pointer type) is accepted for allocated objects passed by reference
      to foreign functions so that their values can be set and returned from
      the CL function.  This expands correctly for #'minmax, not tested
      yet.
      0b3847ba
  19. Mar 18, 2009
    • Liam Healy's avatar
      Generalize elt-, elt/; fix docstring; export 'dim0, 'dim1 · c5e449db
      Liam Healy authored
      Add methods for #'elt- and #'elt/ that take scalars for the second
      argument.  Fix the docstring for (setf row) which had "column" instead
      of "row".  Export the symbols 'dim0 and 'dim1 because they are useful
      for users; use them in #'contents-from-pointer instead of previous
      dim1 and dim2 (et. sim. with size0, size1).
      c5e449db
  20. Feb 19, 2009
    • Liam Healy's avatar
      GSL features added in version 1.12; fix spelling · cefb7c3f
      Liam Healy authored
      Added faster simplex mininimser using the symbol
      +simplex-nelder-mead+; the old one is now called
      +simplex-nelder-mead-on2+.  Added new functions #'order, #'size,
      #'coefficients for Chebyshev; #'order is a generic function.
      Added methods for vectors with complex elements for elt+, elt-, elt*,
      elt/.  Fix spelling of "paraboloid".
      cefb7c3f
  21. Feb 17, 2009
    • Liam Healy's avatar
      GSL features added in version 1.9 · 6e17d879
      Liam Healy authored
      Added definitions for GSL features that were added in version 1.9, and
      one from version 1.10: mminusp, mplusp, non-negative-p,
      +knuthran2002+, +vector-bfgs2+.  Macros defmpar now has key instead of
      optional args.  It and def-rng-type take a gsl-version argument; any
      symbols that are not defined in the user's version of GSL will be
      bound to an instance of 'obsolete-gsl-version but it is not signalled.
      6e17d879
  22. Feb 12, 2009
    • Liam Healy's avatar
      Copy to and from CL arrays · 6a685571
      Liam Healy authored
      The function #'copy will now copy contents between marrays and CL
      arrays.  The destination array can be supplied literally, or created
      by this function by specifying the desired type: when copying from a
      marray to a CL array, specify 'array; when copying from a CL array to
      a marray, specify the element type of the marray.  For example,
      (COPY
         (COPY
          (MAKE-MARRAY '(COMPLEX DOUBLE-FLOAT) :INITIAL-CONTENTS
                       '((-34.5 8.24 3.29 -8.93 34.12 -6.15)
                         (-8.93 34.12 -6.15 49.27 -13.49 32.5)
                         (49.27 -13.49 32.5 42.73 -17.24 43.31)))
          'ARRAY)
         '(COMPLEX DOUBLE-FLOAT))
      copies from the matrix-complex-double-float made in the make-marray
      form to a CL array, then copies the contents to a new
      matrix-complex-double-float.
      6a685571
  23. Jan 12, 2009
    • Liam Healy's avatar
      Redefine #'copy · 419e70d4
      Liam Healy authored
      Redefine #'copy so that it has one required argument (source) and one
      optional argument (destination).  For marrays, create a destination
      using make-marray, if one was not given, and then use the memcpy
      functions to fill the values.  For all other mobjects, copy will copy
      objects by calling one of two generic functions, #'copy-to-destination
      and #'copy-making-destination, depending on whether a destination was
      supplied.  The former is defined if a GSL _memcpy function exists.
      The latter will look for a GSL _clone function, then make a CL
      instance with the pointer returned as mpointer.  If there is no clone
      function, it will attempt to make a new object using make-load-form,
      so will fail if that method has not been defined.
      
      Added a check to defmfun that signals an error if a variable is used
      in the C arguments other than top-level that is not used in the CL
      arglist.  This should not happen and is usually an indication of a
      typo.
      419e70d4
  24. Jan 04, 2009
    • Liam Healy's avatar
      Elementwise array operations named "elt" · 4bfa337d
      Liam Healy authored
      GSL functions that operate from one corresponding array elements and
      then overwrite the first array, as well as those that operate on each
      element of an array with a scalar, are now named starting with "elt",
      as in "elt+"; formerely they started with "m".  This is to reinforce
      the idea that they are not generally a mathematical solution to
      algebraic problems, just elementwise operations.  The scalar
      operations (addition, multiplication) are methods of elt+ and elt* as
      well. Test results 64 bit:
      SBCL: TOTAL: 1223 assertions passed, 5 failed, 0 execution errors.
      CCL: TOTAL: 1228 assertions passed, 0 failed, 0 execution errors.
      4bfa337d
    • Liam Healy's avatar
      Generic functions for array addition, multiplication with scalar · 2747131e
      Liam Healy authored
      Eliminated the functions #'m+c, #'m*c, turning them into methods of
      #'m+ and #'m*, with the scalar permitted to appear either first or
      second.  New functions #'e*, #'e/ renamed from #'m*, #'m/ to emphasize
      it is elementwise multiplication and division, leaving room for a
      matrix multiplication function #'m* at some point in the future.
      It is now possible to defmfun :definition :methods with 'both as the
      specified category.  Test results 64 bit:
      SBCL: TOTAL: 1223 assertions passed, 5 failed, 0 execution errors.
      CCL: TOTAL: 1228 assertions passed, 0 failed, 0 execution errors.
      2747131e
  25. Dec 28, 2008
    • Liam Healy's avatar
      Use class foreign-array · 74d8995a
      Liam Healy authored
      Split off the class definition for foreign-array into its own file
      along with applicable definitions.  Make permutations and combinations
      direct subclasses of both foreign-array and marray, but not subclasses
      of vectors.  All these classes now have initialize-instance :after
      methods that allocate and set the pointers and finalizers.  All tests
      pass.
      74d8995a
  26. Nov 16, 2008
  27. Nov 09, 2008
    • 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
  28. Nov 02, 2008
    • 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
  29. Aug 29, 2008
    • 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
  30. Aug 17, 2008
    • Liam Healy's avatar
      New function #'complete-definition · dfda5c5b
      Liam Healy authored
      New function #'complete-definition is for putting together an entire
      definition with arglist, declaration, and body, such as defun,
      defmethod, or :method.  The old (misleadingly-named)
      #'expand-defmfun-plain has been removed.  Removed possibility of
      definition &aux variables with :global; it was used only once and
      easily replaced.
      dfda5c5b
  31. Jul 25, 2008
Loading