warp.max ======== .. currentmodule:: warp._src.lang .. function:: max(a: Scalar, b: Scalar) -> Scalar .. wp-function-tags:: :kernel: true :python: true :differentiable: true Compute the maximum value. On float types, NaN is treated as missing (C ``fmax`` semantics): the operation returns the non-NaN operand when exactly one is NaN, and NaN only when both are NaN. .. function:: max(a: Vector[Scalar, Any], b: Vector[Scalar, Any]) -> Vector[Scalar, Any] :noindex: .. wp-function-tags:: :kernel: true :python: true :differentiable: true Compute the maximum value. :returns: The element-wise maximum of ``a`` and ``b``. .. function:: max(a: Vector[Scalar, Any]) -> Scalar :noindex: .. wp-function-tags:: :kernel: true :python: true :differentiable: true Compute the maximum value. On float types, NaN elements are treated as missing (C ``fmax`` semantics); the reduction returns the largest non-NaN element, or NaN only if every element is NaN. :returns: The maximum element of ``a``.