Update student_func.cu

fixed synchronization issues