Inline to_global_id conversion