anchor.diff:          (syncthreads))
         (return acc))))
   
  -(defkernel compute-body-accel-without-shared-memory (float3 ((body-pos float4) (positions float4*) (num-bodies int)))
  +(defkernel compute-body-accel-without-shared-memory (float3 ((body-pos float4) (positions float4*) (num-bodies cl-cuda:int)))
     (let ((acc (float3 0.0 0.0 0.0)))
       (do ((i 0 (+ i 1)))
           ((>= i num-bodies))
  
positive.code: ;;;
  
  (defmethod glut:display-window :before ((w nbody-window))
    (nbody-init)
    (gl:enable :depth-test)
    (gl:clear-color 0 0 0 0))
  
  (defmethod glut:close ((w nbody-window))
    (nbody-release))
  
  (defmethod glut:display ((w nbody-window))
    ;; update simulation
    (nbody-update-simulation)
    ;; clear buffers
    (gl:clear :color-buffer :depth-buffer-bit)
    ;; view transform
    (gl:matrix-mode :modelview)
    (gl:load-identity)
    (gl:translate 0.0 0.0 -100.0)
    (gl:rotate 0.0 1.0 0.0 0.0)
    (gl:rotate 0.0 0.0 1.0 0.0)
    ;; display bodies
    (nbody-display :particle-sprites)
    ;; swap buffers
    (glut:swap-buffers)
    ;; display frame rate
    (frame-rate-counter-measure)
    (display-frame-rate (nbody-num-bodies) (nbody-get-frame-rate)))
  
  (defmethod glut:reshape ((w nbody-window) width height)
    ;; configure on projection mode
  
negative.code: ;;;
  
  (defun main ()
    (setf glut:*run-main-loop-after-display* nil)
    (let ((window (make-instance 'nbody-window)))
      (glut:display-window window) ; GLUT window must be created before initializing nbody-demo
      (with-nbody-demo (demo 2048 *gpu*)
        (with-frame-rate-counter (counter)
          (setf (slot-value window 'nbody-demo) demo
                (slot-value window 'counter)    counter)
          (glut:main-loop)))))
  
  (defun not-implemented ()
    (error "not implemented."))
  