Investigation on the Response of TaO $_{\rm x}$-based Resistive Random-Access Memories to Heavy-Ion Irradiation