Added sp_'s suggestions, made sure it stays compatible with compute 3.x
, but made ready for cuda 6.