[Openmcl-devel] mcl-doubles problem in openmcl 0.14.1

Bill Schottstaedt bil at ccrma.Stanford.EDU
Tue Feb 24 03:57:39 PST 2004


In case it's of interest, here's code to go the other
way:

(defmacro with-foreign-double-float-array-to-lisp ((ptr-var lisp-array) &body body)
   (let* ((length (gensym))
	 (size (gensym))
	 (val (gensym)))
    `(let* ((,length (length ,lisp-array))
            (,size (* ,length 8)))
       (%stack-block ((,ptr-var ,size))
	(let ((,val (progn , at body))) ; use locally rather than progn?
	  (dotimes (i ,length)
	    (setf (aref ,lisp-array i) (%get-double-float ,ptr-var (* i 8))))
	  ,val)))))





More information about the Openmcl-devel mailing list