Skip to content

Commit 4492b4c

Browse files
AdamNiedereralexcrichton
authored andcommitted
Improve _mm256_round_* docs (rust-lang#93)
Fix a grammatical error, use a list instead of using a code block or nothing, and add the LLVM immediate reference.
1 parent 718e627 commit 4492b4c

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

Diff for: src/x86/avx.rs

+16-11
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,14 @@ pub unsafe fn _mm256_div_pd(a: f64x4, b: f64x4) -> f64x4 {
179179
/// Round packed double-precision (64-bit) floating point elements in `a`
180180
/// according to the flag `b`. The value of `b` may be as follows:
181181
///
182-
/// ```ignore
183-
/// 0x00: Round to the nearest whole number.
184-
/// 0x01: Round down, toward negative infinity.
185-
/// 0x02: Round up, toward positive infinity.
186-
/// 0x03: Truncate the values.
187-
/// ```
182+
/// - `0x00`: Round to the nearest whole number.
183+
/// - `0x01`: Round down, toward negative infinity.
184+
/// - `0x02`: Round up, toward positive infinity.
185+
/// - `0x03`: Truncate the values.
186+
///
187+
/// For a complete list of options, check the LLVM docs:
188+
///
189+
/// https://github.com/llvm-mirror/clang/blob/dcd8d797b20291f1a6b3e0ddda085aa2bbb382a8/lib/Headers/avxintrin.h#L382
188190
#[inline(always)]
189191
#[target_feature = "+avx"]
190192
#[cfg_attr(test, assert_instr(vroundpd, b = 0x3))]
@@ -215,11 +217,14 @@ pub unsafe fn _mm256_floor_pd(a: f64x4) -> f64x4 {
215217

216218
/// Round packed single-precision (32-bit) floating point elements in `a`
217219
/// according to the flag `b`. The value of `b` may be as follows:
218-
/// 0x00: Round to the nearest whole number.
219-
/// 0x01: Round down, toward negative infinity.
220-
/// 0x02: Round up, toward positive infinity.
221-
/// 0x03: Truncate the values.
222-
/// For a few additional values options, check the LLVM docs:
220+
///
221+
/// - `0x00`: Round to the nearest whole number.
222+
/// - `0x01`: Round down, toward negative infinity.
223+
/// - `0x02`: Round up, toward positive infinity.
224+
/// - `0x03`: Truncate the values.
225+
///
226+
/// For a complete list of options, check the LLVM docs:
227+
///
223228
/// https://github.com/llvm-mirror/clang/blob/dcd8d797b20291f1a6b3e0ddda085aa2bbb382a8/lib/Headers/avxintrin.h#L382
224229
#[inline(always)]
225230
#[target_feature = "+avx"]

0 commit comments

Comments
 (0)