1. 30 Oct, 2011 1 commit
    • Foreign structure with CFFI's new syntax · 18e08e4e
      Liam M. Healy authored
      Specify the foreign structures with CFFI's new syntax, (:struct foo),
      and fix #'creturn-st so that it will not take :struct (or any other
      keyword) as a return variable name.  GSLL now compiles and loads
      without error or warning, but it has not been tested.
  2. 29 Oct, 2011 1 commit
    • Fix sf-result* definitions, eliminate ffexpand, fsbv:object · 121e475d
      Liam M. Healy authored
      Fix sf-result and sf-result-e10 translation methods, and use in
      complex-with-error and values-with-errors.  Some usage in gamma.lisp
      updated, but there will be a need to replace sf-result with (:struct
      sf-result) in all declarations for many special functions.
      
      I removed ffexpand and everything it depended on because there is no
      reason to make a side defcfun for call-by-value functions, and if FSBV
      is missing CFFI already emits an error.  All usage of fsbv:object and
      any thing from the FSBV package is now gone.
  3. 24 Oct, 2011 1 commit
    • Eliminate fsbv:object for built-in types · 639a5f35
      Liam M. Healy authored
      Eliminate fsbv:object for built-in types; started conversion of
      special function result (sf-result*) structures but this requires a
      modification to CFFI.  Simulated annealing structure called by value.
      Use cffi-fsbv's sizet definition; this imposes a dependence on that
      system.  No compilation attempted yet.
  4. 16 Dec, 2010 1 commit
  5. 12 Dec, 2010 1 commit
  6. 04 Dec, 2010 2 commits
    • Use fsbv:defconvert to define sf-result and sf-result-e10 · b97213b9
      Liam Healy authored
      Use fsbv:defconvert to define sf-result and sf-result-e10, and use
      #'fsbv:object instead of #'val, #'err, #'e10, which have been
      eliminated.
    • Introduce values-unless-singleton for return values in defmfun expansion · 6010bde3
      Liam Healy authored
      New function values-unless-singleton will wrap the forms in 'values if
      there are more than one, otherwise it just returns the form.  This is
      used in the return value(s) in the defmfun expansion (by way of
      body-expand) so that if the returned form returns multiple values,
      they all come back from the defmfunned function (note that (values
      (values ...)) removes only returns the first value.
  7. 28 Nov, 2010 1 commit
    • Eliminate calls to grid:complex-to-cl · 75ca6f4e
      Liam Healy authored
      Eliminate calls to grid:complex-to-cl because it has been eliminated;
      rely on fsbv:object to do the conversion.  Use new function
      #'fsbv:converter-defined-p.
  8. 27 Nov, 2010 1 commit
  9. 27 Jun, 2010 1 commit
  10. 10 Jun, 2010 1 commit
    • Fix fsbv:defcfun call · 451bceda
      Liam M. Healy authored
      The expansion of a foreign structure-by-value function did not
      substitute the foreign function name.  It turns out this didn't matter
      because cffi::parse-name-and-options used by fsbv:defcfun simply
      ignored the symbol 'GSL-NAME for the foreign function name and pulled
      the actual name out of the symbol-name for the Lisp symbol of the
      function name.  This fix makes it clearer in the macroexpansion
      however.
  11. 27 Dec, 2009 1 commit
  12. 26 Dec, 2009 1 commit
    • 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.
  13. 21 Dec, 2009 1 commit
    • Move symbol-type and number-conversion to grid · ce261d71
      Liam Healy authored
      Move number-conversion.lisp from init/ to grid/ and symbol-type
      portion of init/interface.lisp to grid/symbol-type.lisp.
      All tests pass
      TOTAL: 1627 assertions passed, 6 failed, 0 execution errors.
  14. 18 Nov, 2009 1 commit
  15. 14 Nov, 2009 1 commit
  16. 04 May, 2009 1 commit
  17. 03 May, 2009 4 commits
    • Complex functions · 149844bb
      Liam Healy authored
      Additional definition of functions of complex numbers and/or returning
      complex numbers.  Most of these duplicate functions that Lisp has
      already, so everything is defined with a "cx-" prefix.  No effort has
      been made to unify the interface; this requires some thought.  A fix
      has been made to body-expand; previously, it would not properly
      compile a function that returned a structure by value but didn't have
      structures by value as arguments.
    • Define fsbv:defcfun for efficiency · 8d2ef1de
      Liam Healy authored
      For FSBV calls, define fsbv:defcfun in the defmfun expansion, then in
      the fsbv:foreign-funcall, refer to the symbol function name rather
      than string function name.  This tells FSBV to use the prepared
      closure associated with that function by the fsbv:defcfun, meaning
      that the definitions in that lexical environment are reused.
      
      Fix conditionalization for #'conjugate-rank-1-update in blas2.lisp.
      
      Test results:
      SBCL 64 #+fsbv
      TOTAL: 1522 assertions passed, 5 failed, 0 execution errors.
      CCL 64 #+fsbv
      TOTAL: 1522 assertions passed, 5 failed, 0 execution errors.
      SBCL 64 #-fsbv
      TOTAL: 1502 assertions passed, 5 failed, 0 execution errors.
      CCL 64 #-fsbv
      TOTAL: 1502 assertions passed, 5 failed, 0 execution errors.
    • 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.
    • Call GSL functions with complex scalars · 0ca58836
      Liam Healy authored
      With improved fsbv:foreign-funcall that does the conversion of values
      between Lisp and C, the function foreign-funcall-indirect has been
      eliminated in favor of using fsbv:foreign-funcall directly.  Spot
      checks on various functions that use complex scalars like #'evaluate
      polynomials at a complex point, or set-all on complex marrays, or the
      functions in complex.lisp, show that these all work.  Everything
      compiles/loads and the usual tests pass in SBCL.
  18. 26 Apr, 2009 1 commit
    • 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.
  19. 20 Apr, 2009 1 commit
    • Use fsbv:with-foreign-objects in body-expand · 8dea4bbc
      Liam Healy authored
      The setting of foreign structures will now be handled by
      fsbv:with-foreign-objects for a suitably defined fsbv:defcstruct. 
      The new definitions are loaded but GSLL will not compile completely.
  20. 16 Apr, 2009 1 commit
    • New macro foreign-funcall-indirect · bdaaaeb2
      Liam Healy authored
      Move body-expand and the supporting cast to a new file
      body-expand.lisp, and introduce foreign-funcall-indirect which will
      use with-foreign-objects to allocate all arguments at additional level
      of indirection and make the appropriate assignments.  This appears to
      expand correctly except for values that are not symbols,
      e.g. (mpointer object) used in set-all.  I will need a new syntax for
      specifying structures that are passed by pointer but which need to
      have the structure type stated, e.g. solve-cubic-complex, because for
      now it defmfun will expand into the foreign-funcall-indirect.