cuda ex4 (3)