Skip to content

Commit e783860

Browse files
marxinAmanieu
authored andcommitted
Make documentation about __mm_$op_ps more precise
1 parent 06ff706 commit e783860

File tree

1 file changed

+8
-4
lines changed
  • crates/core_arch/src/x86

1 file changed

+8
-4
lines changed

crates/core_arch/src/x86/sse.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ pub unsafe fn _mm_add_ss(a: __m128, b: __m128) -> __m128 {
2222
simd_insert!(a, 0, _mm_cvtss_f32(a) + _mm_cvtss_f32(b))
2323
}
2424

25-
/// Adds __m128 vectors.
25+
/// Adds packed single-precision (32-bit) floating-point elements in `a` and
26+
/// `b`.
2627
///
2728
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_add_ps)
2829
#[inline]
@@ -45,7 +46,8 @@ pub unsafe fn _mm_sub_ss(a: __m128, b: __m128) -> __m128 {
4546
simd_insert!(a, 0, _mm_cvtss_f32(a) - _mm_cvtss_f32(b))
4647
}
4748

48-
/// Subtracts __m128 vectors.
49+
/// Subtracts packed single-precision (32-bit) floating-point elements in `a` and
50+
/// `b`.
4951
///
5052
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_sub_ps)
5153
#[inline]
@@ -68,7 +70,8 @@ pub unsafe fn _mm_mul_ss(a: __m128, b: __m128) -> __m128 {
6870
simd_insert!(a, 0, _mm_cvtss_f32(a) * _mm_cvtss_f32(b))
6971
}
7072

71-
/// Multiplies __m128 vectors.
73+
/// Multiplies packed single-precision (32-bit) floating-point elements in `a` and
74+
/// `b`.
7275
///
7376
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_mul_ps)
7477
#[inline]
@@ -91,7 +94,8 @@ pub unsafe fn _mm_div_ss(a: __m128, b: __m128) -> __m128 {
9194
simd_insert!(a, 0, _mm_cvtss_f32(a) / _mm_cvtss_f32(b))
9295
}
9396

94-
/// Divides __m128 vectors.
97+
/// Divides packed single-precision (32-bit) floating-point elements in `a` and
98+
/// `b`.
9599
///
96100
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_div_ps)
97101
#[inline]

0 commit comments

Comments
 (0)