Corrected an error in CUDA C thread indexing.
Changed nParam in CPP, Matlab and Thrust.
Cleaned some minor junk out of CUDA-C code.