Skip to main content
Log in

Mojo function

max

max(src: Buffer[type, size, address_space]) -> SIMD[$0, 1]

Computes the max element in a buffer.

Args:

  • src (Buffer[type, size, address_space]): The buffer.

Returns:

The maximum of the buffer elements.

max[reduce_axis: Int](src: NDBuffer[type, rank, shape, strides, address_space], dst: NDBuffer[type, rank, shape, create_unknown[::Int](), 0])

Computes the max across reduce_axis of an NDBuffer.

Parameters:

  • reduce_axis (Int): The axis to reduce across.

Args:

  • src (NDBuffer[type, rank, shape, strides, address_space]): The input buffer.
  • dst (NDBuffer[type, rank, shape, create_unknown[::Int](), 0]): The output buffer.

Was this page helpful?