Great tutorial! I wish it was there 1.5 years ago when I was evaluating motion estimation algorithms on CUDA.

Something that is missing from the evaluation is the effect of forcing the nvcc compiler to use 9 registers and prevent it from spilling the registers to memory and still using bubble sort. It would be interesting to see if that results in an improvement or degrades performance.