added cuda code for the demo

added cuda code for the demo
added cuda that seems to work now