Update student_func.cu

min/max loop terminates at gridSize.x & now using std::max and std::min for minimum and maximum calculations.