add max_reduce to student_func.cu