[IMPROVE] PE solving (directed differences)

- update directed_difference
- add directed_difference_E (like directed_difference but for assign_E_flow)
- simplify assign_roS_nr
- declare left_difference and left_difference globally
- add NR case to assign_E_flow

for both cpu and gpu versions

Signed-off-by: Anastasia Lyupa <anastasiya.lyupa@gmail.com>