Skip to content
Snippets Groups Projects
Commit 25a0259b authored by Liam Healy's avatar Liam Healy
Browse files

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
No related branches found
No related tags found
No related merge requests found
;; Conversion of numbers C->CL ;; Conversion of numbers C->CL
;; Liam Healy, Sun May 28 2006 - 22:04 ;; 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$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
(defun cl-convert-form (decl) (defun cl-convert-form (decl)
"Generate a form that calls the appropriate converter from C/GSL to CL." "Generate a form that calls the appropriate converter from C/GSL to CL."
(case (st-type decl) (case (st-actual-type decl)
(sf-result (sf-result
`((val ,(st-symbol decl)) `((val ,(st-symbol decl))
(err ,(st-symbol decl)))) (err ,(st-symbol decl))))
......
;; BLAS level 1, Vector operations ;; BLAS level 1, Vector operations
;; Liam Healy, Wed Apr 26 2006 - 15:23 ;; 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$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
(defmfun cdot ((x vector) (y vector)) (defmfun cdot ((x vector) (y vector))
("gsl_blas_" :type "dotc") ("gsl_blas_" :type "dotc")
(((mpointer x) :pointer) ((mpointer y) :pointer) (((mpointer x) :pointer) ((mpointer y) :pointer)
(result :element-c-type)) (result (:pointer :element-c-type)))
:definition :generic :definition :generic
:element-types :complex :element-types :complex
:inputs (x y) :inputs (x y)
......
;; Polynomials ;; Polynomials
;; Liam Healy, Tue Mar 21 2006 - 18:33 ;; 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$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
(defmfun solve-quadratic-complex (a b c) (defmfun solve-quadratic-complex (a b c)
"gsl_poly_complex_solve_quadratic" "gsl_poly_complex_solve_quadratic"
((a :double) (b :double) (c :double) ((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 :c-return :number-of-answers
:documentation ; FDL :documentation ; FDL
"The complex roots of the quadratic equation a x^2 + b x + c = 0. "The complex roots of the quadratic equation a x^2 + b x + c = 0.
...@@ -140,7 +140,8 @@ ...@@ -140,7 +140,8 @@
(defmfun solve-cubic-complex (a b c) (defmfun solve-cubic-complex (a b c)
"gsl_poly_complex_solve_cubic" "gsl_poly_complex_solve_cubic"
((a :double) (b :double) (c :double) ((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 :c-return :number-of-answers
:documentation ; FDL :documentation ; FDL
"Find the complex roots of the cubic equation, x^3 + a x^2 + b x + c = 0 "Find the complex roots of the cubic equation, x^3 + a x^2 + b x + c = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment