108 template<
class Num_T>
154 int fftsize, blksize;
160 void init(
const Vec<Num_T> &b,
const int xlength);
161 vec overlap_add(
const vec &x);
162 svec overlap_add(
const svec &x);
163 ivec overlap_add(
const ivec &x);
164 cvec overlap_add(
const cvec &x);
165 void overlap_add(
const cvec &x, cvec &y);
170 template <
class Num_T>
171 void Freq_Filt<Num_T>::init(
const Vec<Num_T> &b,
const int xlength)
177 int num_elements =
impulse.length();
180 old_data.set_size(0,
false);
183 zfinal.set_size(num_elements - 1,
false);
202 ivec index(n.length());
204 for (
int ii = 0; ii < n.length(); ii++) {
205 if (n(ii) > (num_elements - 1)) {
210 index.set_size(cnt,
true);
212 fftflops = fftflops(index);
216 Lvec = n - (double)(num_elements - 1);
218 fftsize =
static_cast<int>(n(min_ind));
219 blksize =
static_cast<int>(Lvec(min_ind));
226 template <
class Num_T>
242 old_data.set_size(0,
false);
245 tempv =
concat(old_data, input);
246 if (tempv.
length() <= blksize) {
252 int numblks = end / blksize;
253 if ((end % blksize)) {
254 x = tempv(0, blksize * numblks - 1);
255 old_data = tempv(blksize * numblks, end - 1);
258 x = tempv(0, blksize * numblks - 1);
259 old_data.set_size(0,
false);
263 output = overlap_add(x);
270 #endif // #ifndef FREQ_FILT_H