From 8ffbf20d6ce44e9751db0b17e7a53ba8e2229ef9 Mon Sep 17 00:00:00 2001 From: BioTomateDE Date: Wed, 2 Dec 2026 02:23:02 +0100 Subject: [PATCH] [squash] docstring normalization and fixes --- crates/core_arch/src/aarch64/mte.rs | 12 +- crates/core_arch/src/aarch64/prefetch.rs | 14 +- crates/core_arch/src/amdgpu/mod.rs | 67 ++++-- crates/core_arch/src/arm/dsp.rs | 30 +-- crates/core_arch/src/arm/sat.rs | 6 +- crates/core_arch/src/arm/simd32.rs | 12 +- .../src/arm_shared/barrier/common.rs | 2 +- .../core_arch/src/arm_shared/barrier/cp15.rs | 2 +- .../core_arch/src/arm_shared/barrier/mod.rs | 3 +- .../src/arm_shared/barrier/not_mclass.rs | 14 +- crates/core_arch/src/arm_shared/barrier/v8.rs | 8 +- crates/core_arch/src/riscv64/mod.rs | 6 +- crates/core_arch/src/riscv64/zb.rs | 8 +- crates/core_arch/src/riscv_shared/mod.rs | 82 +++---- crates/core_arch/src/riscv_shared/p.rs | 200 ++++++++-------- crates/core_arch/src/riscv_shared/zb.rs | 4 +- crates/core_arch/src/x86/adx.rs | 6 +- crates/core_arch/src/x86/aes.rs | 2 +- crates/core_arch/src/x86/avx.rs | 186 ++++++++------- crates/core_arch/src/x86/avx2.rs | 216 ++++++++---------- crates/core_arch/src/x86/avx512bf16.rs | 50 ++-- 21 files changed, 462 insertions(+), 468 deletions(-) diff --git a/crates/core_arch/src/aarch64/mte.rs b/crates/core_arch/src/aarch64/mte.rs index f0ff2eb977..f2bd9f10db 100644 --- a/crates/core_arch/src/aarch64/mte.rs +++ b/crates/core_arch/src/aarch64/mte.rs @@ -17,7 +17,7 @@ unsafe extern "llvm-intrinsic" { fn subp_(ptr_a: *const (), ptr_b: *const ()) -> i64; } -/// Return a pointer containing a randomly generated logical address tag. +/// Returns a pointer containing a randomly generated logical address tag. /// /// `src`: A pointer containing an address. /// `mask`: A mask where each of the lower 16 bits specifies logical @@ -38,7 +38,7 @@ pub unsafe fn __arm_mte_create_random_tag(src: *const T, mask: u64) -> *const irg_(src as *const (), mask as i64) as *const T } -/// Return a pointer with the logical address tag offset by a value. +/// Returns a pointer with the logical address tag offset by a value. /// /// `src`: A pointer containing an address and a logical tag. /// `OFFSET`: A compile-time constant value in the range [0, 15]. @@ -54,7 +54,7 @@ pub unsafe fn __arm_mte_increment_tag(src: *const T) -> *c addg_(src as *const (), OFFSET) as *const T } -/// Add a logical tag to the set of excluded logical tags. +/// Adds a logical tag to the set of excluded logical tags. /// /// `src`: A pointer containing an address and a logical tag. /// `excluded`: A mask where the lower 16 bits each specify currently-excluded @@ -69,7 +69,7 @@ pub unsafe fn __arm_mte_exclude_tag(src: *const T, excluded: u64) -> u64 { gmi_(src as *const (), excluded as i64) as u64 } -/// Store an allocation tag for the 16-byte granule of memory. +/// Stores an allocation tag for the 16-byte granule of memory. /// /// `tag_address`: A pointer containing an address and a logical tag, which /// must be 16-byte aligned. @@ -83,7 +83,7 @@ pub unsafe fn __arm_mte_set_tag(tag_address: *const T) { stg_(tag_address as *const (), tag_address as *const ()); } -/// Load an allocation tag from memory, returning a new pointer with the +/// Loads an allocation tag from memory, returning a new pointer with the /// corresponding logical tag. /// /// `address`: A pointer containing an address from which allocation tag memory @@ -95,7 +95,7 @@ pub unsafe fn __arm_mte_get_tag(address: *const T) -> *const T { ldg_(address as *const (), address as *const ()) as *const T } -/// Calculate the difference between the address parts of two pointers, ignoring +/// Calculates the difference between the address parts of two pointers, ignoring /// the tags, and sign-extending the result. #[inline] #[target_feature(enable = "mte")] diff --git a/crates/core_arch/src/aarch64/prefetch.rs b/crates/core_arch/src/aarch64/prefetch.rs index a35b0c700f..71f113376a 100644 --- a/crates/core_arch/src/aarch64/prefetch.rs +++ b/crates/core_arch/src/aarch64/prefetch.rs @@ -6,31 +6,31 @@ unsafe extern "llvm-intrinsic" { fn prefetch(p: *const i8, rw: i32, loc: i32, ty: i32); } -/// See [`prefetch`](fn._prefetch.html). +/// See [`_prefetch`]. #[unstable(feature = "stdarch_aarch64_prefetch", issue = "117217")] pub const _PREFETCH_READ: i32 = 0; -/// See [`prefetch`](fn._prefetch.html). +/// See [`_prefetch`]. #[unstable(feature = "stdarch_aarch64_prefetch", issue = "117217")] pub const _PREFETCH_WRITE: i32 = 1; -/// See [`prefetch`](fn._prefetch.html). +/// See [`_prefetch`]. #[unstable(feature = "stdarch_aarch64_prefetch", issue = "117217")] pub const _PREFETCH_LOCALITY0: i32 = 0; -/// See [`prefetch`](fn._prefetch.html). +/// See [`_prefetch`]. #[unstable(feature = "stdarch_aarch64_prefetch", issue = "117217")] pub const _PREFETCH_LOCALITY1: i32 = 1; -/// See [`prefetch`](fn._prefetch.html). +/// See [`_prefetch`]. #[unstable(feature = "stdarch_aarch64_prefetch", issue = "117217")] pub const _PREFETCH_LOCALITY2: i32 = 2; -/// See [`prefetch`](fn._prefetch.html). +/// See [`_prefetch`]. #[unstable(feature = "stdarch_aarch64_prefetch", issue = "117217")] pub const _PREFETCH_LOCALITY3: i32 = 3; -/// Fetch the cache line that contains address `p` using the given `RW` and `LOCALITY`. +/// Fetches the cache line that contains address `p` using the given `RW` and `LOCALITY`. /// /// The `RW` must be one of: /// diff --git a/crates/core_arch/src/amdgpu/mod.rs b/crates/core_arch/src/amdgpu/mod.rs index 461a4ccda3..2b61293fb5 100644 --- a/crates/core_arch/src/amdgpu/mod.rs +++ b/crates/core_arch/src/amdgpu/mod.rs @@ -187,12 +187,14 @@ unsafe extern "llvm-intrinsic" { pub fn workitem_id_x() -> u32 { llvm_workitem_id_x() } + /// Returns the y coordinate of the workitem index within the workgroup. #[inline] #[unstable(feature = "stdarch_amdgpu", issue = "149988")] pub fn workitem_id_y() -> u32 { llvm_workitem_id_y() } + /// Returns the z coordinate of the workitem index within the workgroup. #[inline] #[unstable(feature = "stdarch_amdgpu", issue = "149988")] @@ -206,12 +208,14 @@ pub fn workitem_id_z() -> u32 { pub fn workgroup_id_x() -> u32 { llvm_workgroup_id_x() } + /// Returns the y coordinate of the workgroup index within the dispatch. #[inline] #[unstable(feature = "stdarch_amdgpu", issue = "149988")] pub fn workgroup_id_y() -> u32 { llvm_workgroup_id_y() } + /// Returns the z coordinate of the workgroup index within the dispatch. #[inline] #[unstable(feature = "stdarch_amdgpu", issue = "149988")] @@ -225,6 +229,7 @@ pub fn workgroup_id_z() -> u32 { pub fn groupstaticsize() -> u32 { llvm_groupstaticsize() } + /// Returns the id of the dispatch that is currently executed. #[inline] #[unstable(feature = "stdarch_amdgpu", issue = "149988")] @@ -241,7 +246,7 @@ pub fn wavefrontsize() -> u32 { llvm_wavefrontsize() } -/// Synchronize all wavefronts in a workgroup. +/// Synchronizes all wavefronts in a workgroup. /// /// Each wavefronts in a workgroup waits at the barrier until all wavefronts in the workgroup arrive at a barrier. /// @@ -252,7 +257,7 @@ pub fn s_barrier() { llvm_s_barrier() } -/// Signal a specific barrier type. +/// Signals a specific barrier type. /// /// Only for non-named barriers. /// @@ -263,7 +268,7 @@ pub unsafe fn s_barrier_signal() { unsafe { llvm_s_barrier_signal(BARRIER_TYPE) } } -/// Signal a specific barrier type. +/// Signals a specific barrier type. /// /// Only for non-named barriers. /// Provides access to the s_barrier_signal_first instruction; @@ -277,7 +282,7 @@ pub unsafe fn s_barrier_signal_isfirst() -> bool { unsafe { llvm_s_barrier_signal_isfirst(BARRIER_TYPE) } } -/// Wait for a specific barrier type. +/// Waits for a specific barrier type. /// /// Only for non-named barriers. /// @@ -288,7 +293,7 @@ pub unsafe fn s_barrier_wait() { unsafe { llvm_s_barrier_wait(BARRIER_TYPE) } } -/// Get the state of a specific barrier type. +/// Gets the state of a specific barrier type. /// /// The `barrier_type` argument must be uniform, otherwise behavior is undefined. /// @@ -310,7 +315,7 @@ pub fn wave_barrier() { llvm_wave_barrier() } -/// Prevent movement of some instruction types. +/// Prevents movement of some instruction types. /// /// Controls the types of instructions that may be allowed to cross the intrinsic during instruction scheduling. /// The parameter is a mask for the instruction types that can cross the intrinsic. @@ -380,7 +385,7 @@ pub fn s_sleep() { llvm_s_sleep(COUNT) } -/// Stop execution of the kernel. +/// Stops execution of the kernel. /// /// This usually signals an error state. /// @@ -413,6 +418,7 @@ pub fn s_getpc() -> i64 { pub fn mbcnt_lo(value: u32, init: u32) -> u32 { llvm_mbcnt_lo(value, init) } + /// Masked bit count, high 32 lanes. /// /// Computes the number of bits set in `value`, masked with a thread mask @@ -464,6 +470,7 @@ pub fn wave_reduce_umin(value: u32) -> u32 { static_assert!(STRATEGY <= 2); llvm_wave_reduce_umin(value, STRATEGY) } + /// Performs an arithmetic min reduction on the signed values provided by each lane in the wavefront. /// /// The `STRATEGY` argument is a hint for the reduction strategy. @@ -497,6 +504,7 @@ pub fn wave_reduce_umax(value: u32) -> u32 { static_assert!(STRATEGY <= 2); llvm_wave_reduce_umax(value, STRATEGY) } + /// Performs an arithmetic max reduction on the signed values provided by each lane in the wavefront. /// /// The `STRATEGY` argument is a hint for the reduction strategy. @@ -547,6 +555,7 @@ pub fn wave_reduce_and(value: u32) -> u32 { static_assert!(STRATEGY <= 2); llvm_wave_reduce_and(value, STRATEGY) } + /// Performs a logical or reduction on the unsigned values provided by each lane in the wavefront. /// /// The `STRATEGY` argument is a hint for the reduction strategy. @@ -563,6 +572,7 @@ pub fn wave_reduce_or(value: u32) -> u32 { static_assert!(STRATEGY <= 2); llvm_wave_reduce_or(value, STRATEGY) } + /// Performs a logical xor reduction on the unsigned values provided by each lane in the wavefront. /// /// The `STRATEGY` argument is a hint for the reduction strategy. @@ -582,7 +592,7 @@ pub fn wave_reduce_xor(value: u32) -> u32 { // The following intrinsics can have multiple sizes -/// Get `value` from the first active lane in the wavefront. +/// Gets `value` from the first active lane in the wavefront. /// #[doc = include_str!("intrinsic_is_convergent.md")] #[inline] @@ -590,7 +600,8 @@ pub fn wave_reduce_xor(value: u32) -> u32 { pub fn readfirstlane_u32(value: u32) -> u32 { llvm_readfirstlane_u32(value) } -/// Get `value` from the first active lane in the wavefront. + +/// Gets `value` from the first active lane in the wavefront. /// #[doc = include_str!("intrinsic_is_convergent.md")] #[inline] @@ -598,7 +609,8 @@ pub fn readfirstlane_u32(value: u32) -> u32 { pub fn readfirstlane_u64(value: u64) -> u64 { llvm_readfirstlane_u64(value) } -/// Get `value` from the lane at index `lane` in the wavefront. + +/// Gets `value` from the lane at index `lane` in the wavefront. /// /// The lane argument must be uniform across the currently active threads /// of the current wavefront. Otherwise, the result is undefined. @@ -609,7 +621,8 @@ pub fn readfirstlane_u64(value: u64) -> u64 { pub unsafe fn readlane_u32(value: u32, lane: u32) -> u32 { unsafe { llvm_readlane_u32(value, lane) } } -/// Get `value` from the lane at index `lane` in the wavefront. + +/// Gets `value` from the lane at index `lane` in the wavefront. /// /// The lane argument must be uniform across the currently active threads /// of the current wavefront. Otherwise, the result is undefined. @@ -620,8 +633,9 @@ pub unsafe fn readlane_u32(value: u32, lane: u32) -> u32 { pub unsafe fn readlane_u64(value: u64, lane: u32) -> u64 { unsafe { llvm_readlane_u64(value, lane) } } -/// Return `value` for the lane at index `lane` in the wavefront. -/// Return `default` for all other lanes. + +/// Returns `value` for the lane at index `lane` in the wavefront. +/// Returns `default` for all other lanes. /// /// The value to write and lane select arguments must be uniform across the /// currently active threads of the current wavefront. Otherwise, the result is @@ -636,8 +650,9 @@ pub unsafe fn readlane_u64(value: u64, lane: u32) -> u64 { pub unsafe fn writelane_u32(value: u32, lane: u32, default: u32) -> u32 { unsafe { llvm_writelane_u32(value, lane, default) } } -/// Return `value` for the lane at index `lane` in the wavefront. -/// Return `default` for all other lanes. + +/// Returns `value` for the lane at index `lane` in the wavefront. +/// Returns `default` for all other lanes. /// /// The value to write and lane select arguments must be uniform across the /// currently active threads of the current wavefront. Otherwise, the result is @@ -653,7 +668,7 @@ pub unsafe fn writelane_u64(value: u64, lane: u32, default: u64) -> u64 { unsafe { llvm_writelane_u64(value, lane, default) } } -/// Stop execution of the wavefront. +/// Stops execution of the wavefront. /// /// This usually signals the end of a successful execution. /// @@ -664,7 +679,7 @@ pub fn endpgm() -> ! { llvm_endpgm() } -/// The `update_dpp` intrinsic represents the `update.dpp` operation in AMDGPU. +/// Represents the `update.dpp` operation in AMDGPU. /// It takes an old value, a source operand, a DPP control operand, a row mask, a bank mask, and a bound control. /// This operation is equivalent to a sequence of `v_mov_b32` operations. /// @@ -700,7 +715,7 @@ pub fn s_memrealtime() -> u64 { llvm_s_memrealtime() } -/// Scatter data across all lanes in a wavefront. +/// Scatters data across all lanes in a wavefront. /// /// Writes `value` to the lane addressed by `lane`. /// @@ -715,7 +730,8 @@ pub fn s_memrealtime() -> u64 { pub unsafe fn ds_permute(lane: u32, value: u32) -> u32 { unsafe { llvm_ds_permute(lane, value) } } -/// Gather data across all lanes in a wavefront. + +/// Gathers data across all lanes in a wavefront. /// /// Returns the `value` given to `ds_bpermute` by the lane addressed by `lane`. /// @@ -729,7 +745,8 @@ pub unsafe fn ds_permute(lane: u32, value: u32) -> u32 { pub unsafe fn ds_bpermute(lane: u32, value: u32) -> u32 { unsafe { llvm_ds_bpermute(lane, value) } } -/// Permute a 64-bit value. + +/// Permutes a 64-bit value. /// /// `selector` selects between different patterns in which the 64-bit values represented by `src0` and `src1` are permuted. #[inline] @@ -774,7 +791,7 @@ pub unsafe fn permlanex16_u32( unsafe { llvm_permlanex16_u32(old, src0, src1, src2, FI, BOUND_CONTROL) } } -/// Get the index of the current wavefront in the workgroup. +/// Gets the index of the current wavefront in the workgroup. #[inline] #[unstable(feature = "stdarch_amdgpu", issue = "149988")] pub fn s_get_waveid_in_workgroup() -> u32 { @@ -782,7 +799,7 @@ pub fn s_get_waveid_in_workgroup() -> u32 { } // gfx11 -/// Swap `value` between upper and lower 32 lanes in a wavefront. +/// Swaps `value` between upper and lower 32 lanes in a wavefront. /// /// Does nothing for wave32. /// @@ -825,7 +842,7 @@ pub unsafe fn permlanex16_var( unsafe { llvm_permlanex16_var(old, src0, src1, FI, BOUND_CONTROL) } } -/// Get the index of the current wavefront in the workgroup. +/// Gets the index of the current wavefront in the workgroup. #[inline] #[unstable(feature = "stdarch_amdgpu", issue = "149988")] pub fn wave_id() -> u32 { @@ -833,7 +850,7 @@ pub fn wave_id() -> u32 { } // gfx950 -/// Provide direct access to `v_permlane16_swap_b32` instruction on supported targets. +/// Provides direct access to `v_permlane16_swap_b32` instruction on supported targets. /// /// Swaps the values across lanes of first 2 operands. /// Odd rows of the first operand are swapped with even rows of the second operand (one row is 16 lanes). @@ -851,7 +868,7 @@ pub unsafe fn permlane16_swap( } // gfx950 -/// Provide direct access to `v_permlane32_swap_b32` instruction on supported targets. +/// Provides direct access to `v_permlane32_swap_b32` instruction on supported targets. /// /// Swaps the values across lanes of first 2 operands. /// Rows 2 and 3 of the first operand are swapped with rows 0 and 1 of the second operand (one row is 16 lanes). diff --git a/crates/core_arch/src/arm/dsp.rs b/crates/core_arch/src/arm/dsp.rs index 566e509ba0..81020d1ffb 100644 --- a/crates/core_arch/src/arm/dsp.rs +++ b/crates/core_arch/src/arm/dsp.rs @@ -67,7 +67,7 @@ unsafe extern "llvm-intrinsic" { fn arm_smlawt(a: i32, b: i32, c: i32) -> i32; } -/// Insert a SMULBB instruction +/// Inserts a SMULBB instruction. /// /// Returns the equivalent of a\[0\] * b\[0\] /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -78,7 +78,7 @@ pub unsafe fn __smulbb(a: i32, b: i32) -> i32 { arm_smulbb(a, b) } -/// Insert a SMULTB instruction +/// Inserts a SMULTB instruction. /// /// Returns the equivalent of a\[0\] * b\[1\] /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -89,7 +89,7 @@ pub unsafe fn __smultb(a: i32, b: i32) -> i32 { arm_smultb(a, b) } -/// Insert a SMULTB instruction +/// Inserts a SMULTB instruction. /// /// Returns the equivalent of a\[1\] * b\[0\] /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -100,7 +100,7 @@ pub unsafe fn __smulbt(a: i32, b: i32) -> i32 { arm_smulbt(a, b) } -/// Insert a SMULTT instruction +/// Inserts a SMULTT instruction, /// /// Returns the equivalent of a\[1\] * b\[1\] /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -111,7 +111,7 @@ pub unsafe fn __smultt(a: i32, b: i32) -> i32 { arm_smultt(a, b) } -/// Insert a SMULWB instruction +/// Inserts a SMULWB instruction. /// /// Multiplies the 32-bit signed first operand with the low halfword /// (as a 16-bit signed integer) of the second operand. @@ -123,7 +123,7 @@ pub unsafe fn __smulwb(a: i32, b: i32) -> i32 { arm_smulwb(a, b) } -/// Insert a SMULWT instruction +/// Inserts a SMULWT instruction. /// /// Multiplies the 32-bit signed first operand with the high halfword /// (as a 16-bit signed integer) of the second operand. @@ -135,7 +135,7 @@ pub unsafe fn __smulwt(a: i32, b: i32) -> i32 { arm_smulwt(a, b) } -/// Signed saturating addition +/// Signed saturating addition. /// /// Returns the 32-bit saturating signed equivalent of a + b. /// Sets the Q flag if saturation occurs. @@ -146,7 +146,7 @@ pub unsafe fn __qadd(a: i32, b: i32) -> i32 { arm_qadd(a, b) } -/// Signed saturating subtraction +/// Signed saturating subtraction. /// /// Returns the 32-bit saturating signed equivalent of a - b. /// Sets the Q flag if saturation occurs. @@ -157,7 +157,7 @@ pub unsafe fn __qsub(a: i32, b: i32) -> i32 { arm_qsub(a, b) } -/// Insert a QADD instruction +/// Inserts a QADD instruction. /// /// Returns the 32-bit saturating signed equivalent of a + a /// Sets the Q flag if saturation occurs. @@ -168,7 +168,7 @@ pub unsafe fn __qdbl(a: i32) -> i32 { arm_qadd(a, a) } -/// Insert a SMLABB instruction +/// Inserts a SMLABB instruction. /// /// Returns the equivalent of a\[0\] * b\[0\] + c /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -180,7 +180,7 @@ pub unsafe fn __smlabb(a: i32, b: i32, c: i32) -> i32 { arm_smlabb(a, b, c) } -/// Insert a SMLABT instruction +/// Inserts a SMLABT instruction. /// /// Returns the equivalent of a\[0\] * b\[1\] + c /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -192,7 +192,7 @@ pub unsafe fn __smlabt(a: i32, b: i32, c: i32) -> i32 { arm_smlabt(a, b, c) } -/// Insert a SMLATB instruction +/// Inserts a SMLATB instruction. /// /// Returns the equivalent of a\[1\] * b\[0\] + c /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -204,7 +204,7 @@ pub unsafe fn __smlatb(a: i32, b: i32, c: i32) -> i32 { arm_smlatb(a, b, c) } -/// Insert a SMLATT instruction +/// Insert a SMLATT instruction. /// /// Returns the equivalent of a\[1\] * b\[1\] + c /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -216,7 +216,7 @@ pub unsafe fn __smlatt(a: i32, b: i32, c: i32) -> i32 { arm_smlatt(a, b, c) } -/// Insert a SMLAWB instruction +/// Inserts a SMLAWB instruction. /// /// Returns the equivalent of (a * b\[0\] + (c << 16)) >> 16 /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. @@ -228,7 +228,7 @@ pub unsafe fn __smlawb(a: i32, b: i32, c: i32) -> i32 { arm_smlawb(a, b, c) } -/// Insert a SMLAWT instruction +/// Inserts a SMLAWT instruction. /// /// Returns the equivalent of (a * b\[1\] + (c << 16)) >> 16 /// where \[0\] is the lower 16 bits and \[1\] is the upper 16 bits. diff --git a/crates/core_arch/src/arm/sat.rs b/crates/core_arch/src/arm/sat.rs index 033737a017..f1d7f7aec4 100644 --- a/crates/core_arch/src/arm/sat.rs +++ b/crates/core_arch/src/arm/sat.rs @@ -5,8 +5,7 @@ #[cfg(test)] use stdarch_test::assert_instr; -/// Saturates a 32-bit signed integer to a signed integer with a given -/// bit width. +/// Saturates a 32-bit signed integer to a signed integer with a given bit width. #[unstable(feature = "stdarch_arm_sat", issue = "none")] #[inline] #[cfg_attr(test, assert_instr("ssat", WIDTH = 8))] @@ -16,8 +15,7 @@ pub unsafe fn __ssat(x: i32) -> i32 { arm_ssat(x, WIDTH as i32) } -/// Saturates a 32-bit signed integer to an unsigned integer with a given -/// bit width. +/// Saturates a 32-bit signed integer to an unsigned integer with a given bit width. #[unstable(feature = "stdarch_arm_sat", issue = "none")] #[inline] #[cfg_attr(test, assert_instr("usat", WIDTH = 8))] diff --git a/crates/core_arch/src/arm/simd32.rs b/crates/core_arch/src/arm/simd32.rs index b3277d20b8..4ead7c710b 100644 --- a/crates/core_arch/src/arm/simd32.rs +++ b/crates/core_arch/src/arm/simd32.rs @@ -164,7 +164,7 @@ unsafe extern "llvm-intrinsic" { fn arm_usad8(a: i32, b: i32) -> u32; } -/// Saturating four 8-bit integer additions +/// Saturating four 8-bit integer additions. /// /// Returns the 8-bit signed equivalent of /// @@ -179,7 +179,7 @@ pub unsafe fn __qadd8(a: int8x4_t, b: int8x4_t) -> int8x4_t { dsp_call!(arm_qadd8, a, b) } -/// Saturating two 8-bit integer subtraction +/// Saturating two 8-bit integer subtraction. /// /// Returns the 8-bit signed equivalent of /// @@ -194,7 +194,7 @@ pub unsafe fn __qsub8(a: int8x4_t, b: int8x4_t) -> int8x4_t { dsp_call!(arm_qsub8, a, b) } -/// Saturating two 16-bit integer subtraction +/// Saturating two 16-bit integer subtraction. /// /// Returns the 16-bit signed equivalent of /// @@ -207,7 +207,7 @@ pub unsafe fn __qsub16(a: int16x2_t, b: int16x2_t) -> int16x2_t { dsp_call!(arm_qsub16, a, b) } -/// Saturating two 16-bit integer additions +/// Saturating two 16-bit integer additions. /// /// Returns the 16-bit signed equivalent of /// @@ -282,7 +282,7 @@ pub unsafe fn __smlad(a: int16x2_t, b: int16x2_t, c: i32) -> i32 { arm_smlad(transmute(a), transmute(b), c) } -/// Dual 16-bit Signed Multiply with Subtraction of products +/// Dual 16-bit Signed Multiply with Subtraction of products /// and 32-bit accumulation and overflow detection. /// /// Returns the 16-bit signed equivalent of @@ -307,7 +307,7 @@ pub unsafe fn __sasx(a: int16x2_t, b: int16x2_t) -> int16x2_t { dsp_call!(arm_sasx, a, b) } -/// Select bytes from each operand according to APSR GE flags +/// Selects bytes from each operand according to APSR GE flags. /// /// Returns the equivalent of /// diff --git a/crates/core_arch/src/arm_shared/barrier/common.rs b/crates/core_arch/src/arm_shared/barrier/common.rs index 476a07ffae..7603c964d9 100644 --- a/crates/core_arch/src/arm_shared/barrier/common.rs +++ b/crates/core_arch/src/arm_shared/barrier/common.rs @@ -1,7 +1,7 @@ //! Access types available on all architectures /// Full system is the required shareability domain, reads and writes are the -/// required access types +/// required access types. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct SY; diff --git a/crates/core_arch/src/arm_shared/barrier/cp15.rs b/crates/core_arch/src/arm_shared/barrier/cp15.rs index ae9ce3c005..31d34fc0ca 100644 --- a/crates/core_arch/src/arm_shared/barrier/cp15.rs +++ b/crates/core_arch/src/arm_shared/barrier/cp15.rs @@ -4,7 +4,7 @@ use crate::arch::asm; /// Full system is the required shareability domain, reads and writes are the -/// required access types +/// required access types. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct SY; diff --git a/crates/core_arch/src/arm_shared/barrier/mod.rs b/crates/core_arch/src/arm_shared/barrier/mod.rs index e1fc09d179..e2eef035eb 100644 --- a/crates/core_arch/src/arm_shared/barrier/mod.rs +++ b/crates/core_arch/src/arm_shared/barrier/mod.rs @@ -122,8 +122,7 @@ where arg.__dsb() } -/// Generates an ISB (instruction synchronization barrier) instruction or equivalent CP15 -/// instruction. +/// Generates an ISB (instruction synchronization barrier) instruction or equivalent CP15 instruction. /// /// This instruction flushes the processor pipeline fetch buffers, so that following instructions /// are fetched from cache or memory. diff --git a/crates/core_arch/src/arm_shared/barrier/not_mclass.rs b/crates/core_arch/src/arm_shared/barrier/not_mclass.rs index 3b941b2715..f840fab026 100644 --- a/crates/core_arch/src/arm_shared/barrier/not_mclass.rs +++ b/crates/core_arch/src/arm_shared/barrier/not_mclass.rs @@ -1,49 +1,49 @@ //! Access types available on v7 and v8 but not on v7(E)-M or v8-M /// Full system is the required shareability domain, writes are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ST; dmb_dsb!(ST); /// Inner Shareable is the required shareability domain, reads and writes are -/// the required access types +/// the required access types. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ISH; dmb_dsb!(ISH); /// Inner Shareable is the required shareability domain, writes are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ISHST; dmb_dsb!(ISHST); /// Non-shareable is the required shareability domain, reads and writes are the -/// required access types +/// required access types. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct NSH; dmb_dsb!(NSH); /// Non-shareable is the required shareability domain, writes are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct NSHST; dmb_dsb!(NSHST); /// Outer Shareable is the required shareability domain, reads and writes are -/// the required access types +/// the required access types. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct OSH; dmb_dsb!(OSH); /// Outer Shareable is the required shareability domain, writes are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct OSHST; diff --git a/crates/core_arch/src/arm_shared/barrier/v8.rs b/crates/core_arch/src/arm_shared/barrier/v8.rs index 5bf757f9f7..999016368e 100644 --- a/crates/core_arch/src/arm_shared/barrier/v8.rs +++ b/crates/core_arch/src/arm_shared/barrier/v8.rs @@ -1,26 +1,26 @@ /// Full system is the required shareability domain, reads are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct LD; dmb_dsb!(LD); /// Inner Shareable is the required shareability domain, reads are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ISHLD; dmb_dsb!(ISHLD); /// Non-shareable is the required shareability domain, reads are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct NSHLD; dmb_dsb!(NSHLD); /// Outer Shareable is the required shareability domain, reads are the required -/// access type +/// access type. #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct OSHLD; diff --git a/crates/core_arch/src/riscv64/mod.rs b/crates/core_arch/src/riscv64/mod.rs index 8301ea2b23..e9589f8a9a 100644 --- a/crates/core_arch/src/riscv64/mod.rs +++ b/crates/core_arch/src/riscv64/mod.rs @@ -10,7 +10,7 @@ pub use zb::*; #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] pub use zk::*; -/// Loads virtual machine memory by unsigned word integer +/// Loads virtual machine memory by unsigned word integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -33,7 +33,7 @@ pub unsafe fn hlv_wu(src: *const u32) -> u32 { value } -/// Loads virtual machine memory by double integer +/// Loads virtual machine memory by double integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -56,7 +56,7 @@ pub unsafe fn hlv_d(src: *const i64) -> i64 { value } -/// Stores virtual machine memory by double integer +/// Stores virtual machine memory by double integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory diff --git a/crates/core_arch/src/riscv64/zb.rs b/crates/core_arch/src/riscv64/zb.rs index 95c6fdf9cd..3ebf55f12d 100644 --- a/crates/core_arch/src/riscv64/zb.rs +++ b/crates/core_arch/src/riscv64/zb.rs @@ -61,7 +61,7 @@ pub fn xperm4_64(rs1: u64, rs2: u64) -> u64 { unsafe { _xperm4_64(rs1, rs2) } } -/// Bitwise OR-Combine, byte granule +/// Bitwise OR-Combine, byte granule. /// /// Combines the bits within every byte through a reciprocal bitwise logical OR. This sets the bits of each byte in /// the result rd to all zeros if no bit within the respective byte of rs is set, or to all ones if any bit within the @@ -80,7 +80,7 @@ pub fn orc_b_64(rs: u64) -> u64 { unsafe { _orc_b_64(rs) } } -/// Carry-less multiply (low-part) +/// Carry-less multiply (low-part). /// /// clmul produces the lower half of the 128-bit carry-less product. /// @@ -97,7 +97,7 @@ pub fn clmul_64(rs1: u64, rs2: u64) -> u64 { unsafe { _clmul_64(rs1, rs2) } } -/// Carry-less multiply (high-part) +/// Carry-less multiply (high-part). /// /// clmulh produces the upper half of the 128-bit carry-less product. /// @@ -114,7 +114,7 @@ pub fn clmulh_64(rs1: u64, rs2: u64) -> u64 { unsafe { _clmulh_64(rs1, rs2) } } -/// Carry-less multiply (reversed) +/// Carry-less multiply (reversed). /// /// clmulr produces bits 126:63 of the 128-bit carry-less product. /// diff --git a/crates/core_arch/src/riscv_shared/mod.rs b/crates/core_arch/src/riscv_shared/mod.rs index f3933f58b1..dfd26f6a0b 100644 --- a/crates/core_arch/src/riscv_shared/mod.rs +++ b/crates/core_arch/src/riscv_shared/mod.rs @@ -37,7 +37,7 @@ pub use zk::*; use crate::arch::asm; -/// Generates the `PAUSE` instruction +/// Generates the `PAUSE` instruction. /// /// The PAUSE instruction is a HINT that indicates the current hart's rate of instruction retirement /// should be temporarily reduced or paused. The duration of its effect must be bounded and may be zero. @@ -57,7 +57,7 @@ pub fn pause() { } } -/// Generates the `NOP` instruction +/// Generates the `NOP` instruction. /// /// The NOP instruction does not change any architecturally visible state, except for /// advancing the `pc` and incrementing any applicable performance counters. @@ -69,7 +69,7 @@ pub fn nop() { } } -/// Generates the `WFI` instruction +/// Generates the `WFI` instruction. /// /// The WFI instruction provides a hint to the implementation that the current hart can be stalled /// until an interrupt might need servicing. This instruction is a hint, @@ -80,7 +80,7 @@ pub unsafe fn wfi() { asm!("wfi", options(nomem, nostack, preserves_flags)); } -/// Generates the `FENCE.I` instruction +/// Generates the `FENCE.I` instruction. /// /// A FENCE.I instruction ensures that a subsequent instruction fetch on a RISC-V hart will see /// any previous data stores already visible to the same RISC-V hart. @@ -93,7 +93,7 @@ pub unsafe fn fence_i() { asm!("fence.i", options(nostack, preserves_flags)); } -/// Supervisor memory management fence for given virtual address and address space +/// Supervisor memory management fence for given virtual address and address space. /// /// The fence orders only reads and writes made to leaf page table entries corresponding to /// the virtual address in parameter `vaddr`, for the address space identified by integer parameter @@ -107,7 +107,7 @@ pub unsafe fn sfence_vma(vaddr: usize, asid: usize) { asm!("sfence.vma {}, {}", in(reg) vaddr, in(reg) asid, options(nostack, preserves_flags)); } -/// Supervisor memory management fence for given virtual address +/// Supervisor memory management fence for given virtual address. /// /// The fence orders only reads and writes made to leaf page table entries corresponding to /// the virtual address in parameter `vaddr`, for all address spaces. @@ -119,7 +119,7 @@ pub unsafe fn sfence_vma_vaddr(vaddr: usize) { asm!("sfence.vma {}, x0", in(reg) vaddr, options(nostack, preserves_flags)); } -/// Supervisor memory management fence for given address space +/// Supervisor memory management fence for given address space. /// /// The fence orders all reads and writes made to any level of the page tables, /// but only for the address space identified by integer parameter `asid`. @@ -133,7 +133,7 @@ pub unsafe fn sfence_vma_asid(asid: usize) { asm!("sfence.vma x0, {}", in(reg) asid, options(nostack, preserves_flags)); } -/// Supervisor memory management fence for all address spaces and virtual addresses +/// Supervisor memory management fence for all address spaces and virtual addresses. /// /// The fence orders all reads and writes made to any level of the page /// tables, for all address spaces. The fence also invalidates all address-translation cache entries, @@ -144,7 +144,7 @@ pub unsafe fn sfence_vma_all() { asm!("sfence.vma", options(nostack, preserves_flags)); } -/// Invalidate supervisor translation cache for given virtual address and address space +/// Invalidates supervisor translation cache for given virtual address and address space. /// /// This instruction invalidates any address-translation cache entries that an /// `SFENCE.VMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -160,7 +160,7 @@ pub unsafe fn sinval_vma(vaddr: usize, asid: usize) { ); } -/// Invalidate supervisor translation cache for given virtual address +/// Invalidates supervisor translation cache for given virtual address. /// /// This instruction invalidates any address-translation cache entries that an /// `SFENCE.VMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -174,7 +174,7 @@ pub unsafe fn sinval_vma_vaddr(vaddr: usize) { ); } -/// Invalidate supervisor translation cache for given address space +/// Invalidates supervisor translation cache for given address space. /// /// This instruction invalidates any address-translation cache entries that an /// `SFENCE.VMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -188,7 +188,7 @@ pub unsafe fn sinval_vma_asid(asid: usize) { ); } -/// Invalidate supervisor translation cache for all address spaces and virtual addresses +/// Invalidates supervisor translation cache for all address spaces and virtual addresses. /// /// This instruction invalidates any address-translation cache entries that an /// `SFENCE.VMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -201,7 +201,7 @@ pub unsafe fn sinval_vma_all() { ); } -/// Generates the `SFENCE.W.INVAL` instruction +/// Generates the `SFENCE.W.INVAL` instruction. /// /// This instruction guarantees that any previous stores already visible to the current RISC-V hart /// are ordered before subsequent `SINVAL.VMA` instructions executed by the same hart. @@ -215,7 +215,7 @@ pub unsafe fn sfence_w_inval() { ); } -/// Generates the `SFENCE.INVAL.IR` instruction +/// Generates the `SFENCE.INVAL.IR` instruction. /// /// This instruction guarantees that any previous SINVAL.VMA instructions executed by the current hart /// are ordered before subsequent implicit references by that hart to the memory-management data structures. @@ -229,7 +229,7 @@ pub unsafe fn sfence_inval_ir() { ); } -/// Loads virtual machine memory by signed byte integer +/// Loads virtual machine memory by signed byte integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -250,7 +250,7 @@ pub unsafe fn hlv_b(src: *const i8) -> i8 { value } -/// Loads virtual machine memory by unsigned byte integer +/// Loads virtual machine memory by unsigned byte integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -271,7 +271,7 @@ pub unsafe fn hlv_bu(src: *const u8) -> u8 { value } -/// Loads virtual machine memory by signed half integer +/// Loads virtual machine memory by signed half integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -292,7 +292,7 @@ pub unsafe fn hlv_h(src: *const i16) -> i16 { value } -/// Loads virtual machine memory by unsigned half integer +/// Loads virtual machine memory by unsigned half integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -313,7 +313,7 @@ pub unsafe fn hlv_hu(src: *const u16) -> u16 { value } -/// Accesses virtual machine instruction by unsigned half integer +/// Accesses virtual machine instruction by unsigned half integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// the memory being read must be executable in both stages of address translation, @@ -334,7 +334,7 @@ pub unsafe fn hlvx_hu(src: *const u16) -> u16 { insn } -/// Loads virtual machine memory by signed word integer +/// Loads virtual machine memory by signed word integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -355,7 +355,7 @@ pub unsafe fn hlv_w(src: *const i32) -> i32 { value } -/// Accesses virtual machine instruction by unsigned word integer +/// Accesses virtual machine instruction by unsigned word integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// the memory being read must be executable in both stages of address translation, @@ -376,7 +376,7 @@ pub unsafe fn hlvx_wu(src: *const u32) -> u32 { insn } -/// Stores virtual machine memory by byte integer +/// Stores virtual machine memory by byte integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -395,7 +395,7 @@ pub unsafe fn hsv_b(dst: *mut i8, src: i8) { ); } -/// Stores virtual machine memory by half integer +/// Stores virtual machine memory by half integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -414,7 +414,7 @@ pub unsafe fn hsv_h(dst: *mut i16, src: i16) { ); } -/// Stores virtual machine memory by word integer +/// Stores virtual machine memory by word integer. /// /// This instruction performs an explicit memory access as though `V=1`; /// i.e., with the address translation and protection, and the endianness, that apply to memory @@ -433,7 +433,7 @@ pub unsafe fn hsv_w(dst: *mut i32, src: i32) { ); } -/// Hypervisor memory management fence for given guest virtual address and guest address space +/// Hypervisor memory management fence for given guest virtual address and guest address space. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all /// implicit reads by that hart done for VS-stage address translation for instructions that: @@ -453,7 +453,7 @@ pub unsafe fn hfence_vvma(vaddr: usize, asid: usize) { ); } -/// Hypervisor memory management fence for given guest virtual address +/// Hypervisor memory management fence for given guest virtual address. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all /// implicit reads by that hart done for VS-stage address translation for instructions that: @@ -471,7 +471,7 @@ pub unsafe fn hfence_vvma_vaddr(vaddr: usize) { ); } -/// Hypervisor memory management fence for given guest address space +/// Hypervisor memory management fence for given guest address space. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all /// implicit reads by that hart done for VS-stage address translation for instructions that: @@ -489,7 +489,7 @@ pub unsafe fn hfence_vvma_asid(asid: usize) { ); } -/// Hypervisor memory management fence for all guest address spaces and guest virtual addresses +/// Hypervisor memory management fence for all guest address spaces and guest virtual addresses. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all /// implicit reads by that hart done for VS-stage address translation for instructions that: @@ -506,7 +506,7 @@ pub unsafe fn hfence_vvma_all() { ); } -/// Hypervisor memory management fence for guest physical address and virtual machine +/// Hypervisor memory management fence for guest physical address and virtual machine. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all implicit reads /// by that hart done for G-stage address translation for instructions that follow the HFENCE.GVMA. @@ -525,7 +525,7 @@ pub unsafe fn hfence_gvma(gaddr: usize, vmid: usize) { ); } -/// Hypervisor memory management fence for guest physical address +/// Hypervisor memory management fence for guest physical address. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all implicit reads /// by that hart done for G-stage address translation for instructions that follow the HFENCE.GVMA. @@ -541,7 +541,7 @@ pub unsafe fn hfence_gvma_gaddr(gaddr: usize) { ); } -/// Hypervisor memory management fence for given virtual machine +/// Hypervisor memory management fence for given virtual machine. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all implicit reads /// by that hart done for G-stage address translation for instructions that follow the HFENCE.GVMA. @@ -557,7 +557,7 @@ pub unsafe fn hfence_gvma_vmid(vmid: usize) { ); } -/// Hypervisor memory management fence for all virtual machines and guest physical addresses +/// Hypervisor memory management fence for all virtual machines and guest physical addresses. /// /// Guarantees that any previous stores already visible to the current hart are ordered before all implicit reads /// by that hart done for G-stage address translation for instructions that follow the HFENCE.GVMA. @@ -572,7 +572,7 @@ pub unsafe fn hfence_gvma_all() { ); } -/// Invalidate hypervisor translation cache for given guest virtual address and guest address space +/// Invalidate hypervisor translation cache for given guest virtual address and guest address space. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.VVMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -590,7 +590,7 @@ pub unsafe fn hinval_vvma(vaddr: usize, asid: usize) { ); } -/// Invalidate hypervisor translation cache for given guest virtual address +/// Invalidate hypervisor translation cache for given guest virtual address. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.VVMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -606,7 +606,7 @@ pub unsafe fn hinval_vvma_vaddr(vaddr: usize) { ); } -/// Invalidate hypervisor translation cache for given guest address space +/// Invalidate hypervisor translation cache for given guest address space. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.VVMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -622,7 +622,7 @@ pub unsafe fn hinval_vvma_asid(asid: usize) { ); } -/// Invalidate hypervisor translation cache for all guest address spaces and guest virtual addresses +/// Invalidate hypervisor translation cache for all guest address spaces and guest virtual addresses. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.VVMA` instruction with the same values of `vaddr` and `asid` would invalidate. @@ -637,7 +637,7 @@ pub unsafe fn hinval_vvma_all() { ); } -/// Invalidate hypervisor translation cache for guest physical address and virtual machine +/// Invalidate hypervisor translation cache for guest physical address and virtual machine. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.GVMA` instruction with the same values of `gaddr` and `vmid` would invalidate. @@ -656,7 +656,7 @@ pub unsafe fn hinval_gvma(gaddr: usize, vmid: usize) { ); } -/// Invalidate hypervisor translation cache for guest physical address +/// Invalidate hypervisor translation cache for guest physical address. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.GVMA` instruction with the same values of `gaddr` and `vmid` would invalidate. @@ -672,7 +672,7 @@ pub unsafe fn hinval_gvma_gaddr(gaddr: usize) { ); } -/// Invalidate hypervisor translation cache for given virtual machine +/// Invalidate hypervisor translation cache for given virtual machine. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.GVMA` instruction with the same values of `gaddr` and `vmid` would invalidate. @@ -688,7 +688,7 @@ pub unsafe fn hinval_gvma_vmid(vmid: usize) { ); } -/// Invalidate hypervisor translation cache for all virtual machines and guest physical addresses +/// Invalidate hypervisor translation cache for all virtual machines and guest physical addresses. /// /// This instruction invalidates any address-translation cache entries that an /// `HFENCE.GVMA` instruction with the same values of `gaddr` and `vmid` would invalidate. @@ -703,7 +703,7 @@ pub unsafe fn hinval_gvma_all() { ); } -/// Reads the floating-point rounding mode register `frm` +/// Reads the floating-point rounding mode register `frm`. /// /// According to "F" Standard Extension for Single-Precision Floating-Point, Version 2.2, /// the rounding mode field is defined as listed in the table below: diff --git a/crates/core_arch/src/riscv_shared/p.rs b/crates/core_arch/src/riscv_shared/p.rs index c76a0ec4b8..2f80fa9589 100644 --- a/crates/core_arch/src/riscv_shared/p.rs +++ b/crates/core_arch/src/riscv_shared/p.rs @@ -15,7 +15,7 @@ use stdarch_test::assert_instr; // at some point in the future, we can know in time and then update our // implementation. -/// Adds packed 16-bit signed numbers, discarding overflow bits +/// Adds packed 16-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -27,7 +27,7 @@ pub fn add16(a: usize, b: usize) -> usize { value } -/// Halves the sum of packed 16-bit signed numbers, dropping least bits +/// Halves the sum of packed 16-bit signed numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -39,7 +39,7 @@ pub fn radd16(a: usize, b: usize) -> usize { value } -/// Halves the sum of packed 16-bit unsigned numbers, dropping least bits +/// Halves the sum of packed 16-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -51,7 +51,7 @@ pub fn uradd16(a: usize, b: usize) -> usize { value } -/// Adds packed 16-bit signed numbers, saturating at the numeric bounds +/// Adds packed 16-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -63,7 +63,7 @@ pub fn kadd16(a: usize, b: usize) -> usize { value } -/// Adds packed 16-bit unsigned numbers, saturating at the numeric bounds +/// Adds packed 16-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -75,7 +75,7 @@ pub fn ukadd16(a: usize, b: usize) -> usize { value } -/// Subtracts packed 16-bit signed numbers, discarding overflow bits +/// Subtracts packed 16-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -87,7 +87,7 @@ pub fn sub16(a: usize, b: usize) -> usize { value } -/// Halves the subtraction result of packed 16-bit signed numbers, dropping least bits +/// Halves the subtraction result of packed 16-bit signed numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -99,7 +99,7 @@ pub fn rsub16(a: usize, b: usize) -> usize { value } -/// Halves the subtraction result of packed 16-bit unsigned numbers, dropping least bits +/// Halves the subtraction result of packed 16-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -111,7 +111,7 @@ pub fn ursub16(a: usize, b: usize) -> usize { value } -/// Subtracts packed 16-bit signed numbers, saturating at the numeric bounds +/// Subtracts packed 16-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -123,7 +123,7 @@ pub fn ksub16(a: usize, b: usize) -> usize { value } -/// Subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds +/// Subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -135,7 +135,7 @@ pub fn uksub16(a: usize, b: usize) -> usize { value } -/// Cross adds and subtracts packed 16-bit signed numbers, discarding overflow bits +/// Cross adds and subtracts packed 16-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -147,7 +147,7 @@ pub fn cras16(a: usize, b: usize) -> usize { value } -/// Cross halves of adds and subtracts packed 16-bit signed numbers, dropping least bits +/// Cross halves of adds and subtracts packed 16-bit signed numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -159,7 +159,7 @@ pub fn rcras16(a: usize, b: usize) -> usize { value } -/// Cross halves of adds and subtracts packed 16-bit unsigned numbers, dropping least bits +/// Cross halves of adds and subtracts packed 16-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -171,7 +171,7 @@ pub fn urcras16(a: usize, b: usize) -> usize { value } -/// Cross adds and subtracts packed 16-bit signed numbers, saturating at the numeric bounds +/// Cross adds and subtracts packed 16-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -183,7 +183,7 @@ pub fn kcras16(a: usize, b: usize) -> usize { value } -/// Cross adds and subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds +/// Cross adds and subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -195,7 +195,7 @@ pub fn ukcras16(a: usize, b: usize) -> usize { value } -/// Cross subtracts and adds packed 16-bit signed numbers, discarding overflow bits +/// Cross subtracts and adds packed 16-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -207,7 +207,7 @@ pub fn crsa16(a: usize, b: usize) -> usize { value } -/// Cross halves of subtracts and adds packed 16-bit signed numbers, dropping least bits +/// Cross halves of subtracts and adds packed 16-bit signed numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -219,7 +219,7 @@ pub fn rcrsa16(a: usize, b: usize) -> usize { value } -/// Cross halves of subtracts and adds packed 16-bit unsigned numbers, dropping least bits +/// Cross halves of subtracts and adds packed 16-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -231,7 +231,7 @@ pub fn urcrsa16(a: usize, b: usize) -> usize { value } -/// Cross subtracts and adds packed 16-bit signed numbers, saturating at the numeric bounds +/// Cross subtracts and adds packed 16-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -243,7 +243,7 @@ pub fn kcrsa16(a: usize, b: usize) -> usize { value } -/// Cross subtracts and adds packed 16-bit unsigned numbers, saturating at the numeric bounds +/// Cross subtracts and adds packed 16-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -255,7 +255,7 @@ pub fn ukcrsa16(a: usize, b: usize) -> usize { value } -/// Straight adds and subtracts packed 16-bit signed numbers, discarding overflow bits +/// Straight adds and subtracts packed 16-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -267,7 +267,7 @@ pub fn stas16(a: usize, b: usize) -> usize { value } -/// Straight halves of adds and subtracts packed 16-bit signed numbers, dropping least bits +/// Straight halves of adds and subtracts packed 16-bit signed numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -279,7 +279,7 @@ pub fn rstas16(a: usize, b: usize) -> usize { value } -/// Straight halves of adds and subtracts packed 16-bit unsigned numbers, dropping least bits +/// Straight halves of adds and subtracts packed 16-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -291,7 +291,7 @@ pub fn urstas16(a: usize, b: usize) -> usize { value } -/// Straight adds and subtracts packed 16-bit signed numbers, saturating at the numeric bounds +/// Straight adds and subtracts packed 16-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -303,7 +303,7 @@ pub fn kstas16(a: usize, b: usize) -> usize { value } -/// Straight adds and subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds +/// Straight adds and subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -315,7 +315,7 @@ pub fn ukstas16(a: usize, b: usize) -> usize { value } -/// Straight subtracts and adds packed 16-bit signed numbers, discarding overflow bits +/// Straight subtracts and adds packed 16-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -327,7 +327,7 @@ pub fn stsa16(a: usize, b: usize) -> usize { value } -/// Straight halves of subtracts and adds packed 16-bit signed numbers, dropping least bits +/// Straight halves of subtracts and adds packed 16-bit signed numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -339,7 +339,7 @@ pub fn rstsa16(a: usize, b: usize) -> usize { value } -/// Straight halves of subtracts and adds packed 16-bit unsigned numbers, dropping least bits +/// Straight halves of subtracts and adds packed 16-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -351,7 +351,7 @@ pub fn urstsa16(a: usize, b: usize) -> usize { value } -/// Straight subtracts and adds packed 16-bit signed numbers, saturating at the numeric bounds +/// Straight subtracts and adds packed 16-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -363,7 +363,7 @@ pub fn kstsa16(a: usize, b: usize) -> usize { value } -/// Straight subtracts and adds packed 16-bit unsigned numbers, saturating at the numeric bounds +/// Straight subtracts and adds packed 16-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -375,7 +375,7 @@ pub fn ukstsa16(a: usize, b: usize) -> usize { value } -/// Adds packed 8-bit signed numbers, discarding overflow bits +/// Adds packed 8-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -387,7 +387,7 @@ pub fn add8(a: usize, b: usize) -> usize { value } -/// Halves the sum of packed 8-bit signed numbers, dropping least bits +/// Halves the sum of packed 8-bit signed numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -399,7 +399,7 @@ pub fn radd8(a: usize, b: usize) -> usize { value } -/// Halves the sum of packed 8-bit unsigned numbers, dropping least bits +/// Halves the sum of packed 8-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -411,7 +411,7 @@ pub fn uradd8(a: usize, b: usize) -> usize { value } -/// Adds packed 8-bit signed numbers, saturating at the numeric bounds +/// Adds packed 8-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -423,7 +423,7 @@ pub fn kadd8(a: usize, b: usize) -> usize { value } -/// Adds packed 8-bit unsigned numbers, saturating at the numeric bounds +/// Adds packed 8-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -435,7 +435,7 @@ pub fn ukadd8(a: usize, b: usize) -> usize { value } -/// Subtracts packed 8-bit signed numbers, discarding overflow bits +/// Subtracts packed 8-bit signed numbers, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -459,7 +459,7 @@ pub fn rsub8(a: usize, b: usize) -> usize { value } -/// Halves the subtraction result of packed 8-bit unsigned numbers, dropping least bits +/// Halves the subtraction result of packed 8-bit unsigned numbers, dropping least bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -471,7 +471,7 @@ pub fn ursub8(a: usize, b: usize) -> usize { value } -/// Subtracts packed 8-bit signed numbers, saturating at the numeric bounds +/// Subtracts packed 8-bit signed numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -483,7 +483,7 @@ pub fn ksub8(a: usize, b: usize) -> usize { value } -/// Subtracts packed 8-bit unsigned numbers, saturating at the numeric bounds +/// Subtracts packed 8-bit unsigned numbers, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -495,7 +495,7 @@ pub fn uksub8(a: usize, b: usize) -> usize { value } -/// Arithmetic right shift packed 16-bit elements without rounding up +/// Arithmetic right shift packed 16-bit elements without rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -507,7 +507,7 @@ pub fn sra16(a: usize, b: u32) -> usize { value } -/// Arithmetic right shift packed 16-bit elements with rounding up +/// Arithmetic right shift packed 16-bit elements with rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -519,7 +519,7 @@ pub fn sra16u(a: usize, b: u32) -> usize { value } -/// Logical right shift packed 16-bit elements without rounding up +/// Logical right shift packed 16-bit elements without rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -531,7 +531,7 @@ pub fn srl16(a: usize, b: u32) -> usize { value } -/// Logical right shift packed 16-bit elements with rounding up +/// Logical right shift packed 16-bit elements with rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -543,7 +543,7 @@ pub fn srl16u(a: usize, b: u32) -> usize { value } -/// Logical left shift packed 16-bit elements, discarding overflow bits +/// Logical left shift packed 16-bit elements, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -555,7 +555,7 @@ pub fn sll16(a: usize, b: u32) -> usize { value } -/// Logical left shift packed 16-bit elements, saturating at the numeric bounds +/// Logical left shift packed 16-bit elements, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -567,7 +567,7 @@ pub fn ksll16(a: usize, b: u32) -> usize { value } -/// Logical saturating left then arithmetic right shift packed 16-bit elements +/// Logical saturating left then arithmetic right shift packed 16-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -579,7 +579,7 @@ pub fn kslra16(a: usize, b: i32) -> usize { value } -/// Logical saturating left then arithmetic right shift packed 16-bit elements +/// Logical saturating left then arithmetic right shift packed 16-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -591,7 +591,7 @@ pub fn kslra16u(a: usize, b: i32) -> usize { value } -/// Arithmetic right shift packed 8-bit elements without rounding up +/// Arithmetic right shift packed 8-bit elements without rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -603,7 +603,7 @@ pub fn sra8(a: usize, b: u32) -> usize { value } -/// Arithmetic right shift packed 8-bit elements with rounding up +/// Arithmetic right shift packed 8-bit elements with rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -615,7 +615,7 @@ pub fn sra8u(a: usize, b: u32) -> usize { value } -/// Logical right shift packed 8-bit elements without rounding up +/// Logical right shift packed 8-bit elements without rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -627,7 +627,7 @@ pub fn srl8(a: usize, b: u32) -> usize { value } -/// Logical right shift packed 8-bit elements with rounding up +/// Logical right shift packed 8-bit elements with rounding up. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -639,7 +639,7 @@ pub fn srl8u(a: usize, b: u32) -> usize { value } -/// Logical left shift packed 8-bit elements, discarding overflow bits +/// Logical left shift packed 8-bit elements, discarding overflow bits. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -651,7 +651,7 @@ pub fn sll8(a: usize, b: u32) -> usize { value } -/// Logical left shift packed 8-bit elements, saturating at the numeric bounds +/// Logical left shift packed 8-bit elements, saturating at the numeric bounds. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -663,7 +663,7 @@ pub fn ksll8(a: usize, b: u32) -> usize { value } -/// Logical saturating left then arithmetic right shift packed 8-bit elements +/// Logical saturating left then arithmetic right shift packed 8-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -687,7 +687,7 @@ pub fn kslra8u(a: usize, b: i32) -> usize { value } -/// Compare equality for packed 16-bit elements +/// Compares equality for packed 16-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -699,7 +699,7 @@ pub fn cmpeq16(a: usize, b: usize) -> usize { value } -/// Compare whether 16-bit packed signed integers are less than the others +/// Compares whether 16-bit packed signed integers are less than the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -711,7 +711,7 @@ pub fn scmplt16(a: usize, b: usize) -> usize { value } -/// Compare whether 16-bit packed signed integers are less than or equal to the others +/// Compares whether 16-bit packed signed integers are less than or equal to the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -723,7 +723,7 @@ pub fn scmple16(a: usize, b: usize) -> usize { value } -/// Compare whether 16-bit packed unsigned integers are less than the others +/// Compares whether 16-bit packed unsigned integers are less than the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -735,7 +735,7 @@ pub fn ucmplt16(a: usize, b: usize) -> usize { value } -/// Compare whether 16-bit packed unsigned integers are less than or equal to the others +/// Compares whether 16-bit packed unsigned integers are less than or equal to the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -759,7 +759,7 @@ pub fn cmpeq8(a: usize, b: usize) -> usize { value } -/// Compare whether 8-bit packed signed integers are less than the others +/// Compares whether 8-bit packed signed integers are less than the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -771,7 +771,7 @@ pub fn scmplt8(a: usize, b: usize) -> usize { value } -/// Compare whether 8-bit packed signed integers are less than or equal to the others +/// Compares whether 8-bit packed signed integers are less than or equal to the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -783,7 +783,7 @@ pub fn scmple8(a: usize, b: usize) -> usize { value } -/// Compare whether 8-bit packed unsigned integers are less than the others +/// Compares whether 8-bit packed unsigned integers are less than the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -795,7 +795,7 @@ pub fn ucmplt8(a: usize, b: usize) -> usize { value } -/// Compare whether 8-bit packed unsigned integers are less than or equal to the others +/// Compares whether 8-bit packed unsigned integers are less than or equal to the others. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -807,7 +807,7 @@ pub fn ucmple8(a: usize, b: usize) -> usize { value } -/// Get minimum values from 16-bit packed signed integers +/// Gets the minimum values from 16-bit packed signed integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -819,7 +819,7 @@ pub fn smin16(a: usize, b: usize) -> usize { value } -/// Get minimum values from 16-bit packed unsigned integers +/// Gets the minimum values from 16-bit packed unsigned integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -831,7 +831,7 @@ pub fn umin16(a: usize, b: usize) -> usize { value } -/// Get maximum values from 16-bit packed signed integers +/// Gets the maximum values from 16-bit packed signed integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -843,7 +843,7 @@ pub fn smax16(a: usize, b: usize) -> usize { value } -/// Get maximum values from 16-bit packed unsigned integers +/// Gets the maximum values from 16-bit packed unsigned integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -857,7 +857,7 @@ pub fn umax16(a: usize, b: usize) -> usize { /* todo: sclip16, uclip16 */ -/// Compute the absolute value of packed 16-bit signed integers +/// Computes the absolute value of packed 16-bit signed integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -869,7 +869,7 @@ pub fn kabs16(a: usize) -> usize { value } -/// Count the number of redundant sign bits of the packed 16-bit elements +/// Counts the number of redundant sign bits of the packed 16-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -881,7 +881,7 @@ pub fn clrs16(a: usize) -> usize { value } -/// Count the number of leading zero bits of the packed 16-bit elements +/// Counts the number of leading zero bits of the packed 16-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -893,7 +893,7 @@ pub fn clz16(a: usize) -> usize { value } -/// Swap the 16-bit halfwords within each 32-bit word of a register +/// Swaps the 16-bit halfwords within each 32-bit word of a register. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -906,7 +906,7 @@ pub fn swap16(a: usize) -> usize { value } -/// Get minimum values from 8-bit packed signed integers +/// Gets minimum values from 8-bit packed signed integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -930,7 +930,7 @@ pub fn umin8(a: usize, b: usize) -> usize { value } -/// Get maximum values from 8-bit packed signed integers +/// Gets maximum values from 8-bit packed signed integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -956,7 +956,7 @@ pub fn umax8(a: usize, b: usize) -> usize { /* todo: sclip8, uclip8 */ -/// Compute the absolute value of packed 8-bit signed integers +/// Computes the absolute value of packed 8-bit signed integers. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -968,7 +968,7 @@ pub fn kabs8(a: usize) -> usize { value } -/// Count the number of redundant sign bits of the packed 8-bit elements +/// Counts the number of redundant sign bits of the packed 8-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -980,7 +980,7 @@ pub fn clrs8(a: usize) -> usize { value } -/// Count the number of leading zero bits of the packed 8-bit elements +/// Counts the number of leading zero bits of the packed 8-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -992,7 +992,7 @@ pub fn clz8(a: usize) -> usize { value } -/// Swap the 8-bit bytes within each 16-bit halfword of a register. +/// Swaps the 8-bit bytes within each 16-bit halfword of a register. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1004,7 +1004,7 @@ pub fn swap8(a: usize) -> usize { value } -/// Unpack first and zeroth into two 16-bit signed halfwords in each 32-bit chunk +/// Unpack first and zeroth into two 16-bit signed halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1016,7 +1016,7 @@ pub fn sunpkd810(a: usize) -> usize { value } -/// Unpack second and zeroth into two 16-bit signed halfwords in each 32-bit chunk +/// Unpacks second and zeroth into two 16-bit signed halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1028,7 +1028,7 @@ pub fn sunpkd820(a: usize) -> usize { value } -/// Unpack third and zeroth into two 16-bit signed halfwords in each 32-bit chunk +/// Unpacks third and zeroth into two 16-bit signed halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1040,7 +1040,7 @@ pub fn sunpkd830(a: usize) -> usize { value } -/// Unpack third and first into two 16-bit signed halfwords in each 32-bit chunk +/// Unpacks third and first into two 16-bit signed halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1052,7 +1052,7 @@ pub fn sunpkd831(a: usize) -> usize { value } -/// Unpack third and second into two 16-bit signed halfwords in each 32-bit chunk +/// Unpacks third and second into two 16-bit signed halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1064,7 +1064,7 @@ pub fn sunpkd832(a: usize) -> usize { value } -/// Unpack first and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk +/// Unpacks first and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1076,7 +1076,7 @@ pub fn zunpkd810(a: usize) -> usize { value } -/// Unpack second and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk +/// Unpacks second and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1088,7 +1088,7 @@ pub fn zunpkd820(a: usize) -> usize { value } -/// Unpack third and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk +/// Unpacks third and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1100,7 +1100,7 @@ pub fn zunpkd830(a: usize) -> usize { value } -/// Unpack third and first into two 16-bit unsigned halfwords in each 32-bit chunk +/// Unpacks third and first into two 16-bit unsigned halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1112,7 +1112,7 @@ pub fn zunpkd831(a: usize) -> usize { value } -/// Unpack third and second into two 16-bit unsigned halfwords in each 32-bit chunk +/// Unpacks third and second into two 16-bit unsigned halfwords in each 32-bit chunk. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1126,7 +1126,7 @@ pub fn zunpkd832(a: usize) -> usize { // todo: pkbb16, pktt16 -/// Pack two 16-bit data from bottom and top half from 32-bit chunks +/// Packs two 16-bit data from bottom and top half from 32-bit chunks. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1138,7 +1138,7 @@ pub fn pkbt16(a: usize, b: usize) -> usize { value } -/// Pack two 16-bit data from top and bottom half from 32-bit chunks +/// Packs two 16-bit data from top and bottom half from 32-bit chunks. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1150,7 +1150,7 @@ pub fn pktb16(a: usize, b: usize) -> usize { value } -/// Count the number of redundant sign bits of the packed 32-bit elements +/// Counts the number of redundant sign bits of the packed 32-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1162,7 +1162,7 @@ pub fn clrs32(a: usize) -> usize { value } -/// Count the number of leading zero bits of the packed 32-bit elements +/// Counts the number of leading zero bits of the packed 32-bit elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1174,7 +1174,7 @@ pub fn clz32(a: usize) -> usize { value } -/// Calculate the sum of absolute difference of unsigned 8-bit data elements +/// Calculates the sum of absolute difference of unsigned 8-bit data elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1186,7 +1186,7 @@ pub fn pbsad(a: usize, b: usize) -> usize { value } -/// Calculate and accumulate the sum of absolute difference of unsigned 8-bit data elements +/// Calculates and accumulate the sum of absolute difference of unsigned 8-bit data elements. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1198,7 +1198,7 @@ pub fn pbsada(t: usize, a: usize, b: usize) -> usize { value } -/// Multiply signed 8-bit elements and add 16-bit elements on results for packed 32-bit chunks +/// Multiplies signed 8-bit elements and adds 16-bit elements on results for packed 32-bit chunks. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1210,7 +1210,7 @@ pub fn smaqa(t: usize, a: usize, b: usize) -> usize { value } -/// Multiply unsigned 8-bit elements and add 16-bit elements on results for packed 32-bit chunks +/// Multiplies unsigned 8-bit elements and adds 16-bit elements on results for packed 32-bit chunks. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1222,7 +1222,7 @@ pub fn umaqa(t: usize, a: usize, b: usize) -> usize { value } -/// Multiply signed to unsigned 8-bit and add 16-bit elements on results for packed 32-bit chunks +/// Multiplies signed to unsigned 8-bit and adds 16-bit elements on results for packed 32-bit chunks. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1234,7 +1234,7 @@ pub fn smaqasu(t: usize, a: usize, b: usize) -> usize { value } -/// Adds signed lower 16-bit content of two registers with Q15 saturation +/// Adds signed lower 16-bit content of two registers with Q15 saturation. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1246,7 +1246,7 @@ pub fn kaddh(a: usize, b: usize) -> usize { value } -/// Subtracts signed lower 16-bit content of two registers with Q15 saturation +/// Subtracts signed lower 16-bit content of two registers with Q15 saturation. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1258,7 +1258,7 @@ pub fn ksubh(a: usize, b: usize) -> usize { value } -/// Adds signed lower 16-bit content of two registers with U16 saturation +/// Adds signed lower 16-bit content of two registers with U16 saturation. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] @@ -1270,7 +1270,7 @@ pub fn ukaddh(a: usize, b: usize) -> usize { value } -/// Subtracts signed lower 16-bit content of two registers with U16 saturation +/// Subtracts signed lower 16-bit content of two registers with U16 saturation. #[inline] #[cfg_attr(test, assert_instr(unknown))] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] diff --git a/crates/core_arch/src/riscv_shared/zb.rs b/crates/core_arch/src/riscv_shared/zb.rs index 04a42f0235..5ec8bbf894 100644 --- a/crates/core_arch/src/riscv_shared/zb.rs +++ b/crates/core_arch/src/riscv_shared/zb.rs @@ -9,7 +9,7 @@ unsafe extern "llvm-intrinsic" { fn _clmul_32(rs1: u32, rs2: u32) -> u32; } -/// Bitwise OR-Combine, byte granule +/// Bitwise OR-Combine, byte granule. /// /// Combines the bits within every byte through a reciprocal bitwise logical OR. This sets the bits of each byte in /// the result rd to all zeros if no bit within the respective byte of rs is set, or to all ones if any bit within the @@ -28,7 +28,7 @@ pub fn orc_b_32(rs: u32) -> u32 { unsafe { _orc_b_32(rs) } } -/// Carry-less multiply (low-part) +/// Carry-less multiply (low-part). /// /// clmul produces the lower half of the 32-bit carry-less product. /// diff --git a/crates/core_arch/src/x86/adx.rs b/crates/core_arch/src/x86/adx.rs index 826062b11c..4b4ad69d00 100644 --- a/crates/core_arch/src/x86/adx.rs +++ b/crates/core_arch/src/x86/adx.rs @@ -10,7 +10,7 @@ unsafe extern "llvm-intrinsic" { } /// Adds unsigned 32-bit integers `a` and `b` with unsigned 8-bit carry-in `c_in` -/// (carry or overflow flag), and store the unsigned 32-bit result in `out`, and the carry-out +/// (carry or overflow flag), and stores the unsigned 32-bit result in `out`, and the carry-out /// is returned (carry or overflow flag). /// /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_addcarry_u32) @@ -24,7 +24,7 @@ pub fn _addcarry_u32(c_in: u8, a: u32, b: u32, out: &mut u32) -> u8 { } /// Adds unsigned 32-bit integers `a` and `b` with unsigned 8-bit carry-in `c_in` -/// (carry or overflow flag), and store the unsigned 32-bit result in `out`, and +/// (carry or overflow flag), and stores the unsigned 32-bit result in `out`, and /// the carry-out is returned (carry or overflow flag). /// /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_addcarryx_u32) @@ -37,7 +37,7 @@ pub fn _addcarryx_u32(c_in: u8, a: u32, b: u32, out: &mut u32) -> u8 { } /// Adds unsigned 32-bit integers `a` and `b` with unsigned 8-bit carry-in `c_in` -/// (carry or overflow flag), and store the unsigned 32-bit result in `out`, and +/// (carry or overflow flag), and stores the unsigned 32-bit result in `out`, and /// the carry-out is returned (carry or overflow flag). /// /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_subborrow_u32) diff --git a/crates/core_arch/src/x86/aes.rs b/crates/core_arch/src/x86/aes.rs index 42e0541259..a1e912ff17 100644 --- a/crates/core_arch/src/x86/aes.rs +++ b/crates/core_arch/src/x86/aes.rs @@ -83,7 +83,7 @@ pub fn _mm_aesimc_si128(a: __m128i) -> __m128i { unsafe { aesimc(a) } } -/// Assist in expanding the AES cipher key. +/// Assists in expanding the AES cipher key. /// /// Assist in expanding the AES cipher key by computing steps towards /// generating a round key for encryption cipher using data from `a` and an diff --git a/crates/core_arch/src/x86/avx.rs b/crates/core_arch/src/x86/avx.rs index 9458c400c8..06cbf66375 100644 --- a/crates/core_arch/src/x86/avx.rs +++ b/crates/core_arch/src/x86/avx.rs @@ -22,8 +22,7 @@ use crate::{ #[cfg(test)] use stdarch_test::assert_instr; -/// Adds packed double-precision (64-bit) floating-point elements -/// in `a` and `b`. +/// Adds packed double-precision (64-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=_mm256_add_pd) #[inline] @@ -35,8 +34,7 @@ pub const fn _mm256_add_pd(a: __m256d, b: __m256d) -> __m256d { unsafe { simd_add(a, b) } } -/// Adds packed single-precision (32-bit) floating-point elements in `a` and -/// `b`. +/// 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=_mm256_add_ps) #[inline] @@ -210,7 +208,7 @@ pub const fn _mm256_andnot_ps(a: __m256, b: __m256) -> __m256 { } /// Compares packed double-precision (64-bit) floating-point elements -/// in `a` and `b`, and returns packed maximum values +/// in `a` and `b`, and returns packed maximum values. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_max_pd) #[inline] @@ -222,7 +220,7 @@ pub fn _mm256_max_pd(a: __m256d, b: __m256d) -> __m256d { } /// Compares packed single-precision (32-bit) floating-point elements in `a` -/// and `b`, and returns packed maximum values +/// and `b`, and returns packed maximum values. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_max_ps) #[inline] @@ -234,7 +232,7 @@ pub fn _mm256_max_ps(a: __m256, b: __m256) -> __m256 { } /// Compares packed double-precision (64-bit) floating-point elements -/// in `a` and `b`, and returns packed minimum values +/// in `a` and `b`, and returns packed minimum values. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_min_pd) #[inline] @@ -246,7 +244,7 @@ pub fn _mm256_min_pd(a: __m256d, b: __m256d) -> __m256d { } /// Compares packed single-precision (32-bit) floating-point elements in `a` -/// and `b`, and returns packed minimum values +/// and `b`, and returns packed minimum values. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_min_ps) #[inline] @@ -270,8 +268,7 @@ pub const fn _mm256_mul_pd(a: __m256d, b: __m256d) -> __m256d { unsafe { simd_mul(a, b) } } -/// Multiplies packed single-precision (32-bit) floating-point elements in `a` and -/// `b`. +/// 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=_mm256_mul_ps) #[inline] @@ -374,8 +371,9 @@ pub const fn _mm256_div_pd(a: __m256d, b: __m256d) -> __m256d { } /// Rounds packed double-precision (64-bit) floating point elements in `a` -/// according to the flag `ROUNDING`. The value of `ROUNDING` may be as follows: +/// according to the flag `ROUNDING`. /// +/// The value of `ROUNDING` may be as follows: /// - `0x00`: Round to the nearest whole number. /// - `0x01`: Round down, toward negative infinity. /// - `0x02`: Round up, toward positive infinity. @@ -423,8 +421,9 @@ pub const fn _mm256_floor_pd(a: __m256d) -> __m256d { } /// Rounds packed single-precision (32-bit) floating point elements in `a` -/// according to the flag `ROUNDING`. The value of `ROUNDING` may be as follows: +/// according to the flag `ROUNDING`. /// +/// The value of `ROUNDING` may be as follows: /// - `0x00`: Round to the nearest whole number. /// - `0x01`: Round down, toward negative infinity. /// - `0x02`: Round up, toward positive infinity. @@ -587,9 +586,8 @@ pub const fn _mm256_blendv_ps(a: __m256, b: __m256, c: __m256) -> __m256 { } /// Conditionally multiplies the packed single-precision (32-bit) floating-point -/// elements in `a` and `b` using the high 4 bits in `imm8`, -/// sum the four products, and conditionally return the sum -/// using the low 4 bits of `imm8`. +/// elements in `a` and `b` using the high 4 bits in `imm8`, sums the four products, +/// and conditionally returns the sum using the low 4 bits of `imm8`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_dp_ps) #[inline] @@ -604,6 +602,7 @@ pub fn _mm256_dp_ps(a: __m256, b: __m256) -> __m256 { /// Horizontal addition of adjacent pairs in the two packed vectors /// of 4 64-bit floating points `a` and `b`. +/// /// In the result, sums of elements from `a` are returned in even locations, /// while sums of elements from `b` are returned in odd locations. /// @@ -623,6 +622,7 @@ pub const fn _mm256_hadd_pd(a: __m256d, b: __m256d) -> __m256d { /// Horizontal addition of adjacent pairs in the two packed vectors /// of 8 32-bit floating points `a` and `b`. +/// /// In the result, sums of elements from `a` are returned in locations of /// indices 0, 1, 4, 5; while sums of elements from `b` are locations /// 2, 3, 6, 7. @@ -643,6 +643,7 @@ pub const fn _mm256_hadd_ps(a: __m256, b: __m256) -> __m256 { /// Horizontal subtraction of adjacent pairs in the two packed vectors /// of 4 64-bit floating points `a` and `b`. +/// /// In the result, sums of elements from `a` are returned in even locations, /// while sums of elements from `b` are returned in odd locations. /// @@ -662,6 +663,7 @@ pub const fn _mm256_hsub_pd(a: __m256d, b: __m256d) -> __m256d { /// Horizontal subtraction of adjacent pairs in the two packed vectors /// of 8 32-bit floating points `a` and `b`. +/// /// In the result, sums of elements from `a` are returned in locations of /// indices 0, 1, 4, 5; while sums of elements from `b` are locations /// 2, 3, 6, 7. @@ -873,7 +875,7 @@ pub fn _mm256_cmp_ps(a: __m256, b: __m256) -> __m256 { /// Compares the lower double-precision (64-bit) floating-point element in /// `a` and `b` based on the comparison operand specified by `IMM5`, -/// store the result in the lower element of returned vector, +/// stores the result in the lower element of returned vector, /// and copies the upper element from `a` to the upper element of returned /// vector. /// @@ -890,7 +892,7 @@ pub fn _mm_cmp_sd(a: __m128d, b: __m128d) -> __m128d { /// Compares the lower single-precision (32-bit) floating-point element in /// `a` and `b` based on the comparison operand specified by `IMM5`, -/// store the result in the lower element of returned vector, +/// stores the result in the lower element of returned vector, /// and copies the upper 3 packed elements from `a` to the upper elements of /// returned vector. /// @@ -1535,6 +1537,7 @@ pub const fn _mm256_insert_epi32(a: __m256i, i: i32) -> __m256 /// Loads 256-bits (composed of 4 packed double-precision (64-bit) /// floating-point elements) from memory into result. +/// /// `mem_addr` must be aligned on a 32-byte boundary or a /// general-protection exception may be generated. /// @@ -1554,6 +1557,7 @@ pub const unsafe fn _mm256_load_pd(mem_addr: *const f64) -> __m256d { /// Stores 256-bits (composed of 4 packed double-precision (64-bit) /// floating-point elements) from `a` into memory. +/// /// `mem_addr` must be aligned on a 32-byte boundary or a /// general-protection exception may be generated. /// @@ -1573,6 +1577,7 @@ pub const unsafe fn _mm256_store_pd(mem_addr: *mut f64, a: __m256d) { /// Loads 256-bits (composed of 8 packed single-precision (32-bit) /// floating-point elements) from memory into result. +/// /// `mem_addr` must be aligned on a 32-byte boundary or a /// general-protection exception may be generated. /// @@ -1592,6 +1597,7 @@ pub const unsafe fn _mm256_load_ps(mem_addr: *const f32) -> __m256 { /// Stores 256-bits (composed of 8 packed single-precision (32-bit) /// floating-point elements) from `a` into memory. +/// /// `mem_addr` must be aligned on a 32-byte boundary or a /// general-protection exception may be generated. /// @@ -1611,6 +1617,7 @@ pub const unsafe fn _mm256_store_ps(mem_addr: *mut f32, a: __m256) { /// Loads 256-bits (composed of 4 packed double-precision (64-bit) /// floating-point elements) from memory into result. +/// /// `mem_addr` does not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_loadu_pd) @@ -1626,6 +1633,7 @@ pub const unsafe fn _mm256_loadu_pd(mem_addr: *const f64) -> __m256d { /// Stores 256-bits (composed of 4 packed double-precision (64-bit) /// floating-point elements) from `a` into memory. +/// /// `mem_addr` does not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_storeu_pd) @@ -1640,6 +1648,7 @@ pub const unsafe fn _mm256_storeu_pd(mem_addr: *mut f64, a: __m256d) { /// Loads 256-bits (composed of 8 packed single-precision (32-bit) /// floating-point elements) from memory into result. +/// /// `mem_addr` does not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_loadu_ps) @@ -1655,6 +1664,7 @@ pub const unsafe fn _mm256_loadu_ps(mem_addr: *const f32) -> __m256 { /// Stores 256-bits (composed of 8 packed single-precision (32-bit) /// floating-point elements) from `a` into memory. +/// /// `mem_addr` does not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_storeu_ps) @@ -1668,6 +1678,7 @@ pub const unsafe fn _mm256_storeu_ps(mem_addr: *mut f32, a: __m256) { } /// Loads 256-bits of integer data from memory into result. +/// /// `mem_addr` must be aligned on a 32-byte boundary or a /// general-protection exception may be generated. /// @@ -1702,6 +1713,7 @@ pub const unsafe fn _mm256_store_si256(mem_addr: *mut __m256i, a: __m256i) { } /// Loads 256-bits of integer data from memory into result. +/// /// `mem_addr` does not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_loadu_si256) @@ -1715,6 +1727,7 @@ pub const unsafe fn _mm256_loadu_si256(mem_addr: *const __m256i) -> __m256i { } /// Stores 256-bits of integer data from `a` into memory. +/// /// `mem_addr` does not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_storeu_si256) @@ -1843,7 +1856,7 @@ pub const unsafe fn _mm_maskstore_ps(mem_addr: *mut f32, mask: __m128i, a: __m12 simd_masked_store!(SimdAlign::Unaligned, mask, mem_addr, a) } -/// Duplicate odd-indexed single-precision (32-bit) floating-point elements +/// Duplicates odd-indexed single-precision (32-bit) floating-point elements /// from `a`, and returns the results. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_movehdup_ps) @@ -1856,7 +1869,7 @@ pub const fn _mm256_movehdup_ps(a: __m256) -> __m256 { unsafe { simd_shuffle!(a, a, [1, 1, 3, 3, 5, 5, 7, 7]) } } -/// Duplicate even-indexed single-precision (32-bit) floating-point elements +/// Duplicates even-indexed single-precision (32-bit) floating-point elements /// from `a`, and returns the results. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_moveldup_ps) @@ -1869,7 +1882,7 @@ pub const fn _mm256_moveldup_ps(a: __m256) -> __m256 { unsafe { simd_shuffle!(a, a, [0, 0, 2, 2, 4, 4, 6, 6]) } } -/// Duplicate even-indexed double-precision (64-bit) floating-point elements +/// Duplicates even-indexed double-precision (64-bit) floating-point elements /// from `a`, and returns the results. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_movedup_pd) @@ -1954,8 +1967,7 @@ pub unsafe fn _mm256_stream_pd(mem_addr: *mut f64, a: __m256d) { /// Moves single-precision floating point values from a 256-bit vector /// of `[8 x float]` to a 32-byte aligned memory location. To minimize -/// caching, the data is flagged as non-temporal (unlikely to be used again -/// soon). +/// caching, the data is flagged as non-temporal (unlikely to be used again soon). /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_stream_ps) /// @@ -1983,8 +1995,9 @@ pub unsafe fn _mm256_stream_ps(mem_addr: *mut f32, a: __m256) { } /// Computes the approximate reciprocal of packed single-precision (32-bit) -/// floating-point elements in `a`, and returns the results. The maximum -/// relative error for this approximation is less than 1.5*2^-12. +/// floating-point elements in `a`, and returns the results. +/// +/// The maximum relative error for this approximation is less than 1.5*2^-12. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_rcp_ps) #[inline] @@ -1997,6 +2010,7 @@ pub fn _mm256_rcp_ps(a: __m256) -> __m256 { /// Computes the approximate reciprocal square root of packed single-precision /// (32-bit) floating-point elements in `a`, and returns the results. +/// /// The maximum relative error for this approximation is less than 1.5*2^-12. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_rsqrt_ps) @@ -2061,9 +2075,9 @@ pub const fn _mm256_unpacklo_ps(a: __m256, b: __m256) -> __m256 { } /// Computes the bitwise AND of 256 bits (representing integer data) in `a` and -/// `b`, and set `ZF` to 1 if the result is zero, otherwise set `ZF` to 0. -/// Computes the bitwise NOT of `a` and then AND with `b`, and set `CF` to 1 if -/// the result is zero, otherwise set `CF` to 0. Return the `ZF` value. +/// `b`, and sets `ZF` to 1 if the result is zero, otherwise sets `ZF` to 0. +/// Computes the bitwise NOT of `a` and then AND with `b`, and sets `CF` to 1 if +/// the result is zero, otherwise sets `CF` to 0. Returns the `ZF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testz_si256) #[inline] @@ -2079,9 +2093,9 @@ pub const fn _mm256_testz_si256(a: __m256i, b: __m256i) -> i32 { } /// Computes the bitwise AND of 256 bits (representing integer data) in `a` and -/// `b`, and set `ZF` to 1 if the result is zero, otherwise set `ZF` to 0. -/// Computes the bitwise NOT of `a` and then AND with `b`, and set `CF` to 1 if -/// the result is zero, otherwise set `CF` to 0. Return the `CF` value. +/// `b`, and sets `ZF` to 1 if the result is zero, otherwise sets `ZF` to 0. +/// Computes the bitwise NOT of `a` and then AND with `b`, and sets `CF` to 1 if +/// the result is zero, otherwise sets `CF` to 0. Returns the `CF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testc_si256) #[inline] @@ -2097,10 +2111,10 @@ pub const fn _mm256_testc_si256(a: __m256i, b: __m256i) -> i32 { } /// Computes the bitwise AND of 256 bits (representing integer data) in `a` and -/// `b`, and set `ZF` to 1 if the result is zero, otherwise set `ZF` to 0. -/// Computes the bitwise NOT of `a` and then AND with `b`, and set `CF` to 1 if -/// the result is zero, otherwise set `CF` to 0. Return 1 if both the `ZF` and -/// `CF` values are zero, otherwise return 0. +/// `b`, and sets `ZF` to 1 if the result is zero, otherwise sets `ZF` to 0. +/// Computes the bitwise NOT of `a` and then AND with `b`, and sets `CF` to 1 if +/// the result is zero, otherwise sets `CF` to 0. Returns 1 if both the `ZF` and +/// `CF` values are zero, otherwise returns 0. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testnzc_si256) #[inline] @@ -2113,11 +2127,11 @@ pub fn _mm256_testnzc_si256(a: __m256i, b: __m256i) -> i32 { /// Computes the bitwise AND of 256 bits (representing double-precision (64-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 256-bit -/// value, and set `ZF` to 1 if the sign bit of each 64-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise -/// NOT of `a` and then AND with `b`, producing an intermediate value, and set +/// value, and sets `ZF` to 1 if the sign bit of each 64-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise +/// NOT of `a` and then AND with `b`, producing an intermediate value, and sets /// `CF` to 1 if the sign bit of each 64-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `ZF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `ZF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testz_pd) #[inline] @@ -2130,11 +2144,11 @@ pub fn _mm256_testz_pd(a: __m256d, b: __m256d) -> i32 { /// Computes the bitwise AND of 256 bits (representing double-precision (64-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 256-bit -/// value, and set `ZF` to 1 if the sign bit of each 64-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise -/// NOT of `a` and then AND with `b`, producing an intermediate value, and set +/// value, and sets `ZF` to 1 if the sign bit of each 64-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise +/// NOT of `a` and then AND with `b`, producing an intermediate value, and sets /// `CF` to 1 if the sign bit of each 64-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `CF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `CF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testc_pd) #[inline] @@ -2147,12 +2161,12 @@ pub fn _mm256_testc_pd(a: __m256d, b: __m256d) -> i32 { /// Computes the bitwise AND of 256 bits (representing double-precision (64-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 256-bit -/// value, and set `ZF` to 1 if the sign bit of each 64-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 64-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 64-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return 1 if both the `ZF` and `CF` values -/// are zero, otherwise return 0. +/// is zero, otherwise sets `CF` to 0. Returns 1 if both the `ZF` and `CF` values +/// are zero, otherwise returns 0. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testnzc_pd) #[inline] @@ -2165,11 +2179,11 @@ pub fn _mm256_testnzc_pd(a: __m256d, b: __m256d) -> i32 { /// Computes the bitwise AND of 128 bits (representing double-precision (64-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 128-bit -/// value, and set `ZF` to 1 if the sign bit of each 64-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 64-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 64-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `ZF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `ZF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_testz_pd) #[inline] @@ -2186,11 +2200,11 @@ pub const fn _mm_testz_pd(a: __m128d, b: __m128d) -> i32 { /// Computes the bitwise AND of 128 bits (representing double-precision (64-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 128-bit -/// value, and set `ZF` to 1 if the sign bit of each 64-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 64-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 64-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `CF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `CF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_testc_pd) #[inline] @@ -2207,12 +2221,12 @@ pub const fn _mm_testc_pd(a: __m128d, b: __m128d) -> i32 { /// Computes the bitwise AND of 128 bits (representing double-precision (64-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 128-bit -/// value, and set `ZF` to 1 if the sign bit of each 64-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 64-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 64-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return 1 if both the `ZF` and `CF` values -/// are zero, otherwise return 0. +/// is zero, otherwise sets `CF` to 0. Returns 1 if both the `ZF` and `CF` values +/// are zero, otherwise returns 0. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_testnzc_pd) #[inline] @@ -2225,11 +2239,11 @@ pub fn _mm_testnzc_pd(a: __m128d, b: __m128d) -> i32 { /// Computes the bitwise AND of 256 bits (representing single-precision (32-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 256-bit -/// value, and set `ZF` to 1 if the sign bit of each 32-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 32-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 32-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `ZF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `ZF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testz_ps) #[inline] @@ -2242,11 +2256,11 @@ pub fn _mm256_testz_ps(a: __m256, b: __m256) -> i32 { /// Computes the bitwise AND of 256 bits (representing single-precision (32-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 256-bit -/// value, and set `ZF` to 1 if the sign bit of each 32-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 32-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 32-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `CF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `CF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testc_ps) #[inline] @@ -2259,12 +2273,12 @@ pub fn _mm256_testc_ps(a: __m256, b: __m256) -> i32 { /// Computes the bitwise AND of 256 bits (representing single-precision (32-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 256-bit -/// value, and set `ZF` to 1 if the sign bit of each 32-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 32-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 32-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return 1 if both the `ZF` and `CF` values -/// are zero, otherwise return 0. +/// is zero, otherwise sets `CF` to 0. Returns 1 if both the `ZF` and `CF` values +/// are zero, otherwise returns 0. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_testnzc_ps) #[inline] @@ -2277,11 +2291,11 @@ pub fn _mm256_testnzc_ps(a: __m256, b: __m256) -> i32 { /// Computes the bitwise AND of 128 bits (representing single-precision (32-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 128-bit -/// value, and set `ZF` to 1 if the sign bit of each 32-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 32-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 32-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `ZF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `ZF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_testz_ps) #[inline] @@ -2298,11 +2312,11 @@ pub const fn _mm_testz_ps(a: __m128, b: __m128) -> i32 { /// Computes the bitwise AND of 128 bits (representing single-precision (32-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 128-bit -/// value, and set `ZF` to 1 if the sign bit of each 32-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 32-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 32-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return the `CF` value. +/// is zero, otherwise sets `CF` to 0. Returns the `CF` value. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_testc_ps) #[inline] @@ -2319,12 +2333,12 @@ pub const fn _mm_testc_ps(a: __m128, b: __m128) -> i32 { /// Computes the bitwise AND of 128 bits (representing single-precision (32-bit) /// floating-point elements) in `a` and `b`, producing an intermediate 128-bit -/// value, and set `ZF` to 1 if the sign bit of each 32-bit element in the -/// intermediate value is zero, otherwise set `ZF` to 0. Compute the bitwise +/// value, and sets `ZF` to 1 if the sign bit of each 32-bit element in the +/// intermediate value is zero, otherwise sets `ZF` to 0. Computes the bitwise /// NOT of `a` and then AND with `b`, producing an intermediate value, and set /// `CF` to 1 if the sign bit of each 32-bit element in the intermediate value -/// is zero, otherwise set `CF` to 0. Return 1 if both the `ZF` and `CF` values -/// are zero, otherwise return 0. +/// is zero, otherwise sets `CF` to 0. Returns 1 if both the `ZF` and `CF` values +/// are zero, otherwise returns 0. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_testnzc_ps) #[inline] @@ -2336,8 +2350,7 @@ pub fn _mm_testnzc_ps(a: __m128, b: __m128) -> i32 { } /// Sets each bit of the returned mask based on the most significant bit of the -/// corresponding packed double-precision (64-bit) floating-point element in -/// `a`. +/// corresponding packed double-precision (64-bit) floating-point element in `a`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_movemask_pd) #[inline] @@ -2355,8 +2368,7 @@ pub const fn _mm256_movemask_pd(a: __m256d) -> i32 { } /// Sets each bit of the returned mask based on the most significant bit of the -/// corresponding packed single-precision (32-bit) floating-point element in -/// `a`. +/// corresponding packed single-precision (32-bit) floating-point element in `a`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_movemask_ps) #[inline] @@ -3038,6 +3050,7 @@ pub const fn _mm256_zextpd128_pd256(a: __m128d) -> __m256d { } /// Returns vector of type `__m256` with indeterminate elements. +/// /// Despite using the word "undefined" (following Intel's naming scheme), this non-deterministically /// picks some valid value and is not equivalent to [`mem::MaybeUninit`]. /// In practice, this is typically equivalent to [`mem::zeroed`]. @@ -3053,6 +3066,7 @@ pub const fn _mm256_undefined_ps() -> __m256 { } /// Returns vector of type `__m256d` with indeterminate elements. +/// /// Despite using the word "undefined" (following Intel's naming scheme), this non-deterministically /// picks some valid value and is not equivalent to [`mem::MaybeUninit`]. /// In practice, this is typically equivalent to [`mem::zeroed`]. @@ -3068,6 +3082,7 @@ pub const fn _mm256_undefined_pd() -> __m256d { } /// Returns vector of type __m256i with with indeterminate elements. +/// /// Despite using the word "undefined" (following Intel's naming scheme), this non-deterministically /// picks some valid value and is not equivalent to [`mem::MaybeUninit`]. /// In practice, this is typically equivalent to [`mem::zeroed`]. @@ -3163,8 +3178,8 @@ pub const fn _mm256_setr_m128i(lo: __m128i, hi: __m128i) -> __m256i { } /// Loads two 128-bit values (composed of 4 packed single-precision (32-bit) -/// floating-point elements) from memory, and combine them into a 256-bit -/// value. +/// floating-point elements) from memory, and combines them into a 256-bit value. +/// /// `hiaddr` and `loaddr` do not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_loadu2_m128) @@ -3179,8 +3194,8 @@ pub const unsafe fn _mm256_loadu2_m128(hiaddr: *const f32, loaddr: *const f32) - } /// Loads two 128-bit values (composed of 2 packed double-precision (64-bit) -/// floating-point elements) from memory, and combine them into a 256-bit -/// value. +/// floating-point elements) from memory, and combines them into a 256-bit value. +/// /// `hiaddr` and `loaddr` do not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_loadu2_m128d) @@ -3212,6 +3227,7 @@ pub const unsafe fn _mm256_loadu2_m128i(hiaddr: *const __m128i, loaddr: *const _ /// Stores the high and low 128-bit halves (each composed of 4 packed /// single-precision (32-bit) floating-point elements) from `a` into memory two /// different 128-bit locations. +/// /// `hiaddr` and `loaddr` do not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_storeu2_m128) @@ -3230,6 +3246,7 @@ pub const unsafe fn _mm256_storeu2_m128(hiaddr: *mut f32, loaddr: *mut f32, a: _ /// Stores the high and low 128-bit halves (each composed of 2 packed /// double-precision (64-bit) floating-point elements) from `a` into memory two /// different 128-bit locations. +/// /// `hiaddr` and `loaddr` do not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_storeu2_m128d) @@ -3247,6 +3264,7 @@ pub const unsafe fn _mm256_storeu2_m128d(hiaddr: *mut f64, loaddr: *mut f64, a: /// Stores the high and low 128-bit halves (each composed of integer data) from /// `a` into memory two different 128-bit locations. +/// /// `hiaddr` and `loaddr` do not need to be aligned on any particular boundary. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_storeu2_m128i) diff --git a/crates/core_arch/src/x86/avx2.rs b/crates/core_arch/src/x86/avx2.rs index 2a94cef521..26ac323587 100644 --- a/crates/core_arch/src/x86/avx2.rs +++ b/crates/core_arch/src/x86/avx2.rs @@ -735,7 +735,7 @@ pub const fn _mm256_cmpgt_epi8(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute::(simd_gt(a.as_i8x32(), b.as_i8x32())) } } -/// Sign-extend 16-bit integers to 32-bit integers. +/// Sign-extends 16-bit integers to 32-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepi16_epi32) #[inline] @@ -747,7 +747,7 @@ pub const fn _mm256_cvtepi16_epi32(a: __m128i) -> __m256i { unsafe { transmute::(simd_cast(a.as_i16x8())) } } -/// Sign-extend 16-bit integers to 64-bit integers. +/// Sign-extends 16-bit integers to 64-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepi16_epi64) #[inline] @@ -763,7 +763,7 @@ pub const fn _mm256_cvtepi16_epi64(a: __m128i) -> __m256i { } } -/// Sign-extend 32-bit integers to 64-bit integers. +/// Sign-extends 32-bit integers to 64-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepi32_epi64) #[inline] @@ -775,7 +775,7 @@ pub const fn _mm256_cvtepi32_epi64(a: __m128i) -> __m256i { unsafe { transmute::(simd_cast(a.as_i32x4())) } } -/// Sign-extend 8-bit integers to 16-bit integers. +/// Sign-extends 8-bit integers to 16-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepi8_epi16) #[inline] @@ -787,7 +787,7 @@ pub const fn _mm256_cvtepi8_epi16(a: __m128i) -> __m256i { unsafe { transmute::(simd_cast(a.as_i8x16())) } } -/// Sign-extend 8-bit integers to 32-bit integers. +/// Sign-extends 8-bit integers to 32-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepi8_epi32) #[inline] @@ -803,7 +803,7 @@ pub const fn _mm256_cvtepi8_epi32(a: __m128i) -> __m256i { } } -/// Sign-extend 8-bit integers to 64-bit integers. +/// Sign-extends 8-bit integers to 64-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepi8_epi64) #[inline] @@ -819,7 +819,7 @@ pub const fn _mm256_cvtepi8_epi64(a: __m128i) -> __m256i { } } -/// Zeroes extend packed unsigned 16-bit integers in `a` to packed 32-bit +/// Zero-extends packed unsigned 16-bit integers in `a` to packed 32-bit /// integers, and stores the results in `dst`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepu16_epi32) @@ -832,7 +832,7 @@ pub const fn _mm256_cvtepu16_epi32(a: __m128i) -> __m256i { unsafe { transmute::(simd_cast(a.as_u16x8())) } } -/// Zero-extend the lower four unsigned 16-bit integers in `a` to 64-bit +/// Zero-extends the lower four unsigned 16-bit integers in `a` to 64-bit /// integers. The upper four elements of `a` are unused. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepu16_epi64) @@ -849,7 +849,7 @@ pub const fn _mm256_cvtepu16_epi64(a: __m128i) -> __m256i { } } -/// Zero-extend unsigned 32-bit integers in `a` to 64-bit integers. +/// Zero-extends unsigned 32-bit integers in `a` to 64-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepu32_epi64) #[inline] @@ -861,7 +861,7 @@ pub const fn _mm256_cvtepu32_epi64(a: __m128i) -> __m256i { unsafe { transmute::(simd_cast(a.as_u32x4())) } } -/// Zero-extend unsigned 8-bit integers in `a` to 16-bit integers. +/// Zero-extends unsigned 8-bit integers in `a` to 16-bit integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepu8_epi16) #[inline] @@ -873,7 +873,7 @@ pub const fn _mm256_cvtepu8_epi16(a: __m128i) -> __m256i { unsafe { transmute::(simd_cast(a.as_u8x16())) } } -/// Zero-extend the lower eight unsigned 8-bit integers in `a` to 32-bit +/// Zero-extends the lower eight unsigned 8-bit integers in `a` to 32-bit /// integers. The upper eight elements of `a` are unused. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepu8_epi32) @@ -890,7 +890,7 @@ pub const fn _mm256_cvtepu8_epi32(a: __m128i) -> __m256i { } } -/// Zero-extend the lower four unsigned 8-bit integers in `a` to 64-bit +/// Zero-extends the lower four unsigned 8-bit integers in `a` to 64-bit /// integers. The upper twelve elements of `a` are unused. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cvtepu8_epi64) @@ -1022,7 +1022,7 @@ pub const fn _mm256_hsub_epi16(a: __m256i, b: __m256i) -> __m256i { } } -/// Horizontally subtract adjacent pairs of 32-bit integers in `a` and `b`. +/// Horizontally subtracts adjacent pairs of 32-bit integers in `a` and `b`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_hsub_epi32) #[inline] @@ -1040,7 +1040,7 @@ pub const fn _mm256_hsub_epi32(a: __m256i, b: __m256i) -> __m256i { } } -/// Horizontally subtract adjacent pairs of 16-bit integers in `a` and `b` +/// Horizontally subtracts adjacent pairs of 16-bit integers in `a` and `b` /// using saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_hsubs_epi16) @@ -1067,8 +1067,7 @@ pub fn _mm256_hsubs_epi16(a: __m256i, b: __m256i) -> __m256i { } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i32gather_epi32) #[inline] @@ -1089,8 +1088,7 @@ pub unsafe fn _mm_i32gather_epi32( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1116,8 +1114,7 @@ pub unsafe fn _mm_mask_i32gather_epi32( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i32gather_epi32) #[inline] @@ -1138,8 +1135,7 @@ pub unsafe fn _mm256_i32gather_epi32( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1165,8 +1161,7 @@ pub unsafe fn _mm256_mask_i32gather_epi32( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i32gather_ps) #[inline] @@ -1183,8 +1178,7 @@ pub unsafe fn _mm_i32gather_ps(slice: *const f32, offsets: __m pgatherdps(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1207,8 +1201,7 @@ pub unsafe fn _mm_mask_i32gather_ps( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i32gather_ps) #[inline] @@ -1225,8 +1218,7 @@ pub unsafe fn _mm256_i32gather_ps(slice: *const f32, offsets: vpgatherdps(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1249,8 +1241,7 @@ pub unsafe fn _mm256_mask_i32gather_ps( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i32gather_epi64) #[inline] @@ -1271,8 +1262,7 @@ pub unsafe fn _mm_i32gather_epi64( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1298,8 +1288,7 @@ pub unsafe fn _mm_mask_i32gather_epi64( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i32gather_epi64) #[inline] @@ -1320,8 +1309,7 @@ pub unsafe fn _mm256_i32gather_epi64( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1347,8 +1335,7 @@ pub unsafe fn _mm256_mask_i32gather_epi64( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i32gather_pd) #[inline] @@ -1365,8 +1352,7 @@ pub unsafe fn _mm_i32gather_pd(slice: *const f64, offsets: __m pgatherdpd(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1389,8 +1375,7 @@ pub unsafe fn _mm_mask_i32gather_pd( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i32gather_pd) #[inline] @@ -1410,8 +1395,7 @@ pub unsafe fn _mm256_i32gather_pd( vpgatherdpd(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1434,8 +1418,7 @@ pub unsafe fn _mm256_mask_i32gather_pd( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i64gather_epi32) #[inline] @@ -1456,8 +1439,7 @@ pub unsafe fn _mm_i64gather_epi32( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1483,8 +1465,7 @@ pub unsafe fn _mm_mask_i64gather_epi32( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i64gather_epi32) #[inline] @@ -1505,8 +1486,7 @@ pub unsafe fn _mm256_i64gather_epi32( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1532,8 +1512,7 @@ pub unsafe fn _mm256_mask_i64gather_epi32( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i64gather_ps) #[inline] @@ -1550,8 +1529,7 @@ pub unsafe fn _mm_i64gather_ps(slice: *const f32, offsets: __m pgatherqps(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1574,8 +1552,7 @@ pub unsafe fn _mm_mask_i64gather_ps( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i64gather_ps) #[inline] @@ -1592,8 +1569,7 @@ pub unsafe fn _mm256_i64gather_ps(slice: *const f32, offsets: vpgatherqps(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1616,8 +1592,7 @@ pub unsafe fn _mm256_mask_i64gather_ps( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i64gather_epi64) #[inline] @@ -1638,8 +1613,7 @@ pub unsafe fn _mm_i64gather_epi64( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1665,8 +1639,7 @@ pub unsafe fn _mm_mask_i64gather_epi64( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i64gather_epi64) #[inline] @@ -1687,8 +1660,7 @@ pub unsafe fn _mm256_i64gather_epi64( transmute(r) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1714,8 +1686,7 @@ pub unsafe fn _mm256_mask_i64gather_epi64( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_i64gather_pd) #[inline] @@ -1732,8 +1703,7 @@ pub unsafe fn _mm_i64gather_pd(slice: *const f64, offsets: __m pgatherqpd(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -1756,8 +1726,7 @@ pub unsafe fn _mm_mask_i64gather_pd( } /// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where -/// `scale` should be 1, 2, 4 or 8. +/// where `scale` should be 1, 2, 4 or 8. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_i64gather_pd) #[inline] @@ -1777,8 +1746,7 @@ pub unsafe fn _mm256_i64gather_pd( vpgatherqpd(zero, slice, offsets, neg_one, SCALE as i8) } -/// Returns values from `slice` at offsets determined by `offsets * scale`, -/// where +/// Returns values from `slice` at offsets determined by `offsets * scale`, where /// `scale` should be 1, 2, 4 or 8. If mask is set, load the value from `src` in /// that position instead. /// @@ -2172,7 +2140,7 @@ pub fn _mm256_mpsadbw_epu8(a: __m256i, b: __m256i) -> __m256i { } /// Multiplies the low 32-bit integers from each packed 64-bit element in -/// `a` and `b` +/// `a` and `b`. /// /// Returns the 64-bit results. /// @@ -2191,7 +2159,7 @@ pub const fn _mm256_mul_epi32(a: __m256i, b: __m256i) -> __m256i { } /// Multiplies the low unsigned 32-bit integers from each packed 64-bit -/// element in `a` and `b` +/// element in `a` and `b`. /// /// Returns the unsigned 64-bit results. /// @@ -2238,7 +2206,7 @@ pub fn _mm256_mulhi_epu16(a: __m256i, b: __m256i) -> __m256i { /// Multiplies the packed 16-bit integers in `a` and `b`, producing /// intermediate 32-bit integers, and returns the low 16 bits of the -/// intermediate integers +/// intermediate integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_mullo_epi16) #[inline] @@ -2252,7 +2220,7 @@ pub const fn _mm256_mullo_epi16(a: __m256i, b: __m256i) -> __m256i { /// Multiplies the packed 32-bit integers in `a` and `b`, producing /// intermediate 64-bit integers, and returns the low 32 bits of the -/// intermediate integers +/// intermediate integers. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_mullo_epi32) #[inline] @@ -2265,9 +2233,9 @@ pub const fn _mm256_mullo_epi32(a: __m256i, b: __m256i) -> __m256i { } /// Multiplies packed 16-bit integers in `a` and `b`, producing -/// intermediate signed 32-bit integers. Truncate each intermediate -/// integer to the 18 most significant bits, round by adding 1, and -/// return bits `[16:1]`. +/// intermediate signed 32-bit integers. Truncates each intermediate +/// integer to the 18 most significant bits, rounds by adding 1, and +/// returns bits `[16:1]`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_mulhrs_epi16) #[inline] @@ -2278,8 +2246,7 @@ pub fn _mm256_mulhrs_epi16(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(pmulhrsw(a.as_i16x16(), b.as_i16x16())) } } -/// Computes the bitwise OR of 256 bits (representing integer data) in `a` -/// and `b` +/// Computes the bitwise OR of 256 bits (representing integer data) in `a` and `b`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_or_si256) #[inline] @@ -2292,7 +2259,7 @@ pub const fn _mm256_or_si256(a: __m256i, b: __m256i) -> __m256i { } /// Converts packed 16-bit integers from `a` and `b` to packed 8-bit integers -/// using signed saturation +/// using signed saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_packs_epi16) #[inline] @@ -2304,7 +2271,7 @@ pub fn _mm256_packs_epi16(a: __m256i, b: __m256i) -> __m256i { } /// Converts packed 32-bit integers from `a` and `b` to packed 16-bit integers -/// using signed saturation +/// using signed saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_packs_epi32) #[inline] @@ -2316,7 +2283,7 @@ pub fn _mm256_packs_epi32(a: __m256i, b: __m256i) -> __m256i { } /// Converts packed 16-bit integers from `a` and `b` to packed 8-bit integers -/// using unsigned saturation +/// using unsigned saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_packus_epi16) #[inline] @@ -2328,7 +2295,7 @@ pub fn _mm256_packus_epi16(a: __m256i, b: __m256i) -> __m256i { } /// Converts packed 32-bit integers from `a` and `b` to packed 16-bit integers -/// using unsigned saturation +/// using unsigned saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_packus_epi32) #[inline] @@ -2484,8 +2451,7 @@ pub fn _mm256_shuffle_epi8(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(pshufb(a.as_u8x32(), b.as_u8x32())) } } -/// Shuffles 32-bit integers in 128-bit lanes of `a` using the control in -/// `imm8`. +/// Shuffles 32-bit integers in 128-bit lanes of `a` using the control in `imm8`. /// /// ```rust /// #[cfg(target_arch = "x86")] @@ -2663,7 +2629,7 @@ pub fn _mm256_sign_epi8(a: __m256i, b: __m256i) -> __m256i { } /// Shifts packed 16-bit integers in `a` left by `count` while -/// shifting in zeros, and returns the result +/// shifting in zeros, and returns the result. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_sll_epi16) #[inline] @@ -2675,7 +2641,7 @@ pub fn _mm256_sll_epi16(a: __m256i, count: __m128i) -> __m256i { } /// Shifts packed 32-bit integers in `a` left by `count` while -/// shifting in zeros, and returns the result +/// shifting in zeros, and returns the result. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_sll_epi32) #[inline] @@ -2687,7 +2653,7 @@ pub fn _mm256_sll_epi32(a: __m256i, count: __m128i) -> __m256i { } /// Shifts packed 64-bit integers in `a` left by `count` while -/// shifting in zeros, and returns the result +/// shifting in zeros, and returns the result. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_sll_epi64) #[inline] @@ -2699,7 +2665,7 @@ pub fn _mm256_sll_epi64(a: __m256i, count: __m128i) -> __m256i { } /// Shifts packed 16-bit integers in `a` left by `IMM8` while -/// shifting in zeros, return the results; +/// shifting in zeros, and returns the results. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_slli_epi16) #[inline] @@ -2720,7 +2686,7 @@ pub const fn _mm256_slli_epi16(a: __m256i) -> __m256i { } /// Shifts packed 32-bit integers in `a` left by `IMM8` while -/// shifting in zeros, return the results; +/// shifting in zeros and returns the results. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_slli_epi32) #[inline] @@ -2741,7 +2707,7 @@ pub const fn _mm256_slli_epi32(a: __m256i) -> __m256i { } /// Shifts packed 64-bit integers in `a` left by `IMM8` while -/// shifting in zeros, return the results; +/// shifting in zeros and returns the results. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_slli_epi64) #[inline] @@ -3045,8 +3011,7 @@ pub const fn _mm256_bsrli_epi128(a: __m256i) -> __m256i { } } -/// Shifts packed 16-bit integers in `a` right by `count` while shifting in -/// zeros. +/// Shifts packed 16-bit integers in `a` right by `count` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srl_epi16) #[inline] @@ -3057,8 +3022,7 @@ pub fn _mm256_srl_epi16(a: __m256i, count: __m128i) -> __m256i { unsafe { transmute(psrlw(a.as_i16x16(), count.as_i16x8())) } } -/// Shifts packed 32-bit integers in `a` right by `count` while shifting in -/// zeros. +/// Shifts packed 32-bit integers in `a` right by `count` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srl_epi32) #[inline] @@ -3069,8 +3033,7 @@ pub fn _mm256_srl_epi32(a: __m256i, count: __m128i) -> __m256i { unsafe { transmute(psrld(a.as_i32x8(), count.as_i32x4())) } } -/// Shifts packed 64-bit integers in `a` right by `count` while shifting in -/// zeros. +/// Shifts packed 64-bit integers in `a` right by `count` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srl_epi64) #[inline] @@ -3081,8 +3044,8 @@ pub fn _mm256_srl_epi64(a: __m256i, count: __m128i) -> __m256i { unsafe { transmute(psrlq(a.as_i64x4(), count.as_i64x2())) } } -/// Shifts packed 16-bit integers in `a` right by `IMM8` while shifting in -/// zeros +// nobody will notice this comment +/// Shifts packed 16-bit integers in `a` right by `IMM8` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srli_epi16) #[inline] @@ -3102,8 +3065,7 @@ pub const fn _mm256_srli_epi16(a: __m256i) -> __m256i { } } -/// Shifts packed 32-bit integers in `a` right by `IMM8` while shifting in -/// zeros +/// Shifts packed 32-bit integers in `a` right by `IMM8` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srli_epi32) #[inline] @@ -3123,8 +3085,7 @@ pub const fn _mm256_srli_epi32(a: __m256i) -> __m256i { } } -/// Shifts packed 64-bit integers in `a` right by `IMM8` while shifting in -/// zeros +/// Shifts packed 64-bit integers in `a` right by `IMM8` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srli_epi64) #[inline] @@ -3145,7 +3106,7 @@ pub const fn _mm256_srli_epi64(a: __m256i) -> __m256i { } /// Shifts packed 32-bit integers in `a` right by the amount specified by -/// the corresponding element in `count` while shifting in zeros, +/// the corresponding element in `count` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_srlv_epi32) #[inline] @@ -3157,7 +3118,7 @@ pub fn _mm_srlv_epi32(a: __m128i, count: __m128i) -> __m128i { } /// Shifts packed 32-bit integers in `a` right by the amount specified by -/// the corresponding element in `count` while shifting in zeros, +/// the corresponding element in `count` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srlv_epi32) #[inline] @@ -3169,7 +3130,7 @@ pub fn _mm256_srlv_epi32(a: __m256i, count: __m256i) -> __m256i { } /// Shifts packed 64-bit integers in `a` right by the amount specified by -/// the corresponding element in `count` while shifting in zeros, +/// the corresponding element in `count` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_srlv_epi64) #[inline] @@ -3181,7 +3142,7 @@ pub fn _mm_srlv_epi64(a: __m128i, count: __m128i) -> __m128i { } /// Shifts packed 64-bit integers in `a` right by the amount specified by -/// the corresponding element in `count` while shifting in zeros, +/// the corresponding element in `count` while shifting in zeros. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_srlv_epi64) #[inline] @@ -3192,9 +3153,10 @@ pub fn _mm256_srlv_epi64(a: __m256i, count: __m256i) -> __m256i { unsafe { transmute(psrlvq256(a.as_i64x4(), count.as_i64x4())) } } -/// Load 256-bits of integer data from memory into dst using a non-temporal memory hint. mem_addr -/// must be aligned on a 32-byte boundary or a general-protection exception may be generated. To -/// minimize caching, the data is flagged as non-temporal (unlikely to be used again soon) +/// Loads 256-bits of integer data from memory into dst using a non-temporal memory hint. +/// +/// `mem_addr` must be aligned on a 32-byte boundary or a general-protection exception may be generated. +/// To minimize caching, the data is flagged as non-temporal (unlikely to be used again soon). /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_stream_load_si256) #[inline] @@ -3212,7 +3174,7 @@ pub unsafe fn _mm256_stream_load_si256(mem_addr: *const __m256i) -> __m256i { dst } -/// Subtract packed 16-bit integers in `b` from packed 16-bit integers in `a` +/// Subtracts packed 16-bit integers in `b` from packed 16-bit integers in `a`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_sub_epi16) #[inline] @@ -3224,7 +3186,7 @@ pub const fn _mm256_sub_epi16(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(simd_sub(a.as_i16x16(), b.as_i16x16())) } } -/// Subtract packed 32-bit integers in `b` from packed 32-bit integers in `a` +/// Subtracts packed 32-bit integers in `b` from packed 32-bit integers in `a`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_sub_epi32) #[inline] @@ -3236,7 +3198,7 @@ pub const fn _mm256_sub_epi32(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(simd_sub(a.as_i32x8(), b.as_i32x8())) } } -/// Subtract packed 64-bit integers in `b` from packed 64-bit integers in `a` +/// Subtracts packed 64-bit integers in `b` from packed 64-bit integers in `a`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_sub_epi64) #[inline] @@ -3248,7 +3210,7 @@ pub const fn _mm256_sub_epi64(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(simd_sub(a.as_i64x4(), b.as_i64x4())) } } -/// Subtract packed 8-bit integers in `b` from packed 8-bit integers in `a` +/// Subtracts packed 8-bit integers in `b` from packed 8-bit integers in `a`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_sub_epi8) #[inline] @@ -3260,7 +3222,7 @@ pub const fn _mm256_sub_epi8(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(simd_sub(a.as_i8x32(), b.as_i8x32())) } } -/// Subtract packed 16-bit integers in `b` from packed 16-bit integers in +/// Subtracts packed 16-bit integers in `b` from packed 16-bit integers in /// `a` using saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_subs_epi16) @@ -3273,7 +3235,7 @@ pub const fn _mm256_subs_epi16(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(simd_saturating_sub(a.as_i16x16(), b.as_i16x16())) } } -/// Subtract packed 8-bit integers in `b` from packed 8-bit integers in +/// Subtracts packed 8-bit integers in `b` from packed 8-bit integers in /// `a` using saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_subs_epi8) @@ -3286,7 +3248,7 @@ pub const fn _mm256_subs_epi8(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(simd_saturating_sub(a.as_i8x32(), b.as_i8x32())) } } -/// Subtract packed unsigned 16-bit integers in `b` from packed 16-bit +/// Subtracts packed unsigned 16-bit integers in `b` from packed 16-bit /// integers in `a` using saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_subs_epu16) @@ -3299,7 +3261,7 @@ pub const fn _mm256_subs_epu16(a: __m256i, b: __m256i) -> __m256i { unsafe { transmute(simd_saturating_sub(a.as_u16x16(), b.as_u16x16())) } } -/// Subtract packed unsigned 8-bit integers in `b` from packed 8-bit +/// Subtracts packed unsigned 8-bit integers in `b` from packed 8-bit /// integers in `a` using saturation. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_subs_epu8) @@ -3687,7 +3649,7 @@ pub const fn _mm256_unpacklo_epi64(a: __m256i, b: __m256i) -> __m256i { } /// Computes the bitwise XOR of 256 bits (representing integer data) -/// in `a` and `b` +/// in `a` and `b`. /// /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_xor_si256) #[inline] diff --git a/crates/core_arch/src/x86/avx512bf16.rs b/crates/core_arch/src/x86/avx512bf16.rs index 0290ca0a94..e2f62f383e 100644 --- a/crates/core_arch/src/x86/avx512bf16.rs +++ b/crates/core_arch/src/x86/avx512bf16.rs @@ -30,7 +30,7 @@ unsafe extern "llvm-intrinsic" { fn dpbf16ps_512(a: f32x16, b: i16x32, c: i16x32) -> f32x16; } -/// Convert packed single-precision (32-bit) floating-point elements in two 128-bit vectors +/// Converts packed single-precision (32-bit) floating-point elements in two 128-bit vectors /// a and b to packed BF16 (16-bit) floating-point elements, and store the results in a /// 128-bit wide vector. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651&avx512techs=AVX512_BF16&text=_mm_cvtne2ps_pbh) @@ -42,7 +42,7 @@ pub fn _mm_cvtne2ps_pbh(a: __m128, b: __m128) -> __m128bh { unsafe { transmute(cvtne2ps2bf16(a.as_f32x4(), b.as_f32x4())) } } -/// Convert packed single-precision (32-bit) floating-point elements in two vectors +/// Converts packed single-precision (32-bit) floating-point elements in two vectors /// a and b to packed BF16 (16-bit) floating-point elements, and store the results /// in single vector dst using writemask k (elements are copied from src when the /// corresponding mask bit is not set). @@ -58,7 +58,7 @@ pub fn _mm_mask_cvtne2ps_pbh(src: __m128bh, k: __mmask8, a: __m128, b: __m128) - } } -/// Convert packed single-precision (32-bit) floating-point elements in two vectors +/// Converts packed single-precision (32-bit) floating-point elements in two vectors /// a and b to packed BF16 (16-bit) floating-point elements, and store the results /// in single vector dst using zeromask k (elements are zeroed out when the corresponding /// mask bit is not set). @@ -74,7 +74,7 @@ pub fn _mm_maskz_cvtne2ps_pbh(k: __mmask8, a: __m128, b: __m128) -> __m128bh { } } -/// Convert packed single-precision (32-bit) floating-point elements in two 256-bit vectors +/// Converts packed single-precision (32-bit) floating-point elements in two 256-bit vectors /// a and b to packed BF16 (16-bit) floating-point elements, and store the results in a /// 256-bit wide vector. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654&avx512techs=AVX512_BF16&text=_mm256_cvtne2ps_pbh) @@ -86,7 +86,7 @@ pub fn _mm256_cvtne2ps_pbh(a: __m256, b: __m256) -> __m256bh { unsafe { transmute(cvtne2ps2bf16_256(a.as_f32x8(), b.as_f32x8())) } } -/// Convert packed single-precision (32-bit) floating-point elements in two vectors a and b +/// Converts packed single-precision (32-bit) floating-point elements in two vectors a and b /// to packed BF16 (16-bit) floating-point elements and store the results in single vector /// dst using writemask k (elements are copied from src when the corresponding mask bit is not set). /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654&avx512techs=AVX512_BF16&text=_mm256_mask_cvtne2ps_pbh) @@ -101,7 +101,7 @@ pub fn _mm256_mask_cvtne2ps_pbh(src: __m256bh, k: __mmask16, a: __m256, b: __m25 } } -/// Convert packed single-precision (32-bit) floating-point elements in two vectors a and b +/// Converts packed single-precision (32-bit) floating-point elements in two vectors a and b /// to packed BF16 (16-bit) floating-point elements, and store the results in single vector /// dst using zeromask k (elements are zeroed out when the corresponding mask bit is not set). /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654&avx512techs=AVX512_BF16&text=_mm256_maskz_cvtne2ps_pbh) @@ -116,7 +116,7 @@ pub fn _mm256_maskz_cvtne2ps_pbh(k: __mmask16, a: __m256, b: __m256) -> __m256bh } } -/// Convert packed single-precision (32-bit) floating-point elements in two 512-bit vectors +/// Converts packed single-precision (32-bit) floating-point elements in two 512-bit vectors /// a and b to packed BF16 (16-bit) floating-point elements, and store the results in a /// 512-bit wide vector. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657&avx512techs=AVX512_BF16&text=_mm512_cvtne2ps_pbh) @@ -128,7 +128,7 @@ pub fn _mm512_cvtne2ps_pbh(a: __m512, b: __m512) -> __m512bh { unsafe { transmute(cvtne2ps2bf16_512(a.as_f32x16(), b.as_f32x16())) } } -/// Convert packed single-precision (32-bit) floating-point elements in two vectors +/// Converts packed single-precision (32-bit) floating-point elements in two vectors /// a and b to packed BF16 (16-bit) floating-point elements, and store the results /// in single vector dst using writemask k (elements are copied from src when the /// corresponding mask bit is not set). @@ -144,7 +144,7 @@ pub fn _mm512_mask_cvtne2ps_pbh(src: __m512bh, k: __mmask32, a: __m512, b: __m51 } } -/// Convert packed single-precision (32-bit) floating-point elements in two vectors +/// Converts packed single-precision (32-bit) floating-point elements in two vectors /// a and b to packed BF16 (16-bit) floating-point elements, and store the results /// in single vector dst using zeromask k (elements are zeroed out when the corresponding /// mask bit is not set). @@ -160,7 +160,7 @@ pub fn _mm512_maskz_cvtne2ps_pbh(k: __mmask32, a: __m512, b: __m512) -> __m512bh } } -/// Convert packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) +/// Converts packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) /// floating-point elements, and store the results in dst. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm256_cvtneps_pbh) #[inline] @@ -171,7 +171,7 @@ pub fn _mm256_cvtneps_pbh(a: __m256) -> __m128bh { unsafe { transmute(cvtneps2bf16_256(a.as_f32x8())) } } -/// Convert packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) +/// Converts packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) /// floating-point elements, and store the results in dst using writemask k /// (elements are copied from src when the corresponding mask bit is not set). /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm256_mask_cvtneps_pbh) @@ -186,7 +186,7 @@ pub fn _mm256_mask_cvtneps_pbh(src: __m128bh, k: __mmask8, a: __m256) -> __m128b } } -/// Convert packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) +/// Converts packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) /// floating-point elements, and store the results in dst using zeromask k /// (elements are zeroed out when the corresponding mask bit is not set). /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm256_maskz_cvtneps_pbh) @@ -201,7 +201,7 @@ pub fn _mm256_maskz_cvtneps_pbh(k: __mmask8, a: __m256) -> __m128bh { } } -/// Convert packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) +/// Converts packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) /// floating-point elements, and store the results in dst. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm512_cvtneps_pbh) #[inline] @@ -212,7 +212,7 @@ pub fn _mm512_cvtneps_pbh(a: __m512) -> __m256bh { unsafe { transmute(cvtneps2bf16_512(a.as_f32x16())) } } -/// Convert packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) +/// Converts packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) /// floating-point elements, and store the results in dst using writemask k /// (elements are copied from src when the corresponding mask bit is not set). /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm512_mask_cvtneps_pbh) @@ -227,7 +227,7 @@ pub fn _mm512_mask_cvtneps_pbh(src: __m256bh, k: __mmask16, a: __m512) -> __m256 } } -/// Convert packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) +/// Converts packed single-precision (32-bit) floating-point elements in a to packed BF16 (16-bit) /// floating-point elements, and store the results in dst using zeromask k /// (elements are zeroed out when the corresponding mask bit is not set). /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm512_maskz_cvtneps_pbh) @@ -242,7 +242,7 @@ pub fn _mm512_maskz_cvtneps_pbh(k: __mmask16, a: __m512) -> __m256bh { } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm_dpbf16_ps) @@ -254,7 +254,7 @@ pub fn _mm_dpbf16_ps(src: __m128, a: __m128bh, b: __m128bh) -> __m128 { unsafe { transmute(dpbf16ps(src.as_f32x4(), a.as_i16x8(), b.as_i16x8())) } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst using writemask k /// (elements are copied from src when the corresponding mask bit is not set). @@ -270,7 +270,7 @@ pub fn _mm_mask_dpbf16_ps(src: __m128, k: __mmask8, a: __m128bh, b: __m128bh) -> } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst using zeromask k /// (elements are zeroed out when the corresponding mask bit is not set). @@ -287,7 +287,7 @@ pub fn _mm_maskz_dpbf16_ps(k: __mmask8, src: __m128, a: __m128bh, b: __m128bh) - } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm256_dpbf16_ps) @@ -299,7 +299,7 @@ pub fn _mm256_dpbf16_ps(src: __m256, a: __m256bh, b: __m256bh) -> __m256 { unsafe { transmute(dpbf16ps_256(src.as_f32x8(), a.as_i16x16(), b.as_i16x16())) } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst using writemask k /// (elements are copied from src when the corresponding mask bit is not set). @@ -315,7 +315,7 @@ pub fn _mm256_mask_dpbf16_ps(src: __m256, k: __mmask8, a: __m256bh, b: __m256bh) } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst using zeromask k /// (elements are zeroed out when the corresponding mask bit is not set). @@ -331,9 +331,9 @@ pub fn _mm256_maskz_dpbf16_ps(k: __mmask8, src: __m256, a: __m256bh, b: __m256bh } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements -/// with elements in src, and store the results in dst.Compute dot-product of BF16 (16-bit) +/// with elements in src, and store the results in dst. Computes dot-product of BF16 (16-bit) /// floating-point pairs in a and b, accumulating the intermediate single-precision (32-bit) /// floating-point elements with elements in src, and store the results in dst. /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769,1651,1654,1657,1660&avx512techs=AVX512_BF16&text=_mm512_dpbf16_ps) @@ -345,7 +345,7 @@ pub fn _mm512_dpbf16_ps(src: __m512, a: __m512bh, b: __m512bh) -> __m512 { unsafe { transmute(dpbf16ps_512(src.as_f32x16(), a.as_i16x32(), b.as_i16x32())) } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst using writemask k /// (elements are copied from src when the corresponding mask bit is not set). @@ -361,7 +361,7 @@ pub fn _mm512_mask_dpbf16_ps(src: __m512, k: __mmask16, a: __m512bh, b: __m512bh } } -/// Compute dot-product of BF16 (16-bit) floating-point pairs in a and b, +/// Computes the dot-product of BF16 (16-bit) floating-point pairs in a and b, /// accumulating the intermediate single-precision (32-bit) floating-point elements /// with elements in src, and store the results in dst using zeromask k /// (elements are zeroed out when the corresponding mask bit is not set).