fix #472 add workaround for cuda 5.5+ bug

- since cuda 5.5 nvcc generate wrong loops in some cases
- this workaround fix wrong current calculation with cuda 5.5+