Fix calcuting with single floating point precision
cuda
cuda optimization
more better cuda code
remove unused
optimize cpu code
improve tests