Skip to content
fn

scatter_identity

::mlx::core::array scatter_identity(ScatterReduce op, int dt)

The update that leaves a position as it was, which is what an out-of-range update becomes before it is scattered. For a sum that is -0.0 and not +0.0: x + -0.0 is x for every x including -0.0, while -0.0 + 0.0 is +0.0. MLX's atomic max and min write only when the update beats the value held, which -inf and +inf never do, NaN included. Its atomic product writes held * 1, the same bits.