A rotating machine cooled by a cooling medium directed through the rotating machine in a main flow and a secondary flow includes a rotor. A stator includes a swirl passage configured to guide the secondary flow so as to be discharged from a pre-swirl nozzle. At least one control device includes a shape-memory alloy disposed in an area of the pre-swirl nozzle and is configured to control the secondary flow based on a temperature in an automated manner.