Two-terminal spin-orbit torque device for ultrafast and high-density memory