A programmable multi-state logic-in-memory in a single unit based on spin–orbit torque