anchor.diff:  
   (in-package :amino-type)
   
  +(deftype foreign-int ()
  +  '(signed-byte #.(* 8 (cffi:foreign-type-size :int))))
   
   (defstruct (crs-matrix (:include real-array)
                          (:constructor %make-crs-matrix)
  
positive.code:   "Descriptor for a Compressed-Row-Storage matrix following LAPACK conventions."
    (cols 0 :type (integer 1 #.most-positive-fixnum))
    (rows 0 :type (integer 1 #.most-positive-fixnum))
    (col-ind nil :type (simple-array fixnum (*)))
    (row-ptr nil :type (simple-array fixnum (*)))
    (data-fill 0 :type (integer 0 #.most-positive-fixnum))
    (row-fill 0 :type (integer 0 #.most-positive-fixnum)))
  
  
negative.code: (defun make-crs-matrix (row-count column-count element-count)
    (let ((result (%make-crs-matrix :cols column-count
                                    :rows row-count
                                    :col-ind (make-array element-count :element-type '(foreign-int))
                                    :row-ptr (make-array (1+ row-count) :element-type '(foreign-int))
                                    :data (make-array element-count :element-type 'double-float))))
      (crs-matrix-inc-row result)
      result))
  
  (defun crs-matrix-add-elt (crs-matrix column element)
    (assert (< column (%crs-matrix-cols crs-matrix)))
    (let ((k (%crs-matrix-data-fill crs-matrix))
          (element (coerce element 'double-float)))
      ;; set element and column index
      (setf (aref (%crs-matrix-data crs-matrix) k) element
            (aref (%crs-matrix-col-ind crs-matrix) k) column))
  