Resistive switching memory for non-volatile storage and neuromorphic computing