Skip to main content

function

prod_dims

prod_dims[start_dim: Int, end_dim: Int](x: NDBuffer[type, rank, shape, address_space]) -> Int

Computes the product of a slice of the given buffer's dimensions.

Parameters:

  • start_dim (Int): The index at which to begin computing the product.
  • end_dim (Int): The index at which to stop computing the product.

Args:

  • x (NDBuffer[type, rank, shape, address_space]): The NDBuffer whose dimensions will be multiplied.

Returns:

The product of the specified slice of the buffer's dimensions.