Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions crates/core_arch/src/x86/sse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ pub unsafe fn _mm_add_ss(a: __m128, b: __m128) -> __m128 {
simd_insert!(a, 0, _mm_cvtss_f32(a) + _mm_cvtss_f32(b))
}

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

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

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

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