Functional fatigue of shape memory wires under constant-stress and constant-strain loading conditions