Coverage Report

Created: 2026-10-28 07:07

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/grok/mercury/native/transform/hwy_dwt.cpp
Line
Count
Source
1
#include "transform/dwt_kernels.h"
2
#include <assert.h>
3
#include <cmath>
4
5
#undef HWY_TARGET_INCLUDE
6
#define HWY_TARGET_INCLUDE "transform/hwy_dwt.cpp"
7
#include <hwy/foreach_target.h>
8
#include <hwy/highway.h>
9
10
HWY_BEFORE_NAMESPACE();
11
namespace mercury_native
12
{
13
namespace HWY_NAMESPACE
14
{
15
  namespace hn = hwy::HWY_NAMESPACE;
16
17
  static int Impl_lanes_32()
18
1
  {
19
1
    return (int)hn::Lanes(hn::ScalableTag<int32_t>());
20
1
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_lanes_32()
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_lanes_32()
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_lanes_32()
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_lanes_32()
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_lanes_32()
Line
Count
Source
18
1
  {
19
1
    return (int)hn::Lanes(hn::ScalableTag<int32_t>());
20
1
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_lanes_32()
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_lanes_32()
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_lanes_32()
21
22
  // InterleaveWholeLower/Upper, not the per-128-bit-block InterleaveLower/Upper,
23
  // which only yield sample order up to 256-bit vectors and scramble on 512-bit.
24
  static void Impl_interleave_16(int16_t* src1, int16_t* src2, int16_t* dst, int pairs)
25
246k
  {
26
246k
    const hn::ScalableTag<int16_t> d;
27
246k
    const size_t N = hn::Lanes(d);
28
1.71M
    for(int i = 0; i < pairs; i += (int)N)
29
1.46M
    {
30
1.46M
      auto a = hn::Load(d, src1 + i);
31
1.46M
      auto b = hn::Load(d, src2 + i);
32
1.46M
      hn::Store(hn::InterleaveWholeLower(d, a, b), d, dst + 2 * i);
33
1.46M
      hn::Store(hn::InterleaveWholeUpper(d, a, b), d, dst + 2 * i + (int)N);
34
1.46M
    }
35
246k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_interleave_16(short*, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_interleave_16(short*, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_interleave_16(short*, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_interleave_16(short*, short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_interleave_16(short*, short*, short*, int)
Line
Count
Source
25
246k
  {
26
246k
    const hn::ScalableTag<int16_t> d;
27
246k
    const size_t N = hn::Lanes(d);
28
1.71M
    for(int i = 0; i < pairs; i += (int)N)
29
1.46M
    {
30
1.46M
      auto a = hn::Load(d, src1 + i);
31
1.46M
      auto b = hn::Load(d, src2 + i);
32
1.46M
      hn::Store(hn::InterleaveWholeLower(d, a, b), d, dst + 2 * i);
33
1.46M
      hn::Store(hn::InterleaveWholeUpper(d, a, b), d, dst + 2 * i + (int)N);
34
1.46M
    }
35
246k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_interleave_16(short*, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_interleave_16(short*, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_interleave_16(short*, short*, short*, int)
36
37
  static void Impl_interleave_32(int32_t* src1, int32_t* src2, int32_t* dst, int pairs)
38
113k
  {
39
113k
    const hn::ScalableTag<int32_t> d;
40
113k
    const size_t N = hn::Lanes(d);
41
1.59M
    for(int i = 0; i < pairs; i += (int)N)
42
1.48M
    {
43
1.48M
      auto a = hn::Load(d, src1 + i);
44
1.48M
      auto b = hn::Load(d, src2 + i);
45
1.48M
      hn::Store(hn::InterleaveWholeLower(d, a, b), d, dst + 2 * i);
46
1.48M
      hn::Store(hn::InterleaveWholeUpper(d, a, b), d, dst + 2 * i + (int)N);
47
1.48M
    }
48
113k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_interleave_32(int*, int*, int*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_interleave_32(int*, int*, int*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_interleave_32(int*, int*, int*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_interleave_32(int*, int*, int*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_interleave_32(int*, int*, int*, int)
Line
Count
Source
38
113k
  {
39
113k
    const hn::ScalableTag<int32_t> d;
40
113k
    const size_t N = hn::Lanes(d);
41
1.59M
    for(int i = 0; i < pairs; i += (int)N)
42
1.48M
    {
43
1.48M
      auto a = hn::Load(d, src1 + i);
44
1.48M
      auto b = hn::Load(d, src2 + i);
45
1.48M
      hn::Store(hn::InterleaveWholeLower(d, a, b), d, dst + 2 * i);
46
1.48M
      hn::Store(hn::InterleaveWholeUpper(d, a, b), d, dst + 2 * i + (int)N);
47
1.48M
    }
48
113k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_interleave_32(int*, int*, int*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_interleave_32(int*, int*, int*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_interleave_32(int*, int*, int*, int)
49
50
  static void Impl_vlift_16_5x3_synth_s0(int16_t** src, int16_t* dst_in, int16_t* dst_out,
51
                                         int samples)
52
44.8k
  {
53
    // W5X3 step 0 is always downshift=1, icoeffs [-1,-1]
54
44.8k
    int16_t *src1 = src[0], *src2 = src[1];
55
44.8k
    const hn::ScalableTag<int16_t> d;
56
44.8k
    const hn::ScalableTag<uint16_t> du;
57
44.8k
    const size_t N = hn::Lanes(d);
58
    // 17-bit-safe floor((a+b)/2): naive (a+b) wraps int16 (BIBO keeps a,b in
59
    // int16 but their SUM needs 17 bits). AverageRound in the biased-unsigned
60
    // domain yields (a+b+1)>>1 exactly; subtracting the odd bit ((a^b)&1) floors.
61
44.8k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
62
44.8k
    auto vec_one = hn::Set(d, (int16_t)1);
63
456k
    for(int c = 0; c < samples; c += (int)N)
64
411k
    {
65
411k
      auto a = hn::Load(d, src1 + c);
66
411k
      auto b = hn::Load(d, src2 + c);
67
411k
      auto au = hn::BitCast(du, hn::Xor(a, msk_smin));
68
411k
      auto bu = hn::BitCast(du, hn::Xor(b, msk_smin));
69
411k
      auto avg = hn::Xor(hn::BitCast(d, hn::AverageRound(au, bu)), msk_smin);
70
411k
      auto m = hn::Sub(avg, hn::And(hn::Xor(a, b), vec_one));
71
411k
      hn::Store(hn::Add(hn::Load(d, dst_in + c), m), d, dst_out + c);
72
411k
    }
73
44.8k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
Line
Count
Source
52
44.8k
  {
53
    // W5X3 step 0 is always downshift=1, icoeffs [-1,-1]
54
44.8k
    int16_t *src1 = src[0], *src2 = src[1];
55
44.8k
    const hn::ScalableTag<int16_t> d;
56
44.8k
    const hn::ScalableTag<uint16_t> du;
57
44.8k
    const size_t N = hn::Lanes(d);
58
    // 17-bit-safe floor((a+b)/2): naive (a+b) wraps int16 (BIBO keeps a,b in
59
    // int16 but their SUM needs 17 bits). AverageRound in the biased-unsigned
60
    // domain yields (a+b+1)>>1 exactly; subtracting the odd bit ((a^b)&1) floors.
61
44.8k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
62
44.8k
    auto vec_one = hn::Set(d, (int16_t)1);
63
456k
    for(int c = 0; c < samples; c += (int)N)
64
411k
    {
65
411k
      auto a = hn::Load(d, src1 + c);
66
411k
      auto b = hn::Load(d, src2 + c);
67
411k
      auto au = hn::BitCast(du, hn::Xor(a, msk_smin));
68
411k
      auto bu = hn::BitCast(du, hn::Xor(b, msk_smin));
69
411k
      auto avg = hn::Xor(hn::BitCast(d, hn::AverageRound(au, bu)), msk_smin);
70
411k
      auto m = hn::Sub(avg, hn::And(hn::Xor(a, b), vec_one));
71
411k
      hn::Store(hn::Add(hn::Load(d, dst_in + c), m), d, dst_out + c);
72
411k
    }
73
44.8k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_16_5x3_synth_s0(short**, short*, short*, int)
74
75
  static void Impl_vlift_16_5x3_synth_s1(int16_t** src, int16_t* dst_in, int16_t* dst_out,
76
                                         int samples)
77
44.7k
  {
78
44.7k
    const hn::ScalableTag<int16_t> d;
79
44.7k
    const hn::ScalableTag<uint16_t> du;
80
44.7k
    const size_t N = hn::Lanes(d);
81
44.7k
    int16_t *src1 = src[0], *src2 = src[1];
82
44.7k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
83
44.7k
    auto msk_smax = hn::Set(d, (int16_t)0x7FFF);
84
456k
    for(int c = 0; c < samples; c += (int)N)
85
411k
    {
86
411k
      auto val1 = hn::Xor(hn::Load(d, src1 + c), msk_smin);
87
411k
      auto val2 = hn::Add(hn::Load(d, src2 + c), msk_smax);
88
411k
      auto avg = hn::BitCast(d, hn::AverageRound(hn::BitCast(du, val1), hn::BitCast(du, val2)));
89
411k
      avg = hn::ShiftRight<1>(hn::Sub(avg, msk_smax));
90
411k
      auto tgt = hn::Sub(hn::Load(d, dst_in + c), avg);
91
411k
      hn::Store(tgt, d, dst_out + c);
92
411k
    }
93
44.7k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
Line
Count
Source
77
44.7k
  {
78
44.7k
    const hn::ScalableTag<int16_t> d;
79
44.7k
    const hn::ScalableTag<uint16_t> du;
80
44.7k
    const size_t N = hn::Lanes(d);
81
44.7k
    int16_t *src1 = src[0], *src2 = src[1];
82
44.7k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
83
44.7k
    auto msk_smax = hn::Set(d, (int16_t)0x7FFF);
84
456k
    for(int c = 0; c < samples; c += (int)N)
85
411k
    {
86
411k
      auto val1 = hn::Xor(hn::Load(d, src1 + c), msk_smin);
87
411k
      auto val2 = hn::Add(hn::Load(d, src2 + c), msk_smax);
88
411k
      auto avg = hn::BitCast(d, hn::AverageRound(hn::BitCast(du, val1), hn::BitCast(du, val2)));
89
411k
      avg = hn::ShiftRight<1>(hn::Sub(avg, msk_smax));
90
411k
      auto tgt = hn::Sub(hn::Load(d, dst_in + c), avg);
91
411k
      hn::Store(tgt, d, dst_out + c);
92
411k
    }
93
44.7k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_16_5x3_synth_s1(short**, short*, short*, int)
94
95
  static void Impl_vlift_32_2tap_irrev(int32_t** src, int32_t* dst_in, int32_t* dst_out,
96
                                       int samples, merc_lifting_step* step)
97
298k
  {
98
298k
    const hn::ScalableTag<float> df;
99
298k
    const size_t N = hn::Lanes(df);
100
298k
    const float sign = -1.0f; // synthesis negates the lifting coeffs
101
298k
    auto vec_l0 = hn::Set(df, sign * step->coeffs[0]);
102
298k
    auto vec_l1 = hn::Set(df, sign * ((step->support_length == 2) ? step->coeffs[1] : 0.0f));
103
298k
    float *sp0 = (float*)src[0], *sp1 = (step->support_length == 2) ? (float*)src[1] : sp0;
104
298k
    float *dp_in = (float*)dst_in, *dp_out = (float*)dst_out;
105
3.15M
    for(int c = 0; c < samples; c += (int)N)
106
2.85M
    {
107
2.85M
      auto tgt = hn::Load(df, dp_in + c);
108
2.85M
      tgt = hn::MulAdd(hn::Load(df, sp0 + c), vec_l0, tgt);
109
2.85M
      tgt = hn::MulAdd(hn::Load(df, sp1 + c), vec_l1, tgt);
110
2.85M
      hn::Store(tgt, df, dp_out + c);
111
2.85M
    }
112
298k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Line
Count
Source
97
298k
  {
98
298k
    const hn::ScalableTag<float> df;
99
298k
    const size_t N = hn::Lanes(df);
100
298k
    const float sign = -1.0f; // synthesis negates the lifting coeffs
101
298k
    auto vec_l0 = hn::Set(df, sign * step->coeffs[0]);
102
298k
    auto vec_l1 = hn::Set(df, sign * ((step->support_length == 2) ? step->coeffs[1] : 0.0f));
103
298k
    float *sp0 = (float*)src[0], *sp1 = (step->support_length == 2) ? (float*)src[1] : sp0;
104
298k
    float *dp_in = (float*)dst_in, *dp_out = (float*)dst_out;
105
3.15M
    for(int c = 0; c < samples; c += (int)N)
106
2.85M
    {
107
2.85M
      auto tgt = hn::Load(df, dp_in + c);
108
2.85M
      tgt = hn::MulAdd(hn::Load(df, sp0 + c), vec_l0, tgt);
109
2.85M
      tgt = hn::MulAdd(hn::Load(df, sp1 + c), vec_l1, tgt);
110
2.85M
      hn::Store(tgt, df, dp_out + c);
111
2.85M
    }
112
298k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_32_2tap_irrev(int**, int*, int*, int, mercury_native::merc_lifting_step*)
113
114
  static void Impl_vlift_32_5x3_synth_s0(int32_t** src, int32_t* dst_in, int32_t* dst_out,
115
                                         int samples, merc_lifting_step* step)
116
29.5k
  {
117
29.5k
    const hn::ScalableTag<int32_t> d;
118
29.5k
    const size_t N = hn::Lanes(d);
119
29.5k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
120
29.5k
    int32_t *src1 = src[0], *src2 = src[1];
121
730k
    for(int c = 0; c < samples; c += (int)N)
122
701k
    {
123
701k
      auto val = hn::Sub(vec_offset, hn::Load(d, src1 + c));
124
701k
      val = hn::Sub(val, hn::Load(d, src2 + c));
125
701k
      val = hn::ShiftRight<1>(val);
126
701k
      hn::Store(hn::Sub(hn::Load(d, dst_in + c), val), d, dst_out + c);
127
701k
    }
128
29.5k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Line
Count
Source
116
29.5k
  {
117
29.5k
    const hn::ScalableTag<int32_t> d;
118
29.5k
    const size_t N = hn::Lanes(d);
119
29.5k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
120
29.5k
    int32_t *src1 = src[0], *src2 = src[1];
121
730k
    for(int c = 0; c < samples; c += (int)N)
122
701k
    {
123
701k
      auto val = hn::Sub(vec_offset, hn::Load(d, src1 + c));
124
701k
      val = hn::Sub(val, hn::Load(d, src2 + c));
125
701k
      val = hn::ShiftRight<1>(val);
126
701k
      hn::Store(hn::Sub(hn::Load(d, dst_in + c), val), d, dst_out + c);
127
701k
    }
128
29.5k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_32_5x3_synth_s0(int**, int*, int*, int, mercury_native::merc_lifting_step*)
129
130
  static void Impl_vlift_32_5x3_synth_s1(int32_t** src, int32_t* dst_in, int32_t* dst_out,
131
                                         int samples, merc_lifting_step* step)
132
29.6k
  {
133
29.6k
    const hn::ScalableTag<int32_t> d;
134
29.6k
    const size_t N = hn::Lanes(d);
135
29.6k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
136
29.6k
    int32_t *src1 = src[0], *src2 = src[1];
137
734k
    for(int c = 0; c < samples; c += (int)N)
138
704k
    {
139
704k
      auto val = hn::Add(vec_offset, hn::Load(d, src1 + c));
140
704k
      val = hn::Add(val, hn::Load(d, src2 + c));
141
704k
      val = hn::ShiftRight<2>(val);
142
704k
      hn::Store(hn::Sub(hn::Load(d, dst_in + c), val), d, dst_out + c);
143
704k
    }
144
29.6k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Line
Count
Source
132
29.6k
  {
133
29.6k
    const hn::ScalableTag<int32_t> d;
134
29.6k
    const size_t N = hn::Lanes(d);
135
29.6k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
136
29.6k
    int32_t *src1 = src[0], *src2 = src[1];
137
734k
    for(int c = 0; c < samples; c += (int)N)
138
704k
    {
139
704k
      auto val = hn::Add(vec_offset, hn::Load(d, src1 + c));
140
704k
      val = hn::Add(val, hn::Load(d, src2 + c));
141
704k
      val = hn::ShiftRight<2>(val);
142
704k
      hn::Store(hn::Sub(hn::Load(d, dst_in + c), val), d, dst_out + c);
143
704k
    }
144
29.6k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_32_5x3_synth_s1(int**, int*, int*, int, mercury_native::merc_lifting_step*)
145
146
  static void Impl_hlift_16_5x3_synth_s0(int16_t* src, int16_t* dst, int samples)
147
44.8k
  {
148
    // W5X3 step 0 is always downshift=1, icoeffs [-1,-1]
149
44.8k
    const hn::ScalableTag<int16_t> d;
150
44.8k
    const hn::ScalableTag<uint16_t> du;
151
44.8k
    const size_t N = hn::Lanes(d);
152
    // 17-bit-safe floor((a+b)/2): naive (a+b) wraps int16 (BIBO keeps a,b in
153
    // int16 but their SUM needs 17 bits). AverageRound in the biased-unsigned
154
    // domain yields (a+b+1)>>1 exactly; subtracting the odd bit ((a^b)&1) floors.
155
44.8k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
156
44.8k
    auto vec_one = hn::Set(d, (int16_t)1);
157
457k
    for(int c = 0; c < samples; c += (int)N)
158
412k
    {
159
412k
      auto a = hn::LoadU(d, src + c);
160
412k
      auto b = hn::LoadU(d, src + c + 1);
161
412k
      auto au = hn::BitCast(du, hn::Xor(a, msk_smin));
162
412k
      auto bu = hn::BitCast(du, hn::Xor(b, msk_smin));
163
412k
      auto avg = hn::Xor(hn::BitCast(d, hn::AverageRound(au, bu)), msk_smin);
164
412k
      auto m = hn::Sub(avg, hn::And(hn::Xor(a, b), vec_one));
165
412k
      hn::Store(hn::Add(hn::Load(d, dst + c), m), d, dst + c);
166
412k
    }
167
44.8k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
Line
Count
Source
147
44.8k
  {
148
    // W5X3 step 0 is always downshift=1, icoeffs [-1,-1]
149
44.8k
    const hn::ScalableTag<int16_t> d;
150
44.8k
    const hn::ScalableTag<uint16_t> du;
151
44.8k
    const size_t N = hn::Lanes(d);
152
    // 17-bit-safe floor((a+b)/2): naive (a+b) wraps int16 (BIBO keeps a,b in
153
    // int16 but their SUM needs 17 bits). AverageRound in the biased-unsigned
154
    // domain yields (a+b+1)>>1 exactly; subtracting the odd bit ((a^b)&1) floors.
155
44.8k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
156
44.8k
    auto vec_one = hn::Set(d, (int16_t)1);
157
457k
    for(int c = 0; c < samples; c += (int)N)
158
412k
    {
159
412k
      auto a = hn::LoadU(d, src + c);
160
412k
      auto b = hn::LoadU(d, src + c + 1);
161
412k
      auto au = hn::BitCast(du, hn::Xor(a, msk_smin));
162
412k
      auto bu = hn::BitCast(du, hn::Xor(b, msk_smin));
163
412k
      auto avg = hn::Xor(hn::BitCast(d, hn::AverageRound(au, bu)), msk_smin);
164
412k
      auto m = hn::Sub(avg, hn::And(hn::Xor(a, b), vec_one));
165
412k
      hn::Store(hn::Add(hn::Load(d, dst + c), m), d, dst + c);
166
412k
    }
167
44.8k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_16_5x3_synth_s0(short*, short*, int)
168
169
  static void Impl_hlift_16_5x3_synth_s1(int16_t* src, int16_t* dst, int samples)
170
44.9k
  {
171
44.9k
    const hn::ScalableTag<int16_t> d;
172
44.9k
    const hn::ScalableTag<uint16_t> du;
173
44.9k
    const size_t N = hn::Lanes(d);
174
44.9k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
175
44.9k
    auto msk_smax = hn::Set(d, (int16_t)0x7FFF);
176
456k
    for(int c = 0; c < samples; c += (int)N)
177
411k
    {
178
411k
      auto val1 = hn::Xor(hn::LoadU(d, src + c), msk_smin);
179
411k
      auto val2 = hn::Add(hn::LoadU(d, src + c + 1), msk_smax);
180
411k
      auto avg = hn::BitCast(d, hn::AverageRound(hn::BitCast(du, val1), hn::BitCast(du, val2)));
181
411k
      avg = hn::ShiftRight<1>(hn::Sub(avg, msk_smax));
182
411k
      hn::Store(hn::Sub(hn::Load(d, dst + c), avg), d, dst + c);
183
411k
    }
184
44.9k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
Line
Count
Source
170
44.9k
  {
171
44.9k
    const hn::ScalableTag<int16_t> d;
172
44.9k
    const hn::ScalableTag<uint16_t> du;
173
44.9k
    const size_t N = hn::Lanes(d);
174
44.9k
    auto msk_smin = hn::Set(d, (int16_t)0x8000u);
175
44.9k
    auto msk_smax = hn::Set(d, (int16_t)0x7FFF);
176
456k
    for(int c = 0; c < samples; c += (int)N)
177
411k
    {
178
411k
      auto val1 = hn::Xor(hn::LoadU(d, src + c), msk_smin);
179
411k
      auto val2 = hn::Add(hn::LoadU(d, src + c + 1), msk_smax);
180
411k
      auto avg = hn::BitCast(d, hn::AverageRound(hn::BitCast(du, val1), hn::BitCast(du, val2)));
181
411k
      avg = hn::ShiftRight<1>(hn::Sub(avg, msk_smax));
182
411k
      hn::Store(hn::Sub(hn::Load(d, dst + c), avg), d, dst + c);
183
411k
    }
184
44.9k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_16_5x3_synth_s1(short*, short*, int)
185
186
  /* int16 fixed-point 9/7 synthesis steps (Q13 samples). Constants and
187
   * saturation points must match mercury's dwt/fixed97.rs so the scalar
188
   * reference and these kernels stay bit-identical. Step 0 = α (applied
189
   * last), 1 = β, 2 = γ, 3 = δ. */
190
  static constexpr int16_t q13_coeff_3 = 14533; /* δ 0.443506852 in Q1.15 */
191
  static constexpr int16_t q13_coeff_2 = 28931; /* γ 0.882911075 in Q1.15 */
192
  static constexpr int16_t q13_coeff_1 = 13888; /* |β| 0.052980118 × 2^18 */
193
  static constexpr int16_t q13_coeff_0_frac = 19206; /* |α|−1 = 0.586134342 in Q1.15 */
194
195
  template<int STEP, class D, class V>
196
  static HWY_INLINE V q13_97_step(D d, V tgt, V n0, V n1)
197
8.43M
  {
198
    if constexpr(STEP == 0)
199
2.09M
    {
200
      /* α: |α| > 1 decomposes as tgt + sum + mf15(sum, |α|−1) */
201
2.09M
      auto sum = hn::SaturatedAdd(n0, n1);
202
2.09M
      auto frac = hn::MulFixedPoint15(sum, hn::Set(d, q13_coeff_0_frac));
203
2.09M
      return hn::SaturatedAdd(hn::SaturatedAdd(tgt, sum), frac);
204
    }
205
    else if constexpr(STEP == 1)
206
1.94M
    {
207
      /* β: multiply-first ×8 boost, wrapping product sum, ties-to-even >>3 */
208
1.94M
      auto coeff = hn::Set(d, q13_coeff_1);
209
1.94M
      auto products = hn::Add(hn::MulFixedPoint15(n0, coeff), hn::MulFixedPoint15(n1, coeff));
210
1.94M
      auto bias = hn::Add(hn::Set(d, (int16_t)3),
211
1.94M
                          hn::And(hn::ShiftRight<3>(products), hn::Set(d, (int16_t)1)));
212
1.94M
      return hn::SaturatedAdd(tgt, hn::ShiftRight<3>(hn::SaturatedAdd(products, bias)));
213
    }
214
    else
215
4.40M
    {
216
4.40M
      constexpr int16_t coeff = STEP == 2 ? q13_coeff_2 : q13_coeff_3;
217
4.40M
      return hn::SaturatedSub(tgt,
218
4.40M
                              hn::MulFixedPoint15(hn::SaturatedAdd(n0, n1), hn::Set(d, coeff)));
219
4.40M
    }
220
8.43M
  }
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_SPR::Vec512<short> mercury_native::N_AVX3_SPR::q13_97_step<0, hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short> >(hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_ZEN4::Vec512<short> mercury_native::N_AVX3_ZEN4::q13_97_step<0, hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short> >(hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_DL::Vec512<short> mercury_native::N_AVX3_DL::q13_97_step<0, hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short> >(hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3::Vec512<short> mercury_native::N_AVX3::q13_97_step<0, hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short> >(hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>)
hwy_dwt.cpp:hwy::N_AVX2::Vec256<short> mercury_native::N_AVX2::q13_97_step<0, hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short> >(hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>)
Line
Count
Source
197
2.09M
  {
198
    if constexpr(STEP == 0)
199
2.09M
    {
200
      /* α: |α| > 1 decomposes as tgt + sum + mf15(sum, |α|−1) */
201
2.09M
      auto sum = hn::SaturatedAdd(n0, n1);
202
2.09M
      auto frac = hn::MulFixedPoint15(sum, hn::Set(d, q13_coeff_0_frac));
203
2.09M
      return hn::SaturatedAdd(hn::SaturatedAdd(tgt, sum), frac);
204
    }
205
    else if constexpr(STEP == 1)
206
    {
207
      /* β: multiply-first ×8 boost, wrapping product sum, ties-to-even >>3 */
208
      auto coeff = hn::Set(d, q13_coeff_1);
209
      auto products = hn::Add(hn::MulFixedPoint15(n0, coeff), hn::MulFixedPoint15(n1, coeff));
210
      auto bias = hn::Add(hn::Set(d, (int16_t)3),
211
                          hn::And(hn::ShiftRight<3>(products), hn::Set(d, (int16_t)1)));
212
      return hn::SaturatedAdd(tgt, hn::ShiftRight<3>(hn::SaturatedAdd(products, bias)));
213
    }
214
    else
215
    {
216
      constexpr int16_t coeff = STEP == 2 ? q13_coeff_2 : q13_coeff_3;
217
      return hn::SaturatedSub(tgt,
218
                              hn::MulFixedPoint15(hn::SaturatedAdd(n0, n1), hn::Set(d, coeff)));
219
    }
220
2.09M
  }
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE4::Vec128<short, 8ul> mercury_native::N_SSE4::q13_97_step<0, hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul> >(hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSSE3::Vec128<short, 8ul> mercury_native::N_SSSE3::q13_97_step<0, hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul> >(hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE2::Vec128<short, 8ul> mercury_native::N_SSE2::q13_97_step<0, hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul> >(hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_SPR::Vec512<short> mercury_native::N_AVX3_SPR::q13_97_step<1, hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short> >(hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_ZEN4::Vec512<short> mercury_native::N_AVX3_ZEN4::q13_97_step<1, hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short> >(hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_DL::Vec512<short> mercury_native::N_AVX3_DL::q13_97_step<1, hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short> >(hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3::Vec512<short> mercury_native::N_AVX3::q13_97_step<1, hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short> >(hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>)
hwy_dwt.cpp:hwy::N_AVX2::Vec256<short> mercury_native::N_AVX2::q13_97_step<1, hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short> >(hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>)
Line
Count
Source
197
1.94M
  {
198
    if constexpr(STEP == 0)
199
    {
200
      /* α: |α| > 1 decomposes as tgt + sum + mf15(sum, |α|−1) */
201
      auto sum = hn::SaturatedAdd(n0, n1);
202
      auto frac = hn::MulFixedPoint15(sum, hn::Set(d, q13_coeff_0_frac));
203
      return hn::SaturatedAdd(hn::SaturatedAdd(tgt, sum), frac);
204
    }
205
    else if constexpr(STEP == 1)
206
1.94M
    {
207
      /* β: multiply-first ×8 boost, wrapping product sum, ties-to-even >>3 */
208
1.94M
      auto coeff = hn::Set(d, q13_coeff_1);
209
1.94M
      auto products = hn::Add(hn::MulFixedPoint15(n0, coeff), hn::MulFixedPoint15(n1, coeff));
210
1.94M
      auto bias = hn::Add(hn::Set(d, (int16_t)3),
211
1.94M
                          hn::And(hn::ShiftRight<3>(products), hn::Set(d, (int16_t)1)));
212
1.94M
      return hn::SaturatedAdd(tgt, hn::ShiftRight<3>(hn::SaturatedAdd(products, bias)));
213
    }
214
    else
215
    {
216
      constexpr int16_t coeff = STEP == 2 ? q13_coeff_2 : q13_coeff_3;
217
      return hn::SaturatedSub(tgt,
218
                              hn::MulFixedPoint15(hn::SaturatedAdd(n0, n1), hn::Set(d, coeff)));
219
    }
220
1.94M
  }
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE4::Vec128<short, 8ul> mercury_native::N_SSE4::q13_97_step<1, hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul> >(hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSSE3::Vec128<short, 8ul> mercury_native::N_SSSE3::q13_97_step<1, hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul> >(hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE2::Vec128<short, 8ul> mercury_native::N_SSE2::q13_97_step<1, hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul> >(hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_SPR::Vec512<short> mercury_native::N_AVX3_SPR::q13_97_step<2, hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short> >(hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_ZEN4::Vec512<short> mercury_native::N_AVX3_ZEN4::q13_97_step<2, hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short> >(hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_DL::Vec512<short> mercury_native::N_AVX3_DL::q13_97_step<2, hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short> >(hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3::Vec512<short> mercury_native::N_AVX3::q13_97_step<2, hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short> >(hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>)
hwy_dwt.cpp:hwy::N_AVX2::Vec256<short> mercury_native::N_AVX2::q13_97_step<2, hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short> >(hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>)
Line
Count
Source
197
2.20M
  {
198
    if constexpr(STEP == 0)
199
    {
200
      /* α: |α| > 1 decomposes as tgt + sum + mf15(sum, |α|−1) */
201
      auto sum = hn::SaturatedAdd(n0, n1);
202
      auto frac = hn::MulFixedPoint15(sum, hn::Set(d, q13_coeff_0_frac));
203
      return hn::SaturatedAdd(hn::SaturatedAdd(tgt, sum), frac);
204
    }
205
    else if constexpr(STEP == 1)
206
    {
207
      /* β: multiply-first ×8 boost, wrapping product sum, ties-to-even >>3 */
208
      auto coeff = hn::Set(d, q13_coeff_1);
209
      auto products = hn::Add(hn::MulFixedPoint15(n0, coeff), hn::MulFixedPoint15(n1, coeff));
210
      auto bias = hn::Add(hn::Set(d, (int16_t)3),
211
                          hn::And(hn::ShiftRight<3>(products), hn::Set(d, (int16_t)1)));
212
      return hn::SaturatedAdd(tgt, hn::ShiftRight<3>(hn::SaturatedAdd(products, bias)));
213
    }
214
    else
215
2.20M
    {
216
2.20M
      constexpr int16_t coeff = STEP == 2 ? q13_coeff_2 : q13_coeff_3;
217
2.20M
      return hn::SaturatedSub(tgt,
218
2.20M
                              hn::MulFixedPoint15(hn::SaturatedAdd(n0, n1), hn::Set(d, coeff)));
219
2.20M
    }
220
2.20M
  }
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE4::Vec128<short, 8ul> mercury_native::N_SSE4::q13_97_step<2, hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul> >(hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSSE3::Vec128<short, 8ul> mercury_native::N_SSSE3::q13_97_step<2, hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul> >(hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE2::Vec128<short, 8ul> mercury_native::N_SSE2::q13_97_step<2, hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul> >(hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_SPR::Vec512<short> mercury_native::N_AVX3_SPR::q13_97_step<3, hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short> >(hwy::N_AVX3_SPR::Simd<short, 32ul, 0>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>, hwy::N_AVX3_SPR::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_ZEN4::Vec512<short> mercury_native::N_AVX3_ZEN4::q13_97_step<3, hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short> >(hwy::N_AVX3_ZEN4::Simd<short, 32ul, 0>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>, hwy::N_AVX3_ZEN4::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3_DL::Vec512<short> mercury_native::N_AVX3_DL::q13_97_step<3, hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short> >(hwy::N_AVX3_DL::Simd<short, 32ul, 0>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>, hwy::N_AVX3_DL::Vec512<short>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_AVX3::Vec512<short> mercury_native::N_AVX3::q13_97_step<3, hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short> >(hwy::N_AVX3::Simd<short, 32ul, 0>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>, hwy::N_AVX3::Vec512<short>)
hwy_dwt.cpp:hwy::N_AVX2::Vec256<short> mercury_native::N_AVX2::q13_97_step<3, hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short> >(hwy::N_AVX2::Simd<short, 16ul, 0>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>, hwy::N_AVX2::Vec256<short>)
Line
Count
Source
197
2.19M
  {
198
    if constexpr(STEP == 0)
199
    {
200
      /* α: |α| > 1 decomposes as tgt + sum + mf15(sum, |α|−1) */
201
      auto sum = hn::SaturatedAdd(n0, n1);
202
      auto frac = hn::MulFixedPoint15(sum, hn::Set(d, q13_coeff_0_frac));
203
      return hn::SaturatedAdd(hn::SaturatedAdd(tgt, sum), frac);
204
    }
205
    else if constexpr(STEP == 1)
206
    {
207
      /* β: multiply-first ×8 boost, wrapping product sum, ties-to-even >>3 */
208
      auto coeff = hn::Set(d, q13_coeff_1);
209
      auto products = hn::Add(hn::MulFixedPoint15(n0, coeff), hn::MulFixedPoint15(n1, coeff));
210
      auto bias = hn::Add(hn::Set(d, (int16_t)3),
211
                          hn::And(hn::ShiftRight<3>(products), hn::Set(d, (int16_t)1)));
212
      return hn::SaturatedAdd(tgt, hn::ShiftRight<3>(hn::SaturatedAdd(products, bias)));
213
    }
214
    else
215
2.19M
    {
216
2.19M
      constexpr int16_t coeff = STEP == 2 ? q13_coeff_2 : q13_coeff_3;
217
2.19M
      return hn::SaturatedSub(tgt,
218
2.19M
                              hn::MulFixedPoint15(hn::SaturatedAdd(n0, n1), hn::Set(d, coeff)));
219
2.19M
    }
220
2.19M
  }
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE4::Vec128<short, 8ul> mercury_native::N_SSE4::q13_97_step<3, hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul> >(hwy::N_SSE4::Simd<short, 8ul, 0>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>, hwy::N_SSE4::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSSE3::Vec128<short, 8ul> mercury_native::N_SSSE3::q13_97_step<3, hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul> >(hwy::N_SSSE3::Simd<short, 8ul, 0>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>, hwy::N_SSSE3::Vec128<short, 8ul>)
Unexecuted instantiation: hwy_dwt.cpp:hwy::N_SSE2::Vec128<short, 8ul> mercury_native::N_SSE2::q13_97_step<3, hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul> >(hwy::N_SSE2::Simd<short, 8ul, 0>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>, hwy::N_SSE2::Vec128<short, 8ul>)
221
222
  template<int STEP>
223
  static HWY_INLINE void vlift_16_97(int16_t** src, int16_t* dst_in, int16_t* dst_out, int samples)
224
802k
  {
225
802k
    const hn::ScalableTag<int16_t> d;
226
802k
    const size_t N = hn::Lanes(d);
227
802k
    int16_t *s0 = src[0], *s1 = src[1];
228
5.20M
    for(int c = 0; c < samples; c += (int)N)
229
4.40M
    {
230
4.40M
      auto v =
231
4.40M
          q13_97_step<STEP>(d, hn::Load(d, dst_in + c), hn::Load(d, s0 + c), hn::Load(d, s1 + c));
232
4.40M
      hn::Store(v, d, dst_out + c);
233
4.40M
    }
234
802k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::vlift_16_97<0>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::vlift_16_97<0>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::vlift_16_97<0>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::vlift_16_97<0>(short**, short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::vlift_16_97<0>(short**, short*, short*, int)
Line
Count
Source
224
200k
  {
225
200k
    const hn::ScalableTag<int16_t> d;
226
200k
    const size_t N = hn::Lanes(d);
227
200k
    int16_t *s0 = src[0], *s1 = src[1];
228
1.31M
    for(int c = 0; c < samples; c += (int)N)
229
1.11M
    {
230
1.11M
      auto v =
231
1.11M
          q13_97_step<STEP>(d, hn::Load(d, dst_in + c), hn::Load(d, s0 + c), hn::Load(d, s1 + c));
232
1.11M
      hn::Store(v, d, dst_out + c);
233
1.11M
    }
234
200k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::vlift_16_97<0>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::vlift_16_97<0>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::vlift_16_97<0>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::vlift_16_97<1>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::vlift_16_97<1>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::vlift_16_97<1>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::vlift_16_97<1>(short**, short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::vlift_16_97<1>(short**, short*, short*, int)
Line
Count
Source
224
200k
  {
225
200k
    const hn::ScalableTag<int16_t> d;
226
200k
    const size_t N = hn::Lanes(d);
227
200k
    int16_t *s0 = src[0], *s1 = src[1];
228
1.26M
    for(int c = 0; c < samples; c += (int)N)
229
1.06M
    {
230
1.06M
      auto v =
231
1.06M
          q13_97_step<STEP>(d, hn::Load(d, dst_in + c), hn::Load(d, s0 + c), hn::Load(d, s1 + c));
232
1.06M
      hn::Store(v, d, dst_out + c);
233
1.06M
    }
234
200k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::vlift_16_97<1>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::vlift_16_97<1>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::vlift_16_97<1>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::vlift_16_97<2>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::vlift_16_97<2>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::vlift_16_97<2>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::vlift_16_97<2>(short**, short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::vlift_16_97<2>(short**, short*, short*, int)
Line
Count
Source
224
199k
  {
225
199k
    const hn::ScalableTag<int16_t> d;
226
199k
    const size_t N = hn::Lanes(d);
227
199k
    int16_t *s0 = src[0], *s1 = src[1];
228
1.30M
    for(int c = 0; c < samples; c += (int)N)
229
1.10M
    {
230
1.10M
      auto v =
231
1.10M
          q13_97_step<STEP>(d, hn::Load(d, dst_in + c), hn::Load(d, s0 + c), hn::Load(d, s1 + c));
232
1.10M
      hn::Store(v, d, dst_out + c);
233
1.10M
    }
234
199k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::vlift_16_97<2>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::vlift_16_97<2>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::vlift_16_97<2>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::vlift_16_97<3>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::vlift_16_97<3>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::vlift_16_97<3>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::vlift_16_97<3>(short**, short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::vlift_16_97<3>(short**, short*, short*, int)
Line
Count
Source
224
200k
  {
225
200k
    const hn::ScalableTag<int16_t> d;
226
200k
    const size_t N = hn::Lanes(d);
227
200k
    int16_t *s0 = src[0], *s1 = src[1];
228
1.31M
    for(int c = 0; c < samples; c += (int)N)
229
1.11M
    {
230
1.11M
      auto v =
231
1.11M
          q13_97_step<STEP>(d, hn::Load(d, dst_in + c), hn::Load(d, s0 + c), hn::Load(d, s1 + c));
232
1.11M
      hn::Store(v, d, dst_out + c);
233
1.11M
    }
234
200k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::vlift_16_97<3>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::vlift_16_97<3>(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::vlift_16_97<3>(short**, short*, short*, int)
235
236
  template<int STEP>
237
  static HWY_INLINE void hlift_16_97(int16_t* src, int16_t* dst, int samples)
238
806k
  {
239
806k
    const hn::ScalableTag<int16_t> d;
240
806k
    const size_t N = hn::Lanes(d);
241
5.17M
    for(int c = 0; c < samples; c += (int)N)
242
4.37M
    {
243
4.37M
      auto v = q13_97_step<STEP>(d, hn::Load(d, dst + c), hn::LoadU(d, src + c),
244
4.37M
                                 hn::LoadU(d, src + c + 1));
245
4.37M
      hn::Store(v, d, dst + c);
246
4.37M
    }
247
806k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::hlift_16_97<0>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::hlift_16_97<0>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::hlift_16_97<0>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::hlift_16_97<0>(short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::hlift_16_97<0>(short*, short*, int)
Line
Count
Source
238
201k
  {
239
201k
    const hn::ScalableTag<int16_t> d;
240
201k
    const size_t N = hn::Lanes(d);
241
1.31M
    for(int c = 0; c < samples; c += (int)N)
242
1.11M
    {
243
1.11M
      auto v = q13_97_step<STEP>(d, hn::Load(d, dst + c), hn::LoadU(d, src + c),
244
1.11M
                                 hn::LoadU(d, src + c + 1));
245
1.11M
      hn::Store(v, d, dst + c);
246
1.11M
    }
247
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::hlift_16_97<0>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::hlift_16_97<0>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::hlift_16_97<0>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::hlift_16_97<1>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::hlift_16_97<1>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::hlift_16_97<1>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::hlift_16_97<1>(short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::hlift_16_97<1>(short*, short*, int)
Line
Count
Source
238
202k
  {
239
202k
    const hn::ScalableTag<int16_t> d;
240
202k
    const size_t N = hn::Lanes(d);
241
1.26M
    for(int c = 0; c < samples; c += (int)N)
242
1.06M
    {
243
1.06M
      auto v = q13_97_step<STEP>(d, hn::Load(d, dst + c), hn::LoadU(d, src + c),
244
1.06M
                                 hn::LoadU(d, src + c + 1));
245
1.06M
      hn::Store(v, d, dst + c);
246
1.06M
    }
247
202k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::hlift_16_97<1>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::hlift_16_97<1>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::hlift_16_97<1>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::hlift_16_97<2>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::hlift_16_97<2>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::hlift_16_97<2>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::hlift_16_97<2>(short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::hlift_16_97<2>(short*, short*, int)
Line
Count
Source
238
201k
  {
239
201k
    const hn::ScalableTag<int16_t> d;
240
201k
    const size_t N = hn::Lanes(d);
241
1.30M
    for(int c = 0; c < samples; c += (int)N)
242
1.10M
    {
243
1.10M
      auto v = q13_97_step<STEP>(d, hn::Load(d, dst + c), hn::LoadU(d, src + c),
244
1.10M
                                 hn::LoadU(d, src + c + 1));
245
1.10M
      hn::Store(v, d, dst + c);
246
1.10M
    }
247
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::hlift_16_97<2>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::hlift_16_97<2>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::hlift_16_97<2>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_SPR::hlift_16_97<3>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_ZEN4::hlift_16_97<3>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3_DL::hlift_16_97<3>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_AVX3::hlift_16_97<3>(short*, short*, int)
hwy_dwt.cpp:void mercury_native::N_AVX2::hlift_16_97<3>(short*, short*, int)
Line
Count
Source
238
201k
  {
239
201k
    const hn::ScalableTag<int16_t> d;
240
201k
    const size_t N = hn::Lanes(d);
241
1.29M
    for(int c = 0; c < samples; c += (int)N)
242
1.09M
    {
243
1.09M
      auto v = q13_97_step<STEP>(d, hn::Load(d, dst + c), hn::LoadU(d, src + c),
244
1.09M
                                 hn::LoadU(d, src + c + 1));
245
1.09M
      hn::Store(v, d, dst + c);
246
1.09M
    }
247
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE4::hlift_16_97<3>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSSE3::hlift_16_97<3>(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:void mercury_native::N_SSE2::hlift_16_97<3>(short*, short*, int)
248
249
  /* HWY_EXPORT needs plain function names, so the four steps are expanded. */
250
  static void Impl_vlift_16_97_s0(int16_t** s, int16_t* di, int16_t* d_o, int n)
251
201k
  {
252
201k
    vlift_16_97<0>(s, di, d_o, n);
253
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_16_97_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_16_97_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_16_97_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_16_97_s0(short**, short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_16_97_s0(short**, short*, short*, int)
Line
Count
Source
251
201k
  {
252
201k
    vlift_16_97<0>(s, di, d_o, n);
253
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_16_97_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_16_97_s0(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_16_97_s0(short**, short*, short*, int)
254
  static void Impl_vlift_16_97_s1(int16_t** s, int16_t* di, int16_t* d_o, int n)
255
201k
  {
256
201k
    vlift_16_97<1>(s, di, d_o, n);
257
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_16_97_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_16_97_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_16_97_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_16_97_s1(short**, short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_16_97_s1(short**, short*, short*, int)
Line
Count
Source
255
201k
  {
256
201k
    vlift_16_97<1>(s, di, d_o, n);
257
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_16_97_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_16_97_s1(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_16_97_s1(short**, short*, short*, int)
258
  static void Impl_vlift_16_97_s2(int16_t** s, int16_t* di, int16_t* d_o, int n)
259
200k
  {
260
200k
    vlift_16_97<2>(s, di, d_o, n);
261
200k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_16_97_s2(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_16_97_s2(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_16_97_s2(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_16_97_s2(short**, short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_16_97_s2(short**, short*, short*, int)
Line
Count
Source
259
200k
  {
260
200k
    vlift_16_97<2>(s, di, d_o, n);
261
200k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_16_97_s2(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_16_97_s2(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_16_97_s2(short**, short*, short*, int)
262
  static void Impl_vlift_16_97_s3(int16_t** s, int16_t* di, int16_t* d_o, int n)
263
201k
  {
264
201k
    vlift_16_97<3>(s, di, d_o, n);
265
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_vlift_16_97_s3(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_vlift_16_97_s3(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_vlift_16_97_s3(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_vlift_16_97_s3(short**, short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_vlift_16_97_s3(short**, short*, short*, int)
Line
Count
Source
263
201k
  {
264
201k
    vlift_16_97<3>(s, di, d_o, n);
265
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_vlift_16_97_s3(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_vlift_16_97_s3(short**, short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_vlift_16_97_s3(short**, short*, short*, int)
266
  static void Impl_hlift_16_97_s0(int16_t* s, int16_t* d, int n)
267
201k
  {
268
201k
    hlift_16_97<0>(s, d, n);
269
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_16_97_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_16_97_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_16_97_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_16_97_s0(short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_16_97_s0(short*, short*, int)
Line
Count
Source
267
201k
  {
268
201k
    hlift_16_97<0>(s, d, n);
269
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_16_97_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_16_97_s0(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_16_97_s0(short*, short*, int)
270
  static void Impl_hlift_16_97_s1(int16_t* s, int16_t* d, int n)
271
202k
  {
272
202k
    hlift_16_97<1>(s, d, n);
273
202k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_16_97_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_16_97_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_16_97_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_16_97_s1(short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_16_97_s1(short*, short*, int)
Line
Count
Source
271
202k
  {
272
202k
    hlift_16_97<1>(s, d, n);
273
202k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_16_97_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_16_97_s1(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_16_97_s1(short*, short*, int)
274
  static void Impl_hlift_16_97_s2(int16_t* s, int16_t* d, int n)
275
201k
  {
276
201k
    hlift_16_97<2>(s, d, n);
277
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_16_97_s2(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_16_97_s2(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_16_97_s2(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_16_97_s2(short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_16_97_s2(short*, short*, int)
Line
Count
Source
275
201k
  {
276
201k
    hlift_16_97<2>(s, d, n);
277
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_16_97_s2(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_16_97_s2(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_16_97_s2(short*, short*, int)
278
  static void Impl_hlift_16_97_s3(int16_t* s, int16_t* d, int n)
279
201k
  {
280
201k
    hlift_16_97<3>(s, d, n);
281
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_16_97_s3(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_16_97_s3(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_16_97_s3(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_16_97_s3(short*, short*, int)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_16_97_s3(short*, short*, int)
Line
Count
Source
279
201k
  {
280
201k
    hlift_16_97<3>(s, d, n);
281
201k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_16_97_s3(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_16_97_s3(short*, short*, int)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_16_97_s3(short*, short*, int)
282
283
  static void Impl_hlift_32_2tap_irrev(int32_t* src, int32_t* dst, int samples,
284
                                       merc_lifting_step* step)
285
308k
  {
286
308k
    const hn::ScalableTag<float> df;
287
308k
    const size_t N = hn::Lanes(df);
288
308k
    const float sign = -1.0f; // synthesis negates the lifting coeffs
289
308k
    auto vl0 = hn::Set(df, sign * step->coeffs[0]);
290
308k
    auto vl1 = hn::Set(df, sign * ((step->support_length == 2) ? step->coeffs[1] : 0.0f));
291
308k
    float* sp = (float*)src;
292
3.29M
    for(int c = 0; c < samples; c += (int)N)
293
2.98M
    {
294
2.98M
      auto tgt = hn::Load(df, (float*)dst + c);
295
2.98M
      tgt = hn::MulAdd(hn::LoadU(df, sp + c), vl0, tgt);
296
2.98M
      tgt = hn::MulAdd(hn::LoadU(df, sp + c + 1), vl1, tgt);
297
2.98M
      hn::Store(tgt, df, (float*)dst + c);
298
2.98M
    }
299
308k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
Line
Count
Source
285
308k
  {
286
308k
    const hn::ScalableTag<float> df;
287
308k
    const size_t N = hn::Lanes(df);
288
308k
    const float sign = -1.0f; // synthesis negates the lifting coeffs
289
308k
    auto vl0 = hn::Set(df, sign * step->coeffs[0]);
290
308k
    auto vl1 = hn::Set(df, sign * ((step->support_length == 2) ? step->coeffs[1] : 0.0f));
291
308k
    float* sp = (float*)src;
292
3.29M
    for(int c = 0; c < samples; c += (int)N)
293
2.98M
    {
294
2.98M
      auto tgt = hn::Load(df, (float*)dst + c);
295
2.98M
      tgt = hn::MulAdd(hn::LoadU(df, sp + c), vl0, tgt);
296
2.98M
      tgt = hn::MulAdd(hn::LoadU(df, sp + c + 1), vl1, tgt);
297
2.98M
      hn::Store(tgt, df, (float*)dst + c);
298
2.98M
    }
299
308k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_32_2tap_irrev(int*, int*, int, mercury_native::merc_lifting_step*)
300
301
  static void Impl_hlift_32_5x3_synth_s0(int32_t* src, int32_t* dst, int samples,
302
                                         merc_lifting_step* step)
303
29.7k
  {
304
29.7k
    const hn::ScalableTag<int32_t> d;
305
29.7k
    const size_t N = hn::Lanes(d);
306
29.7k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
307
732k
    for(int c = 0; c < samples; c += (int)N)
308
703k
    {
309
703k
      auto val = hn::Sub(vec_offset, hn::LoadU(d, src + c));
310
703k
      val = hn::Sub(val, hn::LoadU(d, src + c + 1));
311
703k
      val = hn::ShiftRight<1>(val);
312
703k
      hn::Store(hn::Sub(hn::Load(d, dst + c), val), d, dst + c);
313
703k
    }
314
29.7k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
Line
Count
Source
303
29.7k
  {
304
29.7k
    const hn::ScalableTag<int32_t> d;
305
29.7k
    const size_t N = hn::Lanes(d);
306
29.7k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
307
732k
    for(int c = 0; c < samples; c += (int)N)
308
703k
    {
309
703k
      auto val = hn::Sub(vec_offset, hn::LoadU(d, src + c));
310
703k
      val = hn::Sub(val, hn::LoadU(d, src + c + 1));
311
703k
      val = hn::ShiftRight<1>(val);
312
703k
      hn::Store(hn::Sub(hn::Load(d, dst + c), val), d, dst + c);
313
703k
    }
314
29.7k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_32_5x3_synth_s0(int*, int*, int, mercury_native::merc_lifting_step*)
315
316
  static void Impl_hlift_32_5x3_synth_s1(int32_t* src, int32_t* dst, int samples,
317
                                         merc_lifting_step* step)
318
29.7k
  {
319
29.7k
    const hn::ScalableTag<int32_t> d;
320
29.7k
    const size_t N = hn::Lanes(d);
321
29.7k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
322
737k
    for(int c = 0; c < samples; c += (int)N)
323
707k
    {
324
707k
      auto val = hn::Add(hn::LoadU(d, src + c), vec_offset);
325
707k
      val = hn::Add(val, hn::LoadU(d, src + c + 1));
326
707k
      val = hn::ShiftRight<2>(val);
327
707k
      hn::Store(hn::Sub(hn::Load(d, dst + c), val), d, dst + c);
328
707k
    }
329
29.7k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_SPR::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_ZEN4::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3_DL::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_AVX3::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
hwy_dwt.cpp:mercury_native::N_AVX2::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
Line
Count
Source
318
29.7k
  {
319
29.7k
    const hn::ScalableTag<int32_t> d;
320
29.7k
    const size_t N = hn::Lanes(d);
321
29.7k
    auto vec_offset = hn::Set(d, (int32_t)((1 << step->downshift) >> 1));
322
737k
    for(int c = 0; c < samples; c += (int)N)
323
707k
    {
324
707k
      auto val = hn::Add(hn::LoadU(d, src + c), vec_offset);
325
707k
      val = hn::Add(val, hn::LoadU(d, src + c + 1));
326
707k
      val = hn::ShiftRight<2>(val);
327
707k
      hn::Store(hn::Sub(hn::Load(d, dst + c), val), d, dst + c);
328
707k
    }
329
29.7k
  }
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE4::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSSE3::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
Unexecuted instantiation: hwy_dwt.cpp:mercury_native::N_SSE2::Impl_hlift_32_5x3_synth_s1(int*, int*, int, mercury_native::merc_lifting_step*)
330
331
} // namespace HWY_NAMESPACE
332
} // namespace mercury_native
333
HWY_AFTER_NAMESPACE();
334
335
// ═══════════════════════════════════════════════════════════════════════════════
336
// Public API wrappers (only compiled once)
337
// ═══════════════════════════════════════════════════════════════════════════════
338
339
#if HWY_ONCE
340
namespace mercury_native
341
{
342
343
HWY_EXPORT(Impl_lanes_32);
344
HWY_EXPORT(Impl_interleave_16);
345
HWY_EXPORT(Impl_interleave_32);
346
HWY_EXPORT(Impl_vlift_16_5x3_synth_s0);
347
HWY_EXPORT(Impl_vlift_16_5x3_synth_s1);
348
HWY_EXPORT(Impl_vlift_32_2tap_irrev);
349
HWY_EXPORT(Impl_vlift_32_5x3_synth_s0);
350
HWY_EXPORT(Impl_vlift_32_5x3_synth_s1);
351
HWY_EXPORT(Impl_hlift_16_5x3_synth_s0);
352
HWY_EXPORT(Impl_hlift_16_5x3_synth_s1);
353
HWY_EXPORT(Impl_vlift_16_97_s0);
354
HWY_EXPORT(Impl_vlift_16_97_s1);
355
HWY_EXPORT(Impl_vlift_16_97_s2);
356
HWY_EXPORT(Impl_vlift_16_97_s3);
357
HWY_EXPORT(Impl_hlift_16_97_s0);
358
HWY_EXPORT(Impl_hlift_16_97_s1);
359
HWY_EXPORT(Impl_hlift_16_97_s2);
360
HWY_EXPORT(Impl_hlift_16_97_s3);
361
HWY_EXPORT(Impl_hlift_32_2tap_irrev);
362
HWY_EXPORT(Impl_hlift_32_5x3_synth_s0);
363
HWY_EXPORT(Impl_hlift_32_5x3_synth_s1);
364
365
int hwy_lanes_32()
366
1
{
367
1
  return HWY_DYNAMIC_DISPATCH(Impl_lanes_32)();
368
1
}
369
void hwy_interleave_16(int16_t* s1, int16_t* s2, int16_t* d, int p)
370
251k
{
371
251k
  HWY_DYNAMIC_DISPATCH(Impl_interleave_16)(s1, s2, d, p);
372
251k
}
373
void hwy_interleave_32(int32_t* s1, int32_t* s2, int32_t* d, int p)
374
115k
{
375
115k
  HWY_DYNAMIC_DISPATCH(Impl_interleave_32)(s1, s2, d, p);
376
115k
}
377
void hwy_vlift_16_5x3_synth_s0(int16_t** s, int16_t* di, int16_t* d_o, int n)
378
45.3k
{
379
45.3k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_16_5x3_synth_s0)(s, di, d_o, n);
380
45.3k
}
381
void hwy_vlift_16_5x3_synth_s1(int16_t** s, int16_t* di, int16_t* d_o, int n)
382
45.3k
{
383
45.3k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_16_5x3_synth_s1)(s, di, d_o, n);
384
45.3k
}
385
void hwy_vlift_32_2tap_irrev(int32_t** s, int32_t* di, int32_t* d_o, int n, merc_lifting_step* st)
386
323k
{
387
323k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_32_2tap_irrev)(s, di, d_o, n, st);
388
323k
}
389
void hwy_vlift_32_5x3_synth_s0(int32_t** s, int32_t* di, int32_t* d_o, int n, merc_lifting_step* st)
390
29.6k
{
391
29.6k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_32_5x3_synth_s0)(s, di, d_o, n, st);
392
29.6k
}
393
void hwy_vlift_32_5x3_synth_s1(int32_t** s, int32_t* di, int32_t* d_o, int n, merc_lifting_step* st)
394
29.8k
{
395
29.8k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_32_5x3_synth_s1)(s, di, d_o, n, st);
396
29.8k
}
397
void hwy_vlift_16_97_s0(int16_t** s, int16_t* di, int16_t* d_o, int n)
398
205k
{
399
205k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_16_97_s0)(s, di, d_o, n);
400
205k
}
401
void hwy_vlift_16_97_s1(int16_t** s, int16_t* di, int16_t* d_o, int n)
402
205k
{
403
205k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_16_97_s1)(s, di, d_o, n);
404
205k
}
405
void hwy_vlift_16_97_s2(int16_t** s, int16_t* di, int16_t* d_o, int n)
406
205k
{
407
205k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_16_97_s2)(s, di, d_o, n);
408
205k
}
409
void hwy_vlift_16_97_s3(int16_t** s, int16_t* di, int16_t* d_o, int n)
410
205k
{
411
205k
  HWY_DYNAMIC_DISPATCH(Impl_vlift_16_97_s3)(s, di, d_o, n);
412
205k
}
413
void hwy_hlift_16_97_s0(int16_t* s, int16_t* d, int n)
414
205k
{
415
205k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_16_97_s0)(s, d, n);
416
205k
}
417
void hwy_hlift_16_97_s1(int16_t* s, int16_t* d, int n)
418
206k
{
419
206k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_16_97_s1)(s, d, n);
420
206k
}
421
void hwy_hlift_16_97_s2(int16_t* s, int16_t* d, int n)
422
205k
{
423
205k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_16_97_s2)(s, d, n);
424
205k
}
425
void hwy_hlift_16_97_s3(int16_t* s, int16_t* d, int n)
426
206k
{
427
206k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_16_97_s3)(s, d, n);
428
206k
}
429
void hwy_hlift_16_5x3_synth_s0(int16_t* s, int16_t* d, int n)
430
45.3k
{
431
45.3k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_16_5x3_synth_s0)(s, d, n);
432
45.3k
}
433
void hwy_hlift_16_5x3_synth_s1(int16_t* s, int16_t* d, int n)
434
45.4k
{
435
45.4k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_16_5x3_synth_s1)(s, d, n);
436
45.4k
}
437
void hwy_hlift_32_2tap_irrev(int32_t* s, int32_t* d, int n, merc_lifting_step* st)
438
327k
{
439
327k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_32_2tap_irrev)(s, d, n, st);
440
327k
}
441
void hwy_hlift_32_5x3_synth_s0(int32_t* s, int32_t* d, int n, merc_lifting_step* st)
442
29.9k
{
443
29.9k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_32_5x3_synth_s0)(s, d, n, st);
444
29.9k
}
445
void hwy_hlift_32_5x3_synth_s1(int32_t* s, int32_t* d, int n, merc_lifting_step* st)
446
29.9k
{
447
29.9k
  HWY_DYNAMIC_DISPATCH(Impl_hlift_32_5x3_synth_s1)(s, d, n, st);
448
29.9k
}
449
} // namespace mercury_native
450
#endif