Annotate member functions with __host__ __device__.