Commit 827d6818 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Eliminate contents-from-pointer

Eliminate contents-from-pointer because GSLL won't use bare pointers
anymore.
parent 27f4d8f1
;; Matrices
;; Liam Healy 2008-04-15 21:57:52EDT matrix.lisp
;; Time-stamp: <2010-06-27 21:27:22EDT matrix.lisp>
;; Time-stamp: <2010-06-28 11:03:21EDT matrix.lisp>
;;
;; Copyright 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -22,20 +22,6 @@
;;; /usr/include/gsl/gsl_matrix_double.h
;;;;****************************************************************************
;;;; Matrix structure and CL object
;;;;****************************************************************************
(defmethod contents-from-pointer
(pointer (struct-type (eql 'gsl-matrix-c))
&optional (element-type 'double-float))
(let ((dim0 (cffi:foreign-slot-value pointer struct-type 'size0))
(dim1 (cffi:foreign-slot-value pointer struct-type 'size1)))
;; Copy over from the C side
(loop for i below dim0
collect (loop for j below dim1
collect (maref pointer i j element-type)))))
;;;;****************************************************************************
;;;; Mathematical
;;;;****************************************************************************
......
;; Vectors
;; Liam Healy 2008-04-13 09:39:02EDT vector.lisp
;; Time-stamp: <2010-06-27 21:09:42EDT vector.lisp>
;; Time-stamp: <2010-06-28 11:03:32EDT vector.lisp>
;;
;; Copyright 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -22,16 +22,6 @@
;;; /usr/include/gsl/gsl_vector_double.h
;;;;****************************************************************************
;;;; Vector structure, CL object, and allocation
;;;;****************************************************************************
(defmethod contents-from-pointer
(pointer (struct-type (eql 'gsl-vector-c))
&optional (element-type 'double-float))
(loop for i below (cffi:foreign-slot-value pointer struct-type 'size)
collect (maref pointer i nil element-type)))
;;;;****************************************************************************
;;;; Function definitions
;;;;****************************************************************************
......
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