question about position vector in nbdoy code sample

i’ve modified the nbody example in the cuda sdk to do electrodynamics. i pass the charge in the w slot of the position 4-vector, and the charge to mass ratio in the w-slot of the velocity 4-vector. for the life of me i could not figure out why the electrons kept disappearing. then i tried inverting charges and charge to mass ratio, and i discovered that anytime a charge was negative, it didn’t show. then i tried freszing it (setting the times step really small) scaling the charge, and i discovered that that effectively scaled the particle’s position on the screen. a ha!

ok, so too possible solutions:

  1. fix this - i have no idea what is making it do this
  2. use a different memory location, thus changing the granularity of a particle’s data from a nice 8 to a not-so-nice 9. screwing up alignments, occupancy calculations, etc.

i would much prefer option #1.

problem is, i don’t know how to do that option. i looked in the code and couldn’t find anything. can anybody help me?

i’ve modified the nbody example in the cuda sdk to do electrodynamics. i pass the charge in the w slot of the position 4-vector, and the charge to mass ratio in the w-slot of the velocity 4-vector. for the life of me i could not figure out why the electrons kept disappearing. then i tried inverting charges and charge to mass ratio, and i discovered that anytime a charge was negative, it didn’t show. then i tried freszing it (setting the times step really small) scaling the charge, and i discovered that that effectively scaled the particle’s position on the screen. a ha!

ok, so too possible solutions:

  1. fix this - i have no idea what is making it do this
  2. use a different memory location, thus changing the granularity of a particle’s data from a nice 8 to a not-so-nice 9. screwing up alignments, occupancy calculations, etc.

i would much prefer option #1.

problem is, i don’t know how to do that option. i looked in the code and couldn’t find anything. can anybody help me?