[−][src]Macro safe_arch::round_m256
This is supported with target feature
avx
only.Rounds each lane in the style specified.
let a = m256::from_array([-0.1, 1.6, 3.3, 4.5, 5.1, 6.5, 7.2, 8.0]); // assert_eq!( round_m256!(a, Nearest).to_array(), [0.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] ); // assert_eq!( round_m256!(a, NegInf).to_array(), [-1.0, 1.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] ); // assert_eq!( round_m256!(a, PosInf).to_array(), [0.0, 2.0, 4.0, 5.0, 6.0, 7.0, 8.0, 8.0] ); // assert_eq!( round_m256!(a, Zero).to_array(), [0.0, 1.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] );