| 1 | /* |
| 2 | * // Copyright (c) Radzivon Bartoshyk 3/2025. All rights reserved. |
| 3 | * // |
| 4 | * // Redistribution and use in source and binary forms, with or without modification, |
| 5 | * // are permitted provided that the following conditions are met: |
| 6 | * // |
| 7 | * // 1. Redistributions of source code must retain the above copyright notice, this |
| 8 | * // list of conditions and the following disclaimer. |
| 9 | * // |
| 10 | * // 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 | * // this list of conditions and the following disclaimer in the documentation |
| 12 | * // and/or other materials provided with the distribution. |
| 13 | * // |
| 14 | * // 3. Neither the name of the copyright holder nor the names of its |
| 15 | * // contributors may be used to endorse or promote products derived from |
| 16 | * // this software without specific prior written permission. |
| 17 | * // |
| 18 | * // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 19 | * // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 20 | * // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 21 | * // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 22 | * // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 23 | * // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 24 | * // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 25 | * // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 26 | * // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 | * // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | */ |
| 29 | #![cfg(feature = "avx_shaper_fixed_point_paths")] |
| 30 | use craterust-analyzer cargo moxcms 0.8.1 crate/::conversionsrust-analyzer cargo moxcms 0.8.1 conversions/::avxrust-analyzer cargo moxcms 0.8.1 conversions/avx/::AvxAlignedU16rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#; |
| 31 | use craterust-analyzer cargo moxcms 0.8.1 crate/::conversionsrust-analyzer cargo moxcms 0.8.1 conversions/::rgbxyz_fixedrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/::TransformMatrixShaperFpOptVecrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#; |
| 32 | use craterust-analyzer cargo moxcms 0.8.1 crate/::transformrust-analyzer cargo moxcms 0.8.1 transform/::PointeeSizeExpressiblerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#; |
| 33 | use craterust-analyzer cargo moxcms 0.8.1 crate/::{CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#, Layoutrust-analyzer cargo moxcms 0.8.1 transform/Layout#, TransformExecutorrust-analyzer cargo moxcms 0.8.1 transform/TransformExecutor#}; |
| 34 | use num_traitsrust-analyzer cargo num-traits 0.2.19 crate/::AsPrimitiverust-analyzer cargo num-traits 0.2.19 cast/AsPrimitive#; |
| 35 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::archrust-analyzer cargo std https://github.com/rust-lang/rust/library/std arch/::x86_64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/arch/x86_64/::*; |
| 36 | |
| 37 | #[inline(always)] |
| 38 | pub(craterust-analyzer cargo moxcms 0.8.1 crate/) unsafe fn _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(f: &i32) -> __m128irust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128i# { |
| 39 | let float_ref: &f32 = unsafe { &*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().(f as *const i32 as *const f32) }; |
| 40 | unsafe { _mm_castps_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_castps_si128().(_mm_broadcast_ssrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm_broadcast_ss().(float_ref)) } |
| 41 | } |
| 42 | |
| 43 | pub(craterust-analyzer cargo moxcms 0.8.1 crate/) struct TransformShaperRgbQ2_13OptAvxrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#< |
| 44 | T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#, |
| 45 | const SRC_LAYOUT: u8, |
| 46 | const DST_LAYOUT: u8, |
| 47 | const PRECISION: i32, |
| 48 | > { |
| 49 | pub(craterust-analyzer cargo moxcms 0.8.1 crate/) profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile.: TransformMatrixShaperFpOptVecrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#<i32, i16, T>, |
| 50 | pub(craterust-analyzer cargo moxcms 0.8.1 crate/) bit_depthrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#bit_depth.: usize, |
| 51 | pub(craterust-analyzer cargo moxcms 0.8.1 crate/) gamma_lutrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#gamma_lut.: usize, |
| 52 | } |
| 53 | |
| 54 | impl< |
| 55 | T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy# + PointeeSizeExpressiblerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible# + 'static, |
| 56 | const SRC_LAYOUT: u8, |
| 57 | const DST_LAYOUT: u8, |
| 58 | const PRECISION: i32, |
| 59 | > TransformShaperRgbQ2_13OptAvxrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#<T, SRC_LAYOUT, DST_LAYOUT, PRECISION> |
| 60 | where |
| 61 | u32: AsPrimitiverust-analyzer cargo num-traits 0.2.19 cast/AsPrimitive#<T>, |
| 62 | { |
| 63 | #[target_feature(enable = "avx2")] |
| 64 | unsafe fn transform_avx2rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/impl#[`TransformShaperRgbQ2_13OptAvx<T, SRC_LAYOUT, DST_LAYOUT, PRECISION>`]transform_avx2().(&self, src: &[T], dst: &mut [T]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#> { |
| 65 | let src_cn = Layoutrust-analyzer cargo moxcms 0.8.1 transform/Layout#::fromrust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout][`From<u8>`]from().(SRC_LAYOUT); |
| 66 | let dst_cn = Layoutrust-analyzer cargo moxcms 0.8.1 transform/Layout#::fromrust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout][`From<u8>`]from().(DST_LAYOUT); |
| 67 | let src_channels = src_cn.channelsrust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]channels().(); |
| 68 | let dst_channels = dst_cn.channelsrust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]channels().(); |
| 69 | |
| 70 | let mut temporary0 = AvxAlignedU16rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#([0; 16]); |
| 71 | |
| 72 | if src.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().dst.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().dst_channels { |
| 73 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#::LaneSizeMismatchrust-analyzer cargo moxcms 0.8.1 err/CmsError#LaneSizeMismatch#); |
| 74 | } |
| 75 | if src.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().0 { |
| 76 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#::LaneMultipleOfChannelsrust-analyzer cargo moxcms 0.8.1 err/CmsError#LaneMultipleOfChannels#); |
| 77 | } |
| 78 | if dst.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().0 { |
| 79 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#::LaneMultipleOfChannelsrust-analyzer cargo moxcms 0.8.1 err/CmsError#LaneMultipleOfChannels#); |
| 80 | } |
| 81 | |
| 82 | let t = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..adaptation_matrixrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#adaptation_matrix..transposerust-analyzer cargo moxcms 0.8.1 matrix/impl#[`Matrix3<T>`]transpose().(); |
| 83 | |
| 84 | let max_colors = ((1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<usize>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<usize>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<usize>`]shl().self.bit_depthrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#bit_depth.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1).as_rust-analyzer cargo num-traits 0.2.19 cast/AsPrimitive#as_().(); |
| 85 | |
| 86 | // safety precondition for linearization table |
| 87 | if T::FINITErust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#FINITE. { |
| 88 | let cap = (1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl().self.bit_depthrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#bit_depth.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1; |
| 89 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..linearrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#linear..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() >= cap); |
| 90 | } else { |
| 91 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..linearrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#linear..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() >= T::NOT_FINITE_LINEAR_TABLE_SIZErust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#NOT_FINITE_LINEAR_TABLE_SIZE.); |
| 92 | } |
| 93 | |
| 94 | let lut_lin = &self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..linearrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#linear.; |
| 95 | |
| 96 | unsafe { |
| 97 | let m0 = _mm256_setr_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_setr_epi16().( |
| 98 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 0, 0, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 99 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 0, 0, |
| 100 | ); |
| 101 | let m2 = _mm256_setr_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_setr_epi16().( |
| 102 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, 0, 0, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, |
| 103 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, 0, 0, |
| 104 | ); |
| 105 | |
| 106 | let rnd_val = ((1i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().(PRECISION rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1)) as i16).to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i16]to_ne_bytes().(); |
| 107 | let rnd = _mm256_set1_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_set1_epi32().(i32::from_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]from_ne_bytes().([0, 0, rnd_val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., rnd_val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().])); |
| 108 | |
| 109 | let zeros = _mm256_setzero_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_setzero_si256().(); |
| 110 | |
| 111 | let v_max_value = _mm256_set1_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_set1_epi32().(self.gamma_lutrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#gamma_lut. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1); |
| 112 | |
| 113 | let (mut r0, mut g0, mut b0, mut a0); |
| 114 | let (mut r1, mut g1, mut b1, mut a1); |
| 115 | |
| 116 | let mut src_iter = src.chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2); |
| 117 | |
| 118 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(src0) = src_iter.nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`ChunksExact<'a, T>`][Iterator]next().() { |
| 119 | r0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 120 | g0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 121 | b0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 122 | |
| 123 | r1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 124 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 125 | ); |
| 126 | g1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 127 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 128 | ); |
| 129 | b1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 130 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 131 | ); |
| 132 | |
| 133 | a0 = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 134 | src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 135 | } else { |
| 136 | max_colors |
| 137 | }; |
| 138 | a1 = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 139 | src0[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 140 | } else { |
| 141 | max_colors |
| 142 | }; |
| 143 | } else { |
| 144 | r0 = _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().(); |
| 145 | g0 = _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().(); |
| 146 | b0 = _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().(); |
| 147 | a0 = max_colors; |
| 148 | r1 = _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().(); |
| 149 | g1 = _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().(); |
| 150 | b1 = _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().(); |
| 151 | a1 = max_colors; |
| 152 | } |
| 153 | |
| 154 | for (src, dst) in src_iter.ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(dst.chunks_exact_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact_mut().(dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2)) { |
| 155 | let zr0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(r0), r1); |
| 156 | let mut zg0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(g0), g1); |
| 157 | let zb0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(b0), b1); |
| 158 | zg0 = _mm256_slli_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_slli_epi32().::<16>(zg0); |
| 159 | |
| 160 | let zrg0 = _mm256_or_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_or_si256().(zr0, zg0); |
| 161 | let zbz0 = _mm256_or_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_or_si256().(zb0, rnd); |
| 162 | |
| 163 | let va0 = _mm256_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_madd_epi16().(zrg0, m0); |
| 164 | let va1 = _mm256_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_madd_epi16().(zbz0, m2); |
| 165 | |
| 166 | let mut v0 = _mm256_add_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_add_epi32().(va0, va1); |
| 167 | |
| 168 | v0 = _mm256_srai_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_srai_epi32().::<PRECISION>(v0); |
| 169 | v0 = _mm256_max_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_max_epi32().(v0, zeros); |
| 170 | v0 = _mm256_min_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_min_epi32().(v0, v_max_value); |
| 171 | |
| 172 | _mm256_store_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_store_si256().(temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0..as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().() as *mut _, v0); |
| 173 | |
| 174 | r0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 175 | g0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 176 | b0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 177 | |
| 178 | r1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 179 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 180 | ); |
| 181 | g1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 182 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 183 | ); |
| 184 | b1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 185 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 186 | ); |
| 187 | |
| 188 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 189 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 190 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 191 | if dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 192 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a0; |
| 193 | } |
| 194 | |
| 195 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 196 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 197 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 198 | if dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 199 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a1; |
| 200 | } |
| 201 | |
| 202 | a0 = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 203 | src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 204 | } else { |
| 205 | max_colors |
| 206 | }; |
| 207 | a1 = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 208 | src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 209 | } else { |
| 210 | max_colors |
| 211 | }; |
| 212 | } |
| 213 | |
| 214 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dst) = dst.chunks_exact_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact_mut().(dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2).lastrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`ChunksExactMut<'a, T>`][Iterator]last().() { |
| 215 | let zr0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(r0), r1); |
| 216 | let mut zg0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(g0), g1); |
| 217 | let zb0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(b0), b1); |
| 218 | zg0 = _mm256_slli_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_slli_epi32().::<16>(zg0); |
| 219 | |
| 220 | let zrg0 = _mm256_or_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_or_si256().(zr0, zg0); |
| 221 | let zbz0 = _mm256_or_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_or_si256().(zb0, rnd); |
| 222 | |
| 223 | let va0 = _mm256_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_madd_epi16().(zrg0, m0); |
| 224 | let va1 = _mm256_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_madd_epi16().(zbz0, m2); |
| 225 | |
| 226 | let mut v0 = _mm256_add_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_add_epi32().(va0, va1); |
| 227 | |
| 228 | v0 = _mm256_srai_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_srai_epi32().::<PRECISION>(v0); |
| 229 | v0 = _mm256_max_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_max_epi32().(v0, zeros); |
| 230 | v0 = _mm256_min_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_min_epi32().(v0, v_max_value); |
| 231 | |
| 232 | _mm256_store_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_store_si256().(temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0..as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().() as *mut _, v0); |
| 233 | |
| 234 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 235 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 236 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 237 | if dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 238 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a0; |
| 239 | } |
| 240 | |
| 241 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 242 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 243 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 244 | if dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 245 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().dst_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a1; |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | let src = src.chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2).remainderrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`ChunksExact<'a, T>`]remainder().(); |
| 250 | let dst = dst.chunks_exact_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact_mut().(dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2).into_remainderrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`ChunksExactMut<'a, T>`]into_remainder().(); |
| 251 | |
| 252 | for (src, dst) in src |
| 253 | .chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(src_channels) |
| 254 | .ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(dst.chunks_exact_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact_mut().(dst_channels)) |
| 255 | { |
| 256 | let r = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 257 | let mut g = |
| 258 | _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 259 | let b = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 260 | |
| 261 | g = _mm_slli_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_slli_epi32().::<16>(g); |
| 262 | |
| 263 | let a = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 264 | src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 265 | } else { |
| 266 | max_colors |
| 267 | }; |
| 268 | |
| 269 | let zrg0 = _mm_or_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_or_si128().(r, g); |
| 270 | let zbz0 = _mm_or_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_or_si128().(b, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(rnd)); |
| 271 | |
| 272 | let v0 = _mm_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_madd_epi16().(zrg0, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(m0)); |
| 273 | let v1 = _mm_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_madd_epi16().(zbz0, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(m2)); |
| 274 | |
| 275 | let mut v = _mm_add_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_add_epi32().(v0, v1); |
| 276 | |
| 277 | v = _mm_srai_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_srai_epi32().::<PRECISION>(v); |
| 278 | v = _mm_max_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse41/_mm_max_epi32().(v, _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().()); |
| 279 | v = _mm_min_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse41/_mm_min_epi32().(v, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(v_max_value)); |
| 280 | |
| 281 | _mm_store_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_store_si128().(temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0..as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().() as *mut _, v); |
| 282 | |
| 283 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 284 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 285 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 286 | if dst_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 287 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().dst_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a; |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 293 | } |
| 294 | |
| 295 | #[cfg(feature = "in_place")] |
| 296 | #[target_feature(enable = "avx2")] |
| 297 | unsafe fn transform_in_place_avx2rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/impl#[`TransformShaperRgbQ2_13OptAvx<T, SRC_LAYOUT, DST_LAYOUT, PRECISION>`]transform_in_place_avx2().(&self, in_out: &mut [T]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#> { |
| 298 | let src_cn = Layoutrust-analyzer cargo moxcms 0.8.1 transform/Layout#::fromrust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout][`From<u8>`]from().(SRC_LAYOUT); |
| 299 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 300 | SRC_LAYOUT, DST_LAYOUT, |
| 301 | "This is in-place transform, layout must not diverge" |
| 302 | ); |
| 303 | let src_channels = src_cn.channelsrust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]channels().(); |
| 304 | |
| 305 | let mut temporary0 = AvxAlignedU16rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#([0; 16]); |
| 306 | |
| 307 | if in_out.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().0 { |
| 308 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#::LaneMultipleOfChannelsrust-analyzer cargo moxcms 0.8.1 err/CmsError#LaneMultipleOfChannels#); |
| 309 | } |
| 310 | |
| 311 | let t = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..adaptation_matrixrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#adaptation_matrix..transposerust-analyzer cargo moxcms 0.8.1 matrix/impl#[`Matrix3<T>`]transpose().(); |
| 312 | |
| 313 | let max_colors = ((1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<usize>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<usize>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<usize>`]shl().self.bit_depthrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#bit_depth.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1).as_rust-analyzer cargo num-traits 0.2.19 cast/AsPrimitive#as_().(); |
| 314 | |
| 315 | // safety precondition for linearization table |
| 316 | if T::FINITErust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#FINITE. { |
| 317 | let cap = (1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl().self.bit_depthrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#bit_depth.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1; |
| 318 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..linearrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#linear..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() >= cap); |
| 319 | } else { |
| 320 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..linearrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#linear..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() >= T::NOT_FINITE_LINEAR_TABLE_SIZErust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#NOT_FINITE_LINEAR_TABLE_SIZE.); |
| 321 | } |
| 322 | |
| 323 | let lut_lin = &self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..linearrust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#linear.; |
| 324 | |
| 325 | unsafe { |
| 326 | let m0 = _mm256_setr_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_setr_epi16().( |
| 327 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 0, 0, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 328 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 0, 0, |
| 329 | ); |
| 330 | let m2 = _mm256_setr_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_setr_epi16().( |
| 331 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, 0, 0, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, |
| 332 | t.vrust-analyzer cargo moxcms 0.8.1 matrix/Matrix3#v.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1, 0, 0, |
| 333 | ); |
| 334 | |
| 335 | let rnd_val = ((1i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().(PRECISION rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1)) as i16).to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i16]to_ne_bytes().(); |
| 336 | let rnd = _mm256_set1_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_set1_epi32().(i32::from_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]from_ne_bytes().([0, 0, rnd_val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., rnd_val[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().])); |
| 337 | |
| 338 | let zeros = _mm256_setzero_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_setzero_si256().(); |
| 339 | |
| 340 | let v_max_value = _mm256_set1_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_set1_epi32().(self.gamma_lutrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#gamma_lut. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1); |
| 341 | |
| 342 | let (mut r0, mut g0, mut b0, mut a0); |
| 343 | let (mut r1, mut g1, mut b1, mut a1); |
| 344 | |
| 345 | for dst in in_out.chunks_exact_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact_mut().(src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2) { |
| 346 | r0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 347 | g0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 348 | b0 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 349 | |
| 350 | r1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 351 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 352 | ); |
| 353 | g1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 354 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 355 | ); |
| 356 | b1 = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().( |
| 357 | lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().()), |
| 358 | ); |
| 359 | |
| 360 | a0 = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 361 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 362 | } else { |
| 363 | max_colors |
| 364 | }; |
| 365 | a1 = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 366 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 367 | } else { |
| 368 | max_colors |
| 369 | }; |
| 370 | |
| 371 | let zr0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(r0), r1); |
| 372 | let mut zg0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(g0), g1); |
| 373 | let zb0 = _mm256_inserti128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_inserti128_si256().::<1>(_mm256_castsi128_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi128_si256().(b0), b1); |
| 374 | zg0 = _mm256_slli_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_slli_epi32().::<16>(zg0); |
| 375 | |
| 376 | let zrg0 = _mm256_or_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_or_si256().(zr0, zg0); |
| 377 | let zbz0 = _mm256_or_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_or_si256().(zb0, rnd); |
| 378 | |
| 379 | let va0 = _mm256_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_madd_epi16().(zrg0, m0); |
| 380 | let va1 = _mm256_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_madd_epi16().(zbz0, m2); |
| 381 | |
| 382 | let mut v0 = _mm256_add_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_add_epi32().(va0, va1); |
| 383 | |
| 384 | v0 = _mm256_srai_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_srai_epi32().::<PRECISION>(v0); |
| 385 | v0 = _mm256_max_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_max_epi32().(v0, zeros); |
| 386 | v0 = _mm256_min_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx2/_mm256_min_epi32().(v0, v_max_value); |
| 387 | |
| 388 | _mm256_store_si256rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_store_si256().(temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0..as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().() as *mut _, v0); |
| 389 | |
| 390 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 391 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 392 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 393 | if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 394 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a0; |
| 395 | } |
| 396 | |
| 397 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 398 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 399 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 400 | if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 401 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().src_channels]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a1; |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | let dst = in_out.chunks_exact_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact_mut().(src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2).into_remainderrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`ChunksExactMut<'a, T>`]into_remainder().(); |
| 406 | |
| 407 | for dst in dst.chunks_exact_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact_mut().(src_channels) { |
| 408 | let r = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 409 | let mut g = |
| 410 | _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 411 | let b = _xmm_broadcast_epi32rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/_xmm_broadcast_epi32().(lut_lin.get_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_unchecked().(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().._as_usizerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible#_as_usize().())); |
| 412 | |
| 413 | g = _mm_slli_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_slli_epi32().::<16>(g); |
| 414 | |
| 415 | let a = if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 416 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 417 | } else { |
| 418 | max_colors |
| 419 | }; |
| 420 | |
| 421 | let zrg0 = _mm_or_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_or_si128().(r, g); |
| 422 | let zbz0 = _mm_or_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_or_si128().(b, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(rnd)); |
| 423 | |
| 424 | let v0 = _mm_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_madd_epi16().(zrg0, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(m0)); |
| 425 | let v1 = _mm_madd_epi16rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_madd_epi16().(zbz0, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(m2)); |
| 426 | |
| 427 | let mut v = _mm_add_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_add_epi32().(v0, v1); |
| 428 | |
| 429 | v = _mm_srai_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_srai_epi32().::<PRECISION>(v); |
| 430 | v = _mm_max_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse41/_mm_max_epi32().(v, _mm_setzero_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_setzero_si128().()); |
| 431 | v = _mm_min_epi32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse41/_mm_min_epi32().(v, _mm256_castsi256_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/avx/_mm256_castsi256_si128().(v_max_value)); |
| 432 | |
| 433 | _mm_store_si128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_store_si128().(temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0..as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().() as *mut _, v); |
| 434 | |
| 435 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.r_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]r_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 436 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.g_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]g_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 437 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.b_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]b_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.profilerust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#profile..gammarust-analyzer cargo moxcms 0.8.1 conversions/rgbxyz_fixed/TransformMatrixShaperFpOptVec#gamma.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().temporary0.0rust-analyzer cargo moxcms 0.8.1 conversions/avx/AvxAlignedU16#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 438 | if src_channels rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().4 { |
| 439 | dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().src_cn.a_irust-analyzer cargo moxcms 0.8.1 transform/impl#[Layout]a_i().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = a; |
| 440 | } |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | impl< |
| 449 | T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy# + PointeeSizeExpressiblerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible# + 'static + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#, |
| 450 | const SRC_LAYOUT: u8, |
| 451 | const DST_LAYOUT: u8, |
| 452 | const PRECISION: i32, |
| 453 | > TransformExecutorrust-analyzer cargo moxcms 0.8.1 transform/TransformExecutor#<T> for TransformShaperRgbQ2_13OptAvxrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#<T, SRC_LAYOUT, DST_LAYOUT, PRECISION> |
| 454 | where |
| 455 | u32: AsPrimitiverust-analyzer cargo num-traits 0.2.19 cast/AsPrimitive#<T>, |
| 456 | { |
| 457 | fn transformrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/impl#[`TransformShaperRgbQ2_13OptAvx<T, SRC_LAYOUT, DST_LAYOUT, PRECISION>`][`TransformExecutor<T>`]transform().(&self, src: &[T], dst: &mut [T]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#> { |
| 458 | unsafe { self.transform_avx2rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/impl#[`TransformShaperRgbQ2_13OptAvx<T, SRC_LAYOUT, DST_LAYOUT, PRECISION>`]transform_avx2().(src, dst) } |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | #[cfg(feature = "in_place")] |
| 463 | use craterust-analyzer cargo moxcms 0.8.1 crate/::InPlaceTransformExecutorrust-analyzer cargo moxcms 0.8.1 transform/InPlaceTransformExecutor#; |
| 464 | |
| 465 | #[cfg(feature = "in_place")] |
| 466 | impl< |
| 467 | T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy# + PointeeSizeExpressiblerust-analyzer cargo moxcms 0.8.1 transform/PointeeSizeExpressible# + 'static + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#, |
| 468 | const SRC_LAYOUT: u8, |
| 469 | const DST_LAYOUT: u8, |
| 470 | const PRECISION: i32, |
| 471 | > InPlaceTransformExecutorrust-analyzer cargo moxcms 0.8.1 transform/InPlaceTransformExecutor#<T> |
| 472 | for TransformShaperRgbQ2_13OptAvxrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/TransformShaperRgbQ2_13OptAvx#<T, SRC_LAYOUT, DST_LAYOUT, PRECISION> |
| 473 | where |
| 474 | u32: AsPrimitiverust-analyzer cargo num-traits 0.2.19 cast/AsPrimitive#<T>, |
| 475 | { |
| 476 | fn transformrust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/impl#[`TransformShaperRgbQ2_13OptAvx<T, SRC_LAYOUT, DST_LAYOUT, PRECISION>`][`InPlaceTransformExecutor<T>`]transform().(&self, in_out: &mut [T]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), CmsErrorrust-analyzer cargo moxcms 0.8.1 err/CmsError#> { |
| 477 | unsafe { self.transform_in_place_avx2rust-analyzer cargo moxcms 0.8.1 conversions/avx/rgb_xyz_q2_13_opt/impl#[`TransformShaperRgbQ2_13OptAvx<T, SRC_LAYOUT, DST_LAYOUT, PRECISION>`]transform_in_place_avx2().(in_out) } |
| 478 | } |
| 479 | } |