-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStageProcFpu.h
162 lines (94 loc) · 4.71 KB
/
StageProcFpu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*****************************************************************************
StageProcFpu.h
Author: Laurent de Soras, 2005
Template parameters:
- REMAINING: Number of remaining coefficients to process, >= 0
- DT: Data type (float or double)
--- Legal stuff ---
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://sam.zoy.org/wtfpl/COPYING for more details.
*Tab=3***********************************************************************/
#if ! defined (hiir_StageProc_HEADER_INCLUDED)
#define hiir_StageProc_HEADER_INCLUDED
#if defined (_MSC_VER)
#pragma once
#pragma warning (4 : 4250) // "Inherits via dominance."
#endif
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "hiir/def.h"
namespace hiir
{
template <int REMAINING, typename DT>
class StageProcFpu
{
static_assert ((REMAINING >= 0), "REMAINING must be >= 0");
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
public:
static hiir_FORCEINLINE void
process_sample_pos (const int nbr_coefs, DT &spl_0, DT &spl_1, const DT coef [], DT x [], DT y []);
static hiir_FORCEINLINE void
process_sample_neg (const int nbr_coefs, DT &spl_0, DT &spl_1, const DT coef [], DT x [], DT y []);
/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
protected:
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
private:
/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
private:
StageProcFpu () = delete;
StageProcFpu (const StageProcFpu <REMAINING, DT> &other) = delete;
StageProcFpu (StageProcFpu <REMAINING, DT> &&other) = delete;
~StageProcFpu () = delete;
StageProcFpu <REMAINING, DT> &
operator = (const StageProcFpu <REMAINING, DT> &other) = delete;
StageProcFpu <REMAINING, DT> &
operator = (StageProcFpu <REMAINING, DT> &&other) = delete;
bool operator == (const StageProcFpu <REMAINING, DT> &other) = delete;
bool operator != (const StageProcFpu <REMAINING, DT> &other) = delete;
}; // class StageProcFpu
template <typename DT>
class StageProcFpu <1, DT>
{
public:
static hiir_FORCEINLINE void
process_sample_pos (const int nbr_coefs, DT &spl_0, DT &spl_1, const DT coef [], DT x [], DT y []);
static hiir_FORCEINLINE void
process_sample_neg (const int nbr_coefs, DT &spl_0, DT &spl_1, const DT coef [], DT x [], DT y []);
private:
StageProcFpu () = delete;
StageProcFpu (const StageProcFpu <1, DT> &other) = delete;
StageProcFpu (StageProcFpu <1, DT> &&other) = delete;
~StageProcFpu () = delete;
StageProcFpu <1, DT> &
operator = (const StageProcFpu <1, DT> &other) = delete;
StageProcFpu <1, DT> &
operator = (StageProcFpu <1, DT> &&other) = delete;
bool operator == (const StageProcFpu <1, DT> &other) = delete;
bool operator != (const StageProcFpu <1, DT> &other) = delete;
}; // class StageProcFpu <1, DT>
template <typename DT>
class StageProcFpu <0, DT>
{
public:
static hiir_FORCEINLINE void
process_sample_pos (const int nbr_coefs, DT &spl_0, DT &spl_1, const DT coef [], DT x [], DT y []);
static hiir_FORCEINLINE void
process_sample_neg (const int nbr_coefs, DT &spl_0, DT &spl_1, const DT coef [], DT x [], DT y []);
private:
StageProcFpu () = delete;
StageProcFpu (const StageProcFpu <0, DT> &other) = delete;
StageProcFpu (StageProcFpu <0, DT> &&other) = delete;
~StageProcFpu () = delete;
StageProcFpu <0, DT> &
operator = (const StageProcFpu <0, DT> &other) = delete;
StageProcFpu <0, DT> &
operator = (StageProcFpu <0, DT> &&other) = delete;
bool operator == (const StageProcFpu <0, DT> &other) = delete;
bool operator != (const StageProcFpu <0, DT> &other) = delete;
}; // class StageProcFpu <1, DT>
} // namespace hiir
#include "hiir/StageProcFpu.hpp"
#endif // hiir_StageProc_HEADER_INCLUDED
/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/