| 1 | // Copyright 2024 the Fearless_SIMD Authors |
| 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT |
| 3 | |
| 4 | //! Access to FMA intrinsics. |
| 5 | |
| 6 | use craterust-analyzer cargo fearless_simd 0.4.1 crate/::impl_macrosrust-analyzer cargo fearless_simd 0.4.1 impl_macros/::delegaterust-analyzer cargo fearless_simd 0.4.1 impl_macros/delegate!; |
| 7 | #[cfg(target_arch = "x86")] |
| 8 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86 as arch; |
| 9 | #[cfg(target_arch = "x86_64")] |
| 10 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86_64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/arch/x86_64/ as archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/arch/x86_64/; |
| 11 | |
| 12 | use archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/arch/x86_64/::*; |
| 13 | |
| 14 | /// A token for FMA intrinsics on `x86` and `x86_64`. |
| 15 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)] |
| 16 | pub struct Fmarust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/Fma# { |
| 17 | _privaterust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/Fma#_private.: (), |
| 18 | } |
| 19 | |
| 20 | impl Fmarust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/Fma# { |
| 21 | /// Create a SIMD token. |
| 22 | /// |
| 23 | /// # Safety |
| 24 | /// |
| 25 | /// The required CPU features must be available. |
| 26 | #[inline] |
| 27 | pub const unsafe fn new_uncheckedrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]new_unchecked().() -> Selfrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma] { |
| 28 | Selfrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma] { _privaterust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/Fma#_private.: () } |
| 29 | } |
| 30 | |
| 31 | delegaterust-analyzer cargo fearless_simd 0.4.1 impl_macros/delegate!! { arch: |
| 32 | fn _mm_fmadd_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmadd_pd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 33 | fn _mm256_fmadd_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmadd_pd().(a: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, b: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, c: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#) -> __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#; |
| 34 | fn _mm_fmadd_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmadd_ps().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 35 | fn _mm256_fmadd_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmadd_ps().(a: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, b: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, c: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#) -> __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#; |
| 36 | fn _mm_fmadd_sdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmadd_sd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 37 | fn _mm_fmadd_ssrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmadd_ss().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 38 | fn _mm_fmaddsub_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmaddsub_pd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 39 | fn _mm256_fmaddsub_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmaddsub_pd().(a: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, b: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, c: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#) -> __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#; |
| 40 | fn _mm_fmaddsub_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmaddsub_ps().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 41 | fn _mm256_fmaddsub_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmaddsub_ps().(a: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, b: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, c: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#) -> __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#; |
| 42 | fn _mm_fmsub_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmsub_pd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 43 | fn _mm256_fmsub_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmsub_pd().(a: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, b: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, c: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#) -> __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#; |
| 44 | fn _mm_fmsub_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmsub_ps().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 45 | fn _mm256_fmsub_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmsub_ps().(a: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, b: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, c: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#) -> __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#; |
| 46 | fn _mm_fmsub_sdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmsub_sd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 47 | fn _mm_fmsub_ssrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmsub_ss().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 48 | fn _mm_fmsubadd_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmsubadd_pd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 49 | fn _mm256_fmsubadd_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmsubadd_pd().(a: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, b: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, c: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#) -> __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#; |
| 50 | fn _mm_fmsubadd_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fmsubadd_ps().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 51 | fn _mm256_fmsubadd_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fmsubadd_ps().(a: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, b: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, c: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#) -> __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#; |
| 52 | fn _mm_fnmadd_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmadd_pd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 53 | fn _mm256_fnmadd_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fnmadd_pd().(a: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, b: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, c: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#) -> __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#; |
| 54 | fn _mm_fnmadd_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmadd_ps().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 55 | fn _mm256_fnmadd_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fnmadd_ps().(a: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, b: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, c: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#) -> __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#; |
| 56 | fn _mm_fnmadd_sdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmadd_sd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 57 | fn _mm_fnmadd_ssrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmadd_ss().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 58 | fn _mm_fnmsub_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmsub_pd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 59 | fn _mm256_fnmsub_pdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fnmsub_pd().(a: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, b: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#, c: __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#) -> __m256drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256d#; |
| 60 | fn _mm_fnmsub_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmsub_ps().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 61 | fn _mm256_fnmsub_psrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm256_fnmsub_ps().(a: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, b: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#, c: __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#) -> __m256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m256#; |
| 62 | fn _mm_fnmsub_sdrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmsub_sd().(a: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, b: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#, c: __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#) -> __m128drust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128d#; |
| 63 | fn _mm_fnmsub_ssrust-analyzer cargo fearless_simd 0.4.1 core_arch/x86/fma/impl#[Fma]_mm_fnmsub_ss().(a: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, b: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#, c: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#) -> __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#; |
| 64 | } |
| 65 | } |