anchor.diff:      result))
   
   @export
  -(defun print-device-memory (command-queue device size type &key (step 1))
  +(defun print-device-memory (command-queue device size type &key (step 1) (index nil))
     (with-foreign-objects ((foreign-array type size))
       (enqueue-read-buffer command-queue
                            device
  
positive.code:                          0
                           (* (foreign-type-size type) size)
                           foreign-array)
      (print-foreign-array foreign-array size type :step step)))
  
negative.code:         collecting (mem-aref foreign-array type i)))
  
  @export
  (defun print-foreign-array (foreign-array size type &key (step 1) (index nil))
    (loop for i from 0 below size by step
          do (let ((value (mem-aref foreign-array type i)))
               (if index
                   (format t "~a, ~a~%" i value)
                   (format t "~a~%" value)))))
  
  @export
  (defun device-memory-to-simple-array (command-queue device size type &key (step 1))
  