Detection of the conductive filament growth direction in resistive memories