Implemented cuda functions.

Now cuda version of the simulator is working. Use sm_20 flag to enable
Compute Capability 2.0.
Fixed conflict