A model of TaOx threshold switching memristor for neuromorphic computing