Only calculate uniform samples once