Add missing inlines and __host__ __device__