GNU Radio C++ API
gr_fir_util.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2003,2004 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 /*
24  * WARNING: This file is automatically generated by
25  * generate_gr_fir_util.py.
26  *
27  * Any changes made to this file will be overwritten.
28  */
29 
30 #ifndef INCLUDED_GR_FIR_UTIL_H
31 #define INCLUDED_GR_FIR_UTIL_H
32 
33 /*!
34  * \brief routines to create gr_fir_XXX's
35  *
36  * This class handles selecting the fastest version of the finite
37  * implulse response filter available for your platform. This
38  * interface should be used by the rest of the system for creating
39  * gr_fir_XXX's.
40  *
41  * The trailing suffix has the form _IOT where I codes the input type,
42  * O codes the output type, and T codes the tap type.
43  * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex),
44  * 'i' (short)
45  */
46 
47 #include <gr_core_api.h>
48 #include <gr_types.h>
49 
50 class gr_fir_ccf;
51 class gr_fir_fcc;
52 class gr_fir_ccc;
53 class gr_fir_fff;
54 class gr_fir_scc;
55 class gr_fir_fsf;
56 
57 // structures returned by get_gr_fir_XXX_info methods
58 
59 
61  const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
62  gr_fir_ccf *(*create)(const std::vector<float> &taps);
63 };
64 
66  const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
67  gr_fir_fcc *(*create)(const std::vector<gr_complex> &taps);
68 };
69 
71  const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
72  gr_fir_ccc *(*create)(const std::vector<gr_complex> &taps);
73 };
74 
76  const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
77  gr_fir_fff *(*create)(const std::vector<float> &taps);
78 };
79 
81  const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
82  gr_fir_scc *(*create)(const std::vector<gr_complex> &taps);
83 };
84 
86  const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
87  gr_fir_fsf *(*create)(const std::vector<float> &taps);
88 };
89 
91 
92  // create a fast version of gr_fir_XXX.
93 
94  static gr_fir_ccf *create_gr_fir_ccf (const std::vector<float> &taps);
95  static gr_fir_fcc *create_gr_fir_fcc (const std::vector<gr_complex> &taps);
96  static gr_fir_ccc *create_gr_fir_ccc (const std::vector<gr_complex> &taps);
97  static gr_fir_fff *create_gr_fir_fff (const std::vector<float> &taps);
98  static gr_fir_scc *create_gr_fir_scc (const std::vector<gr_complex> &taps);
99  static gr_fir_fsf *create_gr_fir_fsf (const std::vector<float> &taps);
100 
101  // Get information about all gr_fir_XXX implementations.
102  // This is useful for benchmarking, testing, etc without having to
103  // know a priori what's linked into this image
104  //
105  // The caller must pass in a valid pointer to a vector.
106  // The vector will be filled with structs describing the
107  // available implementations.
108 
109  static void get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info);
110  static void get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info);
111  static void get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info);
112  static void get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info);
113  static void get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info);
114  static void get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info);
115 
116 };
117 
118 #endif /* INCLUDED_GR_FIR_UTIL_H */