adding cuda code