Coverage Report

Created: 2025-07-18 06:52

/src/fftw3/rdft/scalar/r2cb/hc2cbdft_2.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2003, 2007-14 Matteo Frigo
3
 * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation; either version 2 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
 *
19
 */
20
21
/* This file was automatically generated --- DO NOT EDIT */
22
/* Generated on Fri Jul 18 06:51:54 UTC 2025 */
23
24
#include "rdft/codelet-rdft.h"
25
26
#if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA)
27
28
/* Generated by: ../../../genfft/gen_hc2cdft.native -fma -compact -variables 4 -pipeline-latency 4 -sign 1 -n 2 -dif -name hc2cbdft_2 -include rdft/scalar/hc2cb.h */
29
30
/*
31
 * This function contains 10 FP additions, 4 FP multiplications,
32
 * (or, 8 additions, 2 multiplications, 2 fused multiply/add),
33
 * 15 stack variables, 0 constants, and 8 memory accesses
34
 */
35
#include "rdft/scalar/hc2cb.h"
36
37
static void hc2cbdft_2(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms)
38
{
39
     {
40
    INT m;
41
    for (m = mb, W = W + ((mb - 1) * 2); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 2, MAKE_VOLATILE_STRIDE(8, rs)) {
42
         E T3, Ta, Tc, T9, Td, T4, T8, Tb, Te;
43
         {
44
        E T1, T2, T5, T6, T7;
45
        T1 = Ip[0];
46
        T2 = Im[0];
47
        T3 = T1 - T2;
48
        Ta = T1 + T2;
49
        T5 = Rp[0];
50
        T6 = Rm[0];
51
        T7 = T5 - T6;
52
        Tc = T5 + T6;
53
        T9 = W[1];
54
        Td = T9 * T7;
55
        T4 = W[0];
56
        T8 = T4 * T7;
57
         }
58
         Tb = FNMS(T9, Ta, T8);
59
         Ip[0] = T3 + Tb;
60
         Im[0] = Tb - T3;
61
         Te = FMA(T4, Ta, Td);
62
         Rp[0] = Tc - Te;
63
         Rm[0] = Tc + Te;
64
    }
65
     }
66
}
67
68
static const tw_instr twinstr[] = {
69
     { TW_FULL, 1, 2 },
70
     { TW_NEXT, 1, 0 }
71
};
72
73
static const hc2c_desc desc = { 2, "hc2cbdft_2", twinstr, &GENUS, { 8, 2, 2, 0 } };
74
75
void X(codelet_hc2cbdft_2) (planner *p) {
76
     X(khc2c_register) (p, hc2cbdft_2, &desc, HC2C_VIA_DFT);
77
}
78
#else
79
80
/* Generated by: ../../../genfft/gen_hc2cdft.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 2 -dif -name hc2cbdft_2 -include rdft/scalar/hc2cb.h */
81
82
/*
83
 * This function contains 10 FP additions, 4 FP multiplications,
84
 * (or, 8 additions, 2 multiplications, 2 fused multiply/add),
85
 * 9 stack variables, 0 constants, and 8 memory accesses
86
 */
87
#include "rdft/scalar/hc2cb.h"
88
89
static void hc2cbdft_2(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms)
90
0
{
91
0
     {
92
0
    INT m;
93
0
    for (m = mb, W = W + ((mb - 1) * 2); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 2, MAKE_VOLATILE_STRIDE(8, rs)) {
94
0
         E T3, T9, T7, Tb;
95
0
         {
96
0
        E T1, T2, T5, T6;
97
0
        T1 = Ip[0];
98
0
        T2 = Im[0];
99
0
        T3 = T1 - T2;
100
0
        T9 = T1 + T2;
101
0
        T5 = Rp[0];
102
0
        T6 = Rm[0];
103
0
        T7 = T5 - T6;
104
0
        Tb = T5 + T6;
105
0
         }
106
0
         {
107
0
        E Ta, Tc, T4, T8;
108
0
        T4 = W[0];
109
0
        T8 = W[1];
110
0
        Ta = FNMS(T8, T9, T4 * T7);
111
0
        Tc = FMA(T8, T7, T4 * T9);
112
0
        Ip[0] = T3 + Ta;
113
0
        Rp[0] = Tb - Tc;
114
0
        Im[0] = Ta - T3;
115
0
        Rm[0] = Tb + Tc;
116
0
         }
117
0
    }
118
0
     }
119
0
}
120
121
static const tw_instr twinstr[] = {
122
     { TW_FULL, 1, 2 },
123
     { TW_NEXT, 1, 0 }
124
};
125
126
static const hc2c_desc desc = { 2, "hc2cbdft_2", twinstr, &GENUS, { 8, 2, 2, 0 } };
127
128
1
void X(codelet_hc2cbdft_2) (planner *p) {
129
1
     X(khc2c_register) (p, hc2cbdft_2, &desc, HC2C_VIA_DFT);
130
1
}
131
#endif