Compute max

How, can I compute the maximum vector’s element in a cuda mexfile?