Skip to content
fn

gpu_index_of

::mlx::core::array gpu_index_of(const ::mlx::core::array & position)

A whole-numbered float position as an int64 index: NaN is 0 and a position past the int64 range saturates, so an infinite grid coordinate stays out of range (Metal's own conversion read +-inf as 0, in range).