GNU Radio 3.6.5 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2003,2004 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 00023 /* 00024 * WARNING: This file is automatically generated by 00025 * generate_gr_fir_util.py. 00026 * 00027 * Any changes made to this file will be overwritten. 00028 */ 00029 00030 #ifndef INCLUDED_GR_FIR_UTIL_H 00031 #define INCLUDED_GR_FIR_UTIL_H 00032 00033 /*! 00034 * \brief routines to create gr_fir_XXX's 00035 * 00036 * This class handles selecting the fastest version of the finite 00037 * implulse response filter available for your platform. This 00038 * interface should be used by the rest of the system for creating 00039 * gr_fir_XXX's. 00040 * 00041 * The trailing suffix has the form _IOT where I codes the input type, 00042 * O codes the output type, and T codes the tap type. 00043 * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 00044 * 'i' (short) 00045 */ 00046 00047 #include <gr_core_api.h> 00048 #include <gr_types.h> 00049 00050 class gr_fir_ccf; 00051 class gr_fir_fcc; 00052 class gr_fir_ccc; 00053 class gr_fir_fff; 00054 class gr_fir_scc; 00055 class gr_fir_fsf; 00056 00057 // structures returned by get_gr_fir_XXX_info methods 00058 00059 00060 struct GR_CORE_API gr_fir_ccf_info { 00061 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00062 gr_fir_ccf *(*create)(const std::vector<float> &taps); 00063 }; 00064 00065 struct GR_CORE_API gr_fir_fcc_info { 00066 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00067 gr_fir_fcc *(*create)(const std::vector<gr_complex> &taps); 00068 }; 00069 00070 struct GR_CORE_API gr_fir_ccc_info { 00071 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00072 gr_fir_ccc *(*create)(const std::vector<gr_complex> &taps); 00073 }; 00074 00075 struct GR_CORE_API gr_fir_fff_info { 00076 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00077 gr_fir_fff *(*create)(const std::vector<float> &taps); 00078 }; 00079 00080 struct GR_CORE_API gr_fir_scc_info { 00081 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00082 gr_fir_scc *(*create)(const std::vector<gr_complex> &taps); 00083 }; 00084 00085 struct GR_CORE_API gr_fir_fsf_info { 00086 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00087 gr_fir_fsf *(*create)(const std::vector<float> &taps); 00088 }; 00089 00090 struct GR_CORE_API gr_fir_util { 00091 00092 // create a fast version of gr_fir_XXX. 00093 00094 static gr_fir_ccf *create_gr_fir_ccf (const std::vector<float> &taps); 00095 static gr_fir_fcc *create_gr_fir_fcc (const std::vector<gr_complex> &taps); 00096 static gr_fir_ccc *create_gr_fir_ccc (const std::vector<gr_complex> &taps); 00097 static gr_fir_fff *create_gr_fir_fff (const std::vector<float> &taps); 00098 static gr_fir_scc *create_gr_fir_scc (const std::vector<gr_complex> &taps); 00099 static gr_fir_fsf *create_gr_fir_fsf (const std::vector<float> &taps); 00100 00101 // Get information about all gr_fir_XXX implementations. 00102 // This is useful for benchmarking, testing, etc without having to 00103 // know a priori what's linked into this image 00104 // 00105 // The caller must pass in a valid pointer to a vector. 00106 // The vector will be filled with structs describing the 00107 // available implementations. 00108 00109 static void get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info); 00110 static void get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info); 00111 static void get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info); 00112 static void get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info); 00113 static void get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info); 00114 static void get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info); 00115 00116 }; 00117 00118 #endif /* INCLUDED_GR_FIR_UTIL_H */