Coverage Report

Created: 2024-09-08 06:43

/src/fftw3/rdft/scalar/r2cb/r2cb_8.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 Sun Sep  8 06:42:07 UTC 2024 */
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_r2cb.native -fma -compact -variables 4 -pipeline-latency 4 -sign 1 -n 8 -name r2cb_8 -include rdft/scalar/r2cb.h */
29
30
/*
31
 * This function contains 20 FP additions, 12 FP multiplications,
32
 * (or, 8 additions, 0 multiplications, 12 fused multiply/add),
33
 * 19 stack variables, 2 constants, and 16 memory accesses
34
 */
35
#include "rdft/scalar/r2cb.h"
36
37
static void r2cb_8(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
38
{
39
     DK(KP1_414213562, +1.414213562373095048801688724209698078569671875);
40
     DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
41
     {
42
    INT i;
43
    for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(32, rs), MAKE_VOLATILE_STRIDE(32, csr), MAKE_VOLATILE_STRIDE(32, csi)) {
44
         E T4, Ta, T3, T9, T8, Tc, Tf, Tk, T1, T2, T5, Tj;
45
         T4 = Cr[WS(csr, 2)];
46
         Ta = Ci[WS(csi, 2)];
47
         T1 = Cr[0];
48
         T2 = Cr[WS(csr, 4)];
49
         T3 = T1 + T2;
50
         T9 = T1 - T2;
51
         {
52
        E T6, T7, Td, Te;
53
        T6 = Cr[WS(csr, 1)];
54
        T7 = Cr[WS(csr, 3)];
55
        T8 = T6 + T7;
56
        Tc = T6 - T7;
57
        Td = Ci[WS(csi, 1)];
58
        Te = Ci[WS(csi, 3)];
59
        Tf = Td + Te;
60
        Tk = Td - Te;
61
         }
62
         T5 = FMA(KP2_000000000, T4, T3);
63
         R0[WS(rs, 2)] = FNMS(KP2_000000000, T8, T5);
64
         R0[0] = FMA(KP2_000000000, T8, T5);
65
         Tj = FNMS(KP2_000000000, T4, T3);
66
         R0[WS(rs, 1)] = FNMS(KP2_000000000, Tk, Tj);
67
         R0[WS(rs, 3)] = FMA(KP2_000000000, Tk, Tj);
68
         {
69
        E Tb, Tg, Th, Ti;
70
        Tb = FNMS(KP2_000000000, Ta, T9);
71
        Tg = Tc - Tf;
72
        R1[WS(rs, 2)] = FNMS(KP1_414213562, Tg, Tb);
73
        R1[0] = FMA(KP1_414213562, Tg, Tb);
74
        Th = FMA(KP2_000000000, Ta, T9);
75
        Ti = Tc + Tf;
76
        R1[WS(rs, 1)] = FNMS(KP1_414213562, Ti, Th);
77
        R1[WS(rs, 3)] = FMA(KP1_414213562, Ti, Th);
78
         }
79
    }
80
     }
81
}
82
83
static const kr2c_desc desc = { 8, "r2cb_8", { 8, 0, 12, 0 }, &GENUS };
84
85
void X(codelet_r2cb_8) (planner *p) { X(kr2c_register) (p, r2cb_8, &desc);
86
}
87
88
#else
89
90
/* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 8 -name r2cb_8 -include rdft/scalar/r2cb.h */
91
92
/*
93
 * This function contains 20 FP additions, 6 FP multiplications,
94
 * (or, 20 additions, 6 multiplications, 0 fused multiply/add),
95
 * 21 stack variables, 2 constants, and 16 memory accesses
96
 */
97
#include "rdft/scalar/r2cb.h"
98
99
static void r2cb_8(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
100
0
{
101
0
     DK(KP1_414213562, +1.414213562373095048801688724209698078569671875);
102
0
     DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
103
0
     {
104
0
    INT i;
105
0
    for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(32, rs), MAKE_VOLATILE_STRIDE(32, csr), MAKE_VOLATILE_STRIDE(32, csi)) {
106
0
         E T5, Tg, T3, Te, T9, Ti, Td, Tj, T6, Ta;
107
0
         {
108
0
        E T4, Tf, T1, T2;
109
0
        T4 = Cr[WS(csr, 2)];
110
0
        T5 = KP2_000000000 * T4;
111
0
        Tf = Ci[WS(csi, 2)];
112
0
        Tg = KP2_000000000 * Tf;
113
0
        T1 = Cr[0];
114
0
        T2 = Cr[WS(csr, 4)];
115
0
        T3 = T1 + T2;
116
0
        Te = T1 - T2;
117
0
        {
118
0
       E T7, T8, Tb, Tc;
119
0
       T7 = Cr[WS(csr, 1)];
120
0
       T8 = Cr[WS(csr, 3)];
121
0
       T9 = KP2_000000000 * (T7 + T8);
122
0
       Ti = T7 - T8;
123
0
       Tb = Ci[WS(csi, 1)];
124
0
       Tc = Ci[WS(csi, 3)];
125
0
       Td = KP2_000000000 * (Tb - Tc);
126
0
       Tj = Tb + Tc;
127
0
        }
128
0
         }
129
0
         T6 = T3 + T5;
130
0
         R0[WS(rs, 2)] = T6 - T9;
131
0
         R0[0] = T6 + T9;
132
0
         Ta = T3 - T5;
133
0
         R0[WS(rs, 1)] = Ta - Td;
134
0
         R0[WS(rs, 3)] = Ta + Td;
135
0
         {
136
0
        E Th, Tk, Tl, Tm;
137
0
        Th = Te - Tg;
138
0
        Tk = KP1_414213562 * (Ti - Tj);
139
0
        R1[WS(rs, 2)] = Th - Tk;
140
0
        R1[0] = Th + Tk;
141
0
        Tl = Te + Tg;
142
0
        Tm = KP1_414213562 * (Ti + Tj);
143
0
        R1[WS(rs, 1)] = Tl - Tm;
144
0
        R1[WS(rs, 3)] = Tl + Tm;
145
0
         }
146
0
    }
147
0
     }
148
0
}
149
150
static const kr2c_desc desc = { 8, "r2cb_8", { 20, 6, 0, 0 }, &GENUS };
151
152
1
void X(codelet_r2cb_8) (planner *p) { X(kr2c_register) (p, r2cb_8, &desc);
153
1
}
154
155
#endif