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 2, 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., 59 Temple Place - Suite 330, 00020 * Boston, MA 02111-1307, 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 00047 #include <gr_types.h> 00048 00049 class gr_fir_ccf; 00050 class gr_fir_fcc; 00051 class gr_fir_ccc; 00052 class gr_fir_fff; 00053 class gr_fir_scc; 00054 class gr_fir_fsf; 00055 00056 // structures returned by get_gr_fir_XXX_info methods 00057 00058 00059 struct gr_fir_ccf_info { 00060 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00061 gr_fir_ccf *(*create)(const std::vector<float> &taps); 00062 }; 00063 00064 struct gr_fir_fcc_info { 00065 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00066 gr_fir_fcc *(*create)(const std::vector<gr_complex> &taps); 00067 }; 00068 00069 struct gr_fir_ccc_info { 00070 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00071 gr_fir_ccc *(*create)(const std::vector<gr_complex> &taps); 00072 }; 00073 00074 struct gr_fir_fff_info { 00075 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00076 gr_fir_fff *(*create)(const std::vector<float> &taps); 00077 }; 00078 00079 struct gr_fir_scc_info { 00080 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00081 gr_fir_scc *(*create)(const std::vector<gr_complex> &taps); 00082 }; 00083 00084 struct gr_fir_fsf_info { 00085 const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" 00086 gr_fir_fsf *(*create)(const std::vector<float> &taps); 00087 }; 00088 00089 struct gr_fir_util { 00090 00091 // create a fast version of gr_fir_XXX. 00092 00093 static gr_fir_ccf *create_gr_fir_ccf (const std::vector<float> &taps); 00094 static gr_fir_fcc *create_gr_fir_fcc (const std::vector<gr_complex> &taps); 00095 static gr_fir_ccc *create_gr_fir_ccc (const std::vector<gr_complex> &taps); 00096 static gr_fir_fff *create_gr_fir_fff (const std::vector<float> &taps); 00097 static gr_fir_scc *create_gr_fir_scc (const std::vector<gr_complex> &taps); 00098 static gr_fir_fsf *create_gr_fir_fsf (const std::vector<float> &taps); 00099 00100 // Get information about all gr_fir_XXX implementations. 00101 // This is useful for benchmarking, testing, etc without having to 00102 // know a priori what's linked into this image 00103 // 00104 // The caller must pass in a valid pointer to a vector. 00105 // The vector will be filled with structs describing the 00106 // available implementations. 00107 00108 static void get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info); 00109 static void get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info); 00110 static void get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info); 00111 static void get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info); 00112 static void get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info); 00113 static void get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info); 00114 00115 }; 00116 00117 #endif /* INCLUDED_GR_FIR_UTIL_H */