CUDA spmv and loosely related code