Annotate synchronize functions with __host__ __device__.