Unsteady flows and loss production in centrifugal and axial compressor stages