anchor.diff:        (array-type-p  type)))
   
   (defun cffi-type (type)
  -  (acond
  +  (cond
       ((basic-type-p  type) (basic-cffi-type  type))
       ((vector-type-p type) (vector-cffi-type type))
       ((array-type-p  type) (array-cffi-type  type))
  
positive.code: 
  (defun memory-block-vertex-buffer-object (blk)
    (if (memory-block-interop-p blk)
        (caddr blk)
        (error "not interoperable memory block")))
  
  (defun memory-block-graphic-resource-ptr (blk)
    (if (memory-block-interop-p blk)
        (cadddr blk)
        (error "not interoperable memory block")))
  
  (defun memory-block-type (blk)
    (if (memory-block-interop-p blk)
        (cadddr (cdr blk))
        (cadddr blk)))
  
  (defun memory-block-cffi-type (blk)
    (cffi-type (memory-block-type blk)))
  
  (defun memory-block-length (blk)
    (if (memory-block-interop-p blk)
        (cadddr (cddr blk))
        (cadddr (cdr  blk))))
  
  (defun memory-block-bytes (blk)
    (* (memory-block-element-bytes blk)
  
negative.code: 
  ;;; Timer
  
  (defstruct timer-object
    start-event stop-event)
  
  (defun create-timer ()
    (let ((timer-object (make-timer-object)))
      (symbol-macrolet ((start-event (timer-object-start-event timer-object))
                        (stop-event  (timer-object-stop-event  timer-object)))
        (unwind-protect-case ()
            (progn
              ;; allocate memory pointers to start and stop events
              (setf start-event (cffi:foreign-alloc 'cu-event :initial-element (cffi:null-pointer))
                    stop-event  (cffi:foreign-alloc 'cu-event :initial-element (cffi:null-pointer)))
              ;; create a start event
              (cu-event-create start-event cu-event-default)
              ;; create a stop event
              (cu-event-create stop-event  cu-event-default)
              ;; return a timer object
              timer-object)
          (:abort (destroy-timer timer-object))))))
  
  (defun destroy-timer (timer-object)
    (symbol-macrolet ((start-event         (timer-object-start-event timer-object))
                      (stop-event          (timer-object-stop-event  timer-object))
                      (mem-ref-start-event (cffi:mem-ref start-event 'cu-event))
                      (mem-ref-stop-event  (cffi:mem-ref stop-event  'cu-event)))
      ;; destroy a stop event if created
      (when (and stop-event (not (cffi:null-pointer-p mem-ref-stop-event)))
        (cu-event-destroy mem-ref-stop-event)
        (setf mem-ref-stop-event (cffi:null-pointer)))
      ;; destroy a start event if created
      (when (and start-event (not (cffi:null-pointer-p mem-ref-start-event)))
        (cu-event-destroy mem-ref-start-event)
        (setf mem-ref-start-event (cffi:null-pointer)))
      ;; free a memory pointer to a stop event if allocated
      (when stop-event
        (cffi:foreign-free stop-event)
        (setf stop-event nil))
      ;; free a memory pointer to a start event if allocated
      (when start-event
        (cffi:foreign-free start-event)
        (setf start-event nil))))
  
  (defmacro with-timer ((timer) &body body)
    `(let ((,timer (create-timer)))
       (unwind-protect (progn ,@body)
         (destroy-timer ,timer))))
  
  (defun start-timer (timer-object)
    (let ((start-event (timer-object-start-event timer-object)))
  