anchor.diff:    (symbol-macrolet ((new-pos (body-system-new-pos system))
                       (old-pos (body-system-old-pos system)))
       (rotatef new-pos old-pos)))
  +
  +(defun body-system-measure-framerate (system)
  +  (measure-framerate-counter (body-system-framerate-counter system)))
  +
  +(defun body-system-fps (system)
  +  (frame-rate-counter-fps (body-system-framerate-counter system)))
   
   
   ;;;
  
positive.code:     (values interactions-per-second gflops)))
  
  (let ((previous 0.0))
    (defun display-framerate (counter num-bodies)
      (let ((fps (fps-counter-fps counter)))
        (when (/= fps previous)
          (setf previous fps)
          (multiple-value-bind (interactions-per-second gflops)
              (compute-pref-stats counter num-bodies 1)
            (let ((msg (format nil "CUDA N-Body (~A bodies): ~,1F fps | ~,1F BIPS | ~,1F GFLOP/s | single precision~%"
                             num-bodies fps interactions-per-second gflops)))
              (format t msg)
              (glut:set-window-title msg)))))))
  
  
  ;;;
  ;;; Framerate counter
  ;;;
  
  (defstruct (framerate-counter (:constructor %make-framerate-counter))
  
negative.code:           (num-bodies (body-system-num-bodies system)))
        (display-particle-renderer renderer pos num-bodies :particle-sprites))))
  
  (defun nbody-demo-measure-framerate (demo)
    (body-system-measure-framerate (nbody-demo-system demo)))
  
  (defun nbody-demo-num-bodies (demo)
    (body-system-num-bodies (nbody-demo-system demo)))
  
  (defun nbody-demo-fps (demo)
    (body-system-fps (nbody-demo-system demo)))
  
  
  ;;;
  