Commit 25a0259b authored by Liam Healy's avatar Liam Healy

Redeclare foreign-allocated variables called by reference

    
Also cdot, solve-quadratic-complex, solve-cubic-complex generate
complex scalars in the argument returned by reference.
parent 9848c6ad
;; Conversion of numbers C->CL
;; Liam Healy, Sun May 28 2006 - 22:04
;; Time-stamp: <2009-04-25 23:44:15EDT number-conversion.lisp>
;; Time-stamp: <2009-04-27 21:24:36EDT number-conversion.lisp>
;; $Id$
(in-package :gsl)
......@@ -42,7 +42,7 @@
(defun cl-convert-form (decl)
"Generate a form that calls the appropriate converter from C/GSL to CL."
(case (st-type decl)
(case (st-actual-type decl)
(sf-result
`((val ,(st-symbol decl))
(err ,(st-symbol decl))))
......
;; BLAS level 1, Vector operations
;; Liam Healy, Wed Apr 26 2006 - 15:23
;; Time-stamp: <2009-04-26 23:01:57EDT blas1.lisp>
;; Time-stamp: <2009-04-27 21:30:47EDT blas1.lisp>
;; $Id$
(in-package :gsl)
......@@ -32,7 +32,7 @@
(defmfun cdot ((x vector) (y vector))
("gsl_blas_" :type "dotc")
(((mpointer x) :pointer) ((mpointer y) :pointer)
(result :element-c-type))
(result (:pointer :element-c-type)))
:definition :generic
:element-types :complex
:inputs (x y)
......
;; Polynomials
;; Liam Healy, Tue Mar 21 2006 - 18:33
;; Time-stamp: <2009-04-26 22:49:47EDT polynomial.lisp>
;; Time-stamp: <2009-04-27 21:25:42EDT polynomial.lisp>
;; $Id$
(in-package :gsl)
......@@ -114,7 +114,7 @@
(defmfun solve-quadratic-complex (a b c)
"gsl_poly_complex_solve_quadratic"
((a :double) (b :double) (c :double)
(root1 complex-double-c) (root2 complex-double-c))
(root1 (:pointer complex-double-c)) (root2 (:pointer complex-double-c)))
:c-return :number-of-answers
:documentation ; FDL
"The complex roots of the quadratic equation a x^2 + b x + c = 0.
......@@ -140,7 +140,8 @@
(defmfun solve-cubic-complex (a b c)
"gsl_poly_complex_solve_cubic"
((a :double) (b :double) (c :double)
(root1 complex-double-c) (root2 complex-double-c) (root3 complex-double-c))
(root1 (:pointer complex-double-c)) (root2 (:pointer complex-double-c))
(root3 (:pointer complex-double-c)))
:c-return :number-of-answers
:documentation ; FDL
"Find the complex roots of the cubic equation, x^3 + a x^2 + b x + c = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment