anchor.diff:          :cl-cuda)
     (:export :main))
   (in-package :cl-cuda-examples.nbody)
  +
  +
  +;;;
  +;;; Kernel functions
  +;;;
   
   (defkernel body-body-interaction (float3 ((ai float3) (bi float4) (bj float4)))
     (let ((r (float3 (- (float4-x bj) (float4-x bi))
  
positive.code:       (set (aref new-pos index) position)
        (set (aref vel index) velocity))))
  
  (defun integrate-nbody-system (new-pos old-pos vel delta-time damping num-bodies p)
    (let ((grid-dim (list (ceiling (/ num-bodies p)) 1 1))
          (block-dim (list p 1 1)))
  
negative.code: 
  (defun update (new-pos old-pos vel delta-time damping num-bodies p)
    (integrate-nbody-system new-pos old-pos vel delta-time damping num-bodies p))
  
  (defun main ()
    (let ((dev-id 0)
  