cuda code structure

still cannot be compiled