Changeset 8959
- Timestamp:
- 07/20/08 18:38:16
- Files:
-
- gnuradio/branches/developers/eb/vmx/config/gr_set_md_cpu.m4 (modified) (3 diffs)
- gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/Makefile.am (modified) (4 diffs)
- gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu.h (modified) (2 diffs)
- gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu_powerpc.cc (moved) (moved from gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu.cc) (6 diffs)
- gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu_x86.cc (copied) (copied from gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu.cc) (1 diff)
- gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.cc (copied) (copied from gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.cc) (15 diffs)
- gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.h (copied) (copied from gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.h) (2 diffs)
- gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/sysconfig_powerpc.cc (copied) (copied from gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/sysconfig_x86.cc) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gnuradio/branches/developers/eb/vmx/config/gr_set_md_cpu.m4
r6044 r8959 1 1 dnl 2 dnl Copyright 2003 Free Software Foundation, Inc.2 dnl Copyright 2003,2008 Free Software Foundation, Inc. 3 3 dnl 4 4 dnl This file is part of GNU Radio … … 29 29 AC_MSG_CHECKING([for machine dependent speedups]) 30 30 case "$cf_with_md_cpu" in 31 x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;;32 x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;;33 # sparc) MD_CPU=sparc;;34 *) MD_CPU=generic;;31 x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;; 32 x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;; 33 powerpc*) MD_CPU=powerpc ;; 34 *) MD_CPU=generic ;; 35 35 esac 36 36 AC_MSG_RESULT($MD_CPU) … … 40 40 AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86") 41 41 AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64") 42 AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc") 42 43 AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic") 43 44 ]) gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/Makefile.am
r8057 r8959 118 118 sysconfig_x86.cc \ 119 119 gr_fir_sysconfig_x86.cc \ 120 gr_cpu .cc \120 gr_cpu_x86.cc \ 121 121 gr_fir_ccc_simd.cc \ 122 122 gr_fir_ccc_x86.cc \ … … 167 167 qa_ccomplex_dotprod_x86.cc 168 168 169 powerpc_CODE = \ 170 sysconfig_powerpc.cc \ 171 gr_fir_sysconfig_powerpc.cc \ 172 gr_cpu_powerpc.cc 173 174 powerpc_qa_CODE = 175 176 169 177 # 170 178 # include each <foo>_CODE entry here... … … 176 184 $(x86_SUBCODE) \ 177 185 $(x86_64_SUBCODE) \ 178 $(x86_qa_CODE) 186 $(x86_qa_CODE) \ 187 $(powerpc_CODE) \ 188 $(powerpc_qa_CODE) 179 189 180 190 … … 233 243 234 244 libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(x86_qa_CODE) 245 endif 246 247 if MD_CPU_powerpc 248 libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(powerpc_CODE) 249 libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(powerpc_qa_CODE) 235 250 endif 236 251 gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu.h
r6044 r8959 1 1 /* -*- c++ -*- */ 2 2 /* 3 * Copyright 2002 Free Software Foundation, Inc.3 * Copyright 2002,2008 Free Software Foundation, Inc. 4 4 * 5 5 * This file is part of GNU Radio … … 30 30 static bool has_3dnow (); 31 31 static bool has_3dnowext (); 32 static bool has_vmx (); 32 33 }; 33 34 gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu_powerpc.cc
r8953 r8959 1 1 /* -*- c++ -*- */ 2 2 /* 3 * Copyright 2002 Free Software Foundation, Inc.3 * Copyright 2002,2008 Free Software Foundation, Inc. 4 4 * 5 5 * This file is part of GNU Radio … … 23 23 #include <gr_cpu.h> 24 24 25 /*26 * execute CPUID instruction, return EAX, EBX, ECX and EDX values in result27 */28 extern "C" {29 void cpuid_x86 (unsigned int op, unsigned int result[4]);30 };31 32 /*33 * CPUID functions returning a single datum34 */35 36 static inline unsigned int cpuid_eax(unsigned int op)37 {38 unsigned int regs[4];39 cpuid_x86 (op, regs);40 return regs[0];41 }42 43 static inline unsigned int cpuid_ebx(unsigned int op)44 {45 unsigned int regs[4];46 cpuid_x86 (op, regs);47 return regs[1];48 }49 50 static inline unsigned int cpuid_ecx(unsigned int op)51 {52 unsigned int regs[4];53 cpuid_x86 (op, regs);54 return regs[2];55 }56 57 static inline unsigned int cpuid_edx(unsigned int op)58 {59 unsigned int regs[4];60 cpuid_x86 (op, regs);61 return regs[3];62 }63 64 // ----------------------------------------------------------------65 66 25 bool 67 26 gr_cpu::has_mmx () 68 27 { 69 unsigned int edx = cpuid_edx (1); // standard features 70 return (edx & (1 << 23)) != 0; 28 return false; 71 29 } 72 30 … … 74 32 gr_cpu::has_sse () 75 33 { 76 unsigned int edx = cpuid_edx (1); // standard features 77 return (edx & (1 << 25)) != 0; 34 return false; 78 35 } 79 36 … … 81 38 gr_cpu::has_sse2 () 82 39 { 83 unsigned int edx = cpuid_edx (1); // standard features 84 return (edx & (1 << 26)) != 0; 40 return false; 85 41 } 86 42 … … 88 44 gr_cpu::has_3dnow () 89 45 { 90 unsigned int extended_fct_count = cpuid_eax (0x80000000); 91 if (extended_fct_count < 0x80000001) 92 return false; 93 94 unsigned int extended_features = cpuid_edx (0x80000001); 95 return (extended_features & (1 << 31)) != 0; 46 return false; 96 47 } 97 48 … … 99 50 gr_cpu::has_3dnowext () 100 51 { 101 unsigned int extended_fct_count = cpuid_eax (0x80000000); 102 if (extended_fct_count < 0x80000001) 103 return false; 52 return false; 53 } 104 54 105 unsigned int extended_features = cpuid_edx (0x80000001); 106 return (extended_features & (1 << 30)) != 0; 55 bool 56 gr_cpu::has_vmx () 57 { 58 return true; // FIXME assume we've always got it 107 59 } gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu_x86.cc
r8953 r8959 106 106 return (extended_features & (1 << 30)) != 0; 107 107 } 108 109 bool 110 gr_cpu::has_vmx () 111 { 112 return false; 113 } gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.cc
r8953 r8959 1 1 /* -*- c++ -*- */ 2 2 /* 3 * Copyright 2002 Free Software Foundation, Inc.3 * Copyright 2002,2008 Free Software Foundation, Inc. 4 4 * 5 5 * This file is part of GNU Radio … … 23 23 #include <config.h> 24 24 #endif 25 #include <gr_fir_sysconfig_ x86.h>25 #include <gr_fir_sysconfig_powerpc.h> 26 26 #include <gr_cpu.h> 27 27 28 28 #include <gr_fir_ccf.h> 29 29 #include <gr_fir_ccf_generic.h> 30 #include <gr_fir_ccf_x86.h>30 //#include <gr_fir_ccf_powerpc.h> 31 31 #include <gr_fir_fcc.h> 32 32 #include <gr_fir_fcc_generic.h> 33 #include <gr_fir_fcc_x86.h>33 //#include <gr_fir_fcc_powerpc.h> 34 34 #include <gr_fir_fff.h> 35 35 #include <gr_fir_fff_generic.h> 36 #include <gr_fir_fff_x86.h>36 //#include <gr_fir_fff_powerpc.h> 37 37 #include <gr_fir_fsf.h> 38 38 #include <gr_fir_fsf_generic.h> 39 #include <gr_fir_fsf_x86.h>39 //#include <gr_fir_fsf_powerpc.h> 40 40 #include <gr_fir_ccc.h> 41 41 #include <gr_fir_ccc_generic.h> 42 #include <gr_fir_ccc_x86.h>42 //#include <gr_fir_ccc_powerpc.h> 43 43 #include <gr_fir_scc.h> 44 44 #include <gr_fir_scc_generic.h> 45 #include <gr_fir_scc_x86.h> 46 // #include <gr_fir_sss.h> 47 // #include <gr_fir_sss_generic.h> 48 // #include <gr_fir_sss_mmx.h> 49 // #include <gr_fir_sss_sse2.h> 45 //#include <gr_fir_scc_powerpc.h> 50 46 51 47 #include <iostream> … … 55 51 * ---------------------------------------------------------------- 56 52 * static functions that serve as constructors... 57 * Is it possible to take the address of a normal constructor?58 53 * ---------------------------------------------------------------- 59 54 */ 60 55 56 #if 0 61 57 static gr_fir_ccf * 62 make_gr_fir_ccf_3dnow(const std::vector<float> &taps) 63 { 64 return new gr_fir_ccf_3dnow(taps); 65 } 66 67 static gr_fir_ccf * 68 make_gr_fir_ccf_sse(const std::vector<float> &taps) 69 { 70 return new gr_fir_ccf_sse(taps); 58 make_gr_fir_ccf_vmx(const std::vector<float> &taps) 59 { 60 return new gr_fir_ccf_vmx(taps); 71 61 } 72 62 73 63 static gr_fir_fcc * 74 make_gr_fir_fcc_3dnow(const std::vector<gr_complex> &taps) 75 { 76 return new gr_fir_fcc_3dnow(taps); 77 } 78 79 static gr_fir_fcc * 80 make_gr_fir_fcc_sse(const std::vector<gr_complex> &taps) 81 { 82 return new gr_fir_fcc_sse(taps); 64 make_gr_fir_fcc_vmx(const std::vector<gr_complex> &taps) 65 { 66 return new gr_fir_fcc_vmx(taps); 83 67 } 84 68 85 69 static gr_fir_ccc * 86 make_gr_fir_ccc_3dnow (const std::vector<gr_complex> &taps) 87 { 88 return new gr_fir_ccc_3dnow (taps); 89 } 90 91 static gr_fir_ccc * 92 make_gr_fir_ccc_3dnowext (const std::vector<gr_complex> &taps) 93 { 94 return new gr_fir_ccc_3dnowext (taps); 95 } 96 97 static gr_fir_ccc * 98 make_gr_fir_ccc_sse (const std::vector<gr_complex> &taps) 99 { 100 return new gr_fir_ccc_sse (taps); 70 make_gr_fir_ccc_vmx (const std::vector<gr_complex> &taps) 71 { 72 return new gr_fir_ccc_vmx (taps); 101 73 } 102 74 103 75 static gr_fir_fff * 104 make_gr_fir_fff_3dnow (const std::vector<float> &taps) 105 { 106 return new gr_fir_fff_3dnow (taps); 107 } 108 109 static gr_fir_fff * 110 make_gr_fir_fff_sse (const std::vector<float> &taps) 111 { 112 return new gr_fir_fff_sse (taps); 76 make_gr_fir_fff_vmx (const std::vector<float> &taps) 77 { 78 return new gr_fir_fff_vmx (taps); 113 79 } 114 80 115 81 static gr_fir_fsf * 116 make_gr_fir_fsf_3dnow (const std::vector<float> &taps) 117 { 118 return new gr_fir_fsf_3dnow (taps); 119 } 120 121 static gr_fir_fsf * 122 make_gr_fir_fsf_sse (const std::vector<float> &taps) 123 { 124 return new gr_fir_fsf_sse (taps); 125 } 126 127 #if 0 128 static gr_fir_sss * 129 make_gr_fir_sss_mmx (const std::vector<short> &taps) 130 { 131 return new gr_fir_sss_mmx (taps); 132 } 133 134 static gr_fir_sss * 135 make_gr_fir_sss_sse2 (const std::vector<short> &taps) 136 { 137 return new gr_fir_sss_sse2 (taps); 138 } 139 #endif 82 make_gr_fir_fsf_vmx (const std::vector<float> &taps) 83 { 84 return new gr_fir_fsf_vmx (taps); 85 } 140 86 141 87 static gr_fir_scc * 142 make_gr_fir_scc_3dnow(const std::vector<gr_complex> &taps) 143 { 144 return new gr_fir_scc_3dnow(taps); 145 } 146 147 static gr_fir_scc * 148 make_gr_fir_scc_3dnowext(const std::vector<gr_complex> &taps) 149 { 150 return new gr_fir_scc_3dnowext(taps); 151 } 152 153 static gr_fir_scc * 154 make_gr_fir_scc_sse(const std::vector<gr_complex> &taps) 155 { 156 return new gr_fir_scc_sse(taps); 157 } 88 make_gr_fir_scc_vmx(const std::vector<gr_complex> &taps) 89 { 90 return new gr_fir_scc_vmx(taps); 91 } 92 #endif 158 93 159 94 /* 160 95 * ---------------------------------------------------------------- 161 * Return instances of the fastest x86versions of these classes.96 * Return instances of the fastest powerpc versions of these classes. 162 97 * 163 * check CPUID, if has 3DNowExt, return 3DNow!Ext version, 164 * else if 3DNow, return 3DNow! version, 165 * else if SSE2, return SSE2 version, 166 * else if SSE, return SSE version, 167 * else if MMX, return MMX version, 98 * check CPUID, if has VMX, return VMX version, 168 99 * else return generic version. 169 *170 * FIXME: benchmark, store result, use stored result to171 * select the fastest version.172 100 * ---------------------------------------------------------------- 173 101 */ 174 102 175 103 gr_fir_ccf * 176 gr_fir_sysconfig_x86::create_gr_fir_ccf (const std::vector<float> &taps) 177 { 178 static bool first = true; 179 180 if (gr_cpu::has_3dnow ()){ 181 if (first){ 182 cerr << ">>> gr_fir_ccf: using 3DNow!\n"; 183 first = false; 184 } 185 return make_gr_fir_ccf_3dnow (taps); 186 } 187 188 if (gr_cpu::has_sse ()){ 189 if (first){ 190 cerr << ">>> gr_fir_ccf: using SSE\n"; 191 first = false; 192 } 193 return make_gr_fir_ccf_sse (taps); 194 } 104 gr_fir_sysconfig_powerpc::create_gr_fir_ccf (const std::vector<float> &taps) 105 { 106 static bool first = true; 107 108 #if 0 109 if (gr_cpu::has_vmx ()){ 110 if (first){ 111 cerr << ">>> gr_fir_ccf: using VMX\n"; 112 first = false; 113 } 114 return make_gr_fir_ccf_vmx (taps); 115 } 116 #endif 195 117 196 118 if (first){ … … 202 124 203 125 gr_fir_fcc * 204 gr_fir_sysconfig_x86::create_gr_fir_fcc (const std::vector<gr_complex> &taps) 205 { 206 static bool first = true; 207 208 if (gr_cpu::has_3dnow ()){ 209 if (first){ 210 cerr << ">>> gr_fir_fcc: using 3DNow!\n"; 211 first = false; 212 } 213 return make_gr_fir_fcc_3dnow (taps); 214 } 215 216 if (gr_cpu::has_sse ()){ 217 if (first){ 218 cerr << ">>> gr_fir_fcc: using SSE\n"; 219 first = false; 220 } 221 return make_gr_fir_fcc_sse (taps); 222 } 126 gr_fir_sysconfig_powerpc::create_gr_fir_fcc (const std::vector<gr_complex> &taps) 127 { 128 static bool first = true; 129 130 #if 0 131 if (gr_cpu::has_vmx ()){ 132 if (first){ 133 cerr << ">>> gr_fir_fcc: using VMX\n"; 134 first = false; 135 } 136 return make_gr_fir_fcc_vmx (taps); 137 } 138 #endif 223 139 224 140 if (first){ … … 230 146 231 147 gr_fir_ccc * 232 gr_fir_sysconfig_x86::create_gr_fir_ccc (const std::vector<gr_complex> &taps) 233 { 234 static bool first = true; 235 236 if (gr_cpu::has_3dnowext ()){ 237 if (first) { 238 cerr << ">>> gr_fir_ccc: using 3DNow!Ext\n"; 239 first = false; 240 } 241 return make_gr_fir_ccc_3dnowext (taps); 242 } 243 244 if (gr_cpu::has_3dnow ()){ 245 if (first) { 246 cerr << ">>> gr_fir_ccc: using 3DNow!\n"; 247 first = false; 248 } 249 return make_gr_fir_ccc_3dnow (taps); 250 } 251 252 if (gr_cpu::has_sse ()){ 253 if (first){ 254 cerr << ">>> gr_fir_ccc: using SSE\n"; 255 first = false; 256 } 257 return make_gr_fir_ccc_sse (taps); 258 } 148 gr_fir_sysconfig_powerpc::create_gr_fir_ccc (const std::vector<gr_complex> &taps) 149 { 150 static bool first = true; 151 152 #if 0 153 if (gr_cpu::has_vmx ()){ 154 if (first){ 155 cerr << ">>> gr_fir_ccc: using VMX\n"; 156 first = false; 157 } 158 return make_gr_fir_ccc_vmx (taps); 159 } 160 #endif 259 161 260 162 if (first){ … … 266 168 267 169 gr_fir_fff * 268 gr_fir_sysconfig_x86::create_gr_fir_fff (const std::vector<float> &taps) 269 { 270 static bool first = true; 271 272 if (gr_cpu::has_3dnow ()){ 273 if (first) { 274 cerr << ">>> gr_fir_fff: using 3DNow!\n"; 275 first = false; 276 } 277 return make_gr_fir_fff_3dnow (taps); 278 } 279 280 if (gr_cpu::has_sse ()){ 281 if (first){ 282 cerr << ">>> gr_fir_fff: using SSE\n"; 283 first = false; 284 } 285 return make_gr_fir_fff_sse (taps); 286 } 170 gr_fir_sysconfig_powerpc::create_gr_fir_fff (const std::vector<float> &taps) 171 { 172 static bool first = true; 173 174 #if 0 175 if (gr_cpu::has_vmx ()){ 176 if (first){ 177 cerr << ">>> gr_fir_fff: using VMX\n"; 178 first = false; 179 } 180 return make_gr_fir_fff_vmx (taps); 181 } 182 #endif 287 183 288 184 if (first){ … … 294 190 295 191 gr_fir_fsf * 296 gr_fir_sysconfig_x86::create_gr_fir_fsf (const std::vector<float> &taps) 297 { 298 static bool first = true; 299 300 if (gr_cpu::has_3dnow ()){ 301 if (first) { 302 cerr << ">>> gr_fir_fsf: using 3DNow!\n"; 303 first = false; 304 } 305 return make_gr_fir_fsf_3dnow (taps); 306 } 307 308 if (gr_cpu::has_sse ()){ 309 if (first){ 310 cerr << ">>> gr_fir_fsf: using SSE\n"; 311 first = false; 312 } 313 return make_gr_fir_fsf_sse (taps); 314 } 192 gr_fir_sysconfig_powerpc::create_gr_fir_fsf (const std::vector<float> &taps) 193 { 194 static bool first = true; 195 196 #if 0 197 if (gr_cpu::has_vmx ()){ 198 if (first){ 199 cerr << ">>> gr_fir_fsf: using VMX\n"; 200 first = false; 201 } 202 return make_gr_fir_fsf_vmx (taps); 203 } 204 #endif 315 205 316 206 if (first){ … … 321 211 } 322 212 323 #if 0324 gr_fir_sss *325 gr_fir_sysconfig_x86::create_gr_fir_sss (const std::vector<short> &taps)326 {327 // FIXME -- probably want to figure out best answer for Athlon and code328 // add code to select it here...329 330 if (gr_cpu::has_sse2 ()){331 cerr << ">>> gr_fir_sss: using SSE2\n";332 return make_gr_fir_sss_sse2 (taps);333 }334 335 if (gr_cpu::has_mmx ()){336 cerr << ">>> gr_fir_sss: using MMX\n";337 return make_gr_fir_sss_mmx (taps);338 }339 340 cerr << ">>> gr_fir_sss: handing off to parent class\n";341 return gr_fir_sysconfig_generic::create_gr_fir_sss (taps);342 }343 #endif344 213 345 214 gr_fir_scc * 346 gr_fir_sysconfig_x86::create_gr_fir_scc (const std::vector<gr_complex> &taps) 347 { 348 static bool first = true; 349 350 if (gr_cpu::has_3dnowext ()){ 351 if (first){ 352 cerr << ">>> gr_fir_scc: using 3DNow!Ext\n"; 353 first = false; 354 } 355 return make_gr_fir_scc_3dnowext (taps); 356 } 357 358 if (gr_cpu::has_3dnow ()){ 359 if (first){ 360 cerr << ">>> gr_fir_scc: using 3DNow!\n"; 361 first = false; 362 } 363 return make_gr_fir_scc_3dnow (taps); 364 } 365 366 if (gr_cpu::has_sse ()){ 367 if (first){ 368 cerr << ">>> gr_fir_scc: using SSE\n"; 369 first = false; 370 } 371 return make_gr_fir_scc_sse (taps); 372 } 215 gr_fir_sysconfig_powerpc::create_gr_fir_scc (const std::vector<gr_complex> &taps) 216 { 217 static bool first = true; 218 219 #if 0 220 if (gr_cpu::has_vmx ()){ 221 if (first){ 222 cerr << ">>> gr_fir_scc: using VMX\n"; 223 first = false; 224 } 225 return make_gr_fir_scc_vmx (taps); 226 } 227 #endif 373 228 374 229 if (first){ … … 386 241 387 242 void 388 gr_fir_sysconfig_ x86::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info)243 gr_fir_sysconfig_powerpc::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) 389 244 { 390 245 gr_fir_ccf_info t; … … 394 249 395 250 // add our stuff... 396 if (gr_cpu::has_3dnow ()){ 397 t.name = "3DNow!"; 398 t.create = make_gr_fir_ccf_3dnow; 399 (*info).push_back (t); 400 } 401 402 if (gr_cpu::has_sse ()){ 403 t.name = "SSE"; 404 t.create = make_gr_fir_ccf_sse; 405 (*info).push_back (t); 406 } 407 } 408 409 void 410 gr_fir_sysconfig_x86::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) 251 #if 0 252 if (gr_cpu::has_vmx ()){ 253 t.name = "VMX"; 254 t.create = make_gr_fir_ccf_vmx; 255 (*info).push_back (t); 256 } 257 #endif 258 } 259 260 void 261 gr_fir_sysconfig_powerpc::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) 411 262 { 412 263 gr_fir_fcc_info t; … … 416 267 417 268 // add our stuff... 418 if (gr_cpu::has_3dnow ()){ 419 t.name = "3DNow!"; 420 t.create = make_gr_fir_fcc_3dnow; 421 (*info).push_back (t); 422 } 423 424 if (gr_cpu::has_sse ()){ 425 t.name = "SSE"; 426 t.create = make_gr_fir_fcc_sse; 427 (*info).push_back (t); 428 } 429 } 430 431 void 432 gr_fir_sysconfig_x86::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) 269 #if 0 270 if (gr_cpu::has_vmx ()){ 271 t.name = "VMX"; 272 t.create = make_gr_fir_fcc_vmx; 273 (*info).push_back (t); 274 } 275 #endif 276 } 277 278 void 279 gr_fir_sysconfig_powerpc::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) 433 280 { 434 281 gr_fir_ccc_info t; … … 438 285 439 286 // add our stuff... 440 if (gr_cpu::has_3dnowext ()){ 441 t.name = "3DNow!Ext"; 442 t.create = make_gr_fir_ccc_3dnowext; 443 (*info).push_back (t); 444 } 445 446 if (gr_cpu::has_3dnow ()){ 447 t.name = "3DNow!"; 448 t.create = make_gr_fir_ccc_3dnow; 449 (*info).push_back (t); 450 } 451 452 if (gr_cpu::has_sse ()){ 453 t.name = "SSE"; 454 t.create = make_gr_fir_ccc_sse; 455 (*info).push_back (t); 456 } 457 } 458 459 void 460 gr_fir_sysconfig_x86::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) 287 #if 0 288 if (gr_cpu::has_vmx ()){ 289 t.name = "VMX"; 290 t.create = make_gr_fir_ccc_vmx; 291 (*info).push_back (t); 292 } 293 #endif 294 } 295 296 void 297 gr_fir_sysconfig_powerpc::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) 461 298 { 462 299 gr_fir_fff_info t; … … 466 303 467 304 // add our stuff... 468 if (gr_cpu::has_3dnow ()){ 469 t.name = "3DNow!"; 470 t.create = make_gr_fir_fff_3dnow; 471 (*info).push_back (t); 472 } 473 474 if (gr_cpu::has_sse ()){ 475 t.name = "SSE"; 476 t.create = make_gr_fir_fff_sse; 477 (*info).push_back (t); 478 } 479 } 480 481 void 482 gr_fir_sysconfig_x86::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info) 305 #if 0 306 if (gr_cpu::has_vmx ()){ 307 t.name = "VMX"; 308 t.create = make_gr_fir_fff_vmx; 309 (*info).push_back (t); 310 } 311 #endif 312 } 313 314 void 315 gr_fir_sysconfig_powerpc::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info) 483 316 { 484 317 gr_fir_fsf_info t; … … 488 321 489 322 // add our stuff... 490 if (gr_cpu::has_3dnow ()){ 491 t.name = "3DNow!"; 492 t.create = make_gr_fir_fsf_3dnow; 493 (*info).push_back (t); 494 } 495 496 if (gr_cpu::has_sse ()){ 497 t.name = "SSE"; 498 t.create = make_gr_fir_fsf_sse; 499 (*info).push_back (t); 500 } 501 } 502 503 void 504 gr_fir_sysconfig_x86::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) 323 #if 0 324 if (gr_cpu::has_vmx ()){ 325 t.name = "VMX"; 326 t.create = make_gr_fir_fsf_vmx; 327 (*info).push_back (t); 328 } 329 #endif 330 } 331 332 void 333 gr_fir_sysconfig_powerpc::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) 505 334 { 506 335 gr_fir_scc_info t; … … 510 339 511 340 // add our stuff... 512 if (gr_cpu::has_3dnowext ()){ 513 t.name = "3DNow!Ext"; 514 t.create = make_gr_fir_scc_3dnowext; 515 (*info).push_back (t); 516 } 517 518 if (gr_cpu::has_3dnow ()){ 519 t.name = "3DNow!"; 520 t.create = make_gr_fir_scc_3dnow; 521 (*info).push_back (t); 522 } 523 524 if (gr_cpu::has_sse ()){ 525 t.name = "SSE"; 526 t.create = make_gr_fir_scc_sse; 527 (*info).push_back (t); 528 } 529 } 530 531 #if 0 532 void 533 gr_fir_sysconfig_x86::get_gr_fir_sss_info (std::vector<gr_fir_sss_info> *info) 534 { 535 gr_fir_sss_info t; 536 537 // invoke parent.. 538 gr_fir_sysconfig_generic::get_gr_fir_sss_info (info); 539 540 // add our stuff... 541 if (gr_cpu::has_mmx ()){ 542 t.name = "MMX"; 543 t.create = make_gr_fir_sss_mmx; 544 (*info).push_back (t); 545 } 546 547 if (gr_cpu::has_sse2 ()){ 548 t.name = "SSE2"; 549 t.create = make_gr_fir_sss_sse2; 550 (*info).push_back (t); 551 } 552 } 553 #endif 341 #if 0 342 if (gr_cpu::has_vmx ()){ 343 t.name = "VMX"; 344 t.create = make_gr_fir_scc_vmx; 345 (*info).push_back (t); 346 } 347 #endif 348 } gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.h
r8953 r8959 1 1 /* -*- c++ -*- */ 2 2 /* 3 * Copyright 2002 Free Software Foundation, Inc.3 * Copyright 2002,2008 Free Software Foundation, Inc. 4 4 * 5 5 * This file is part of GNU Radio … … 20 20 * Boston, MA 02110-1301, USA. 21 21 */ 22 #ifndef INCLUDED_GR_FIR_SYSCONFIG_ X86_H23 #define INCLUDED_GR_FIR_SYSCONFIG_ X86_H22 #ifndef INCLUDED_GR_FIR_SYSCONFIG_POWERPC_H 23 #define INCLUDED_GR_FIR_SYSCONFIG_POWERPC_H 24 24 25 25 #include <gr_fir_sysconfig_generic.h> 26 26 27 class gr_fir_sysconfig_ x86: public gr_fir_sysconfig_generic {27 class gr_fir_sysconfig_powerpc : public gr_fir_sysconfig_generic { 28 28 public: 29 29 virtual gr_fir_ccf *create_gr_fir_ccf (const std::vector<float> &taps); gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/sysconfig_powerpc.cc
r8953 r8959 1 1 /* -*- c++ -*- */ 2 2 /* 3 * Copyright 2002 Free Software Foundation, Inc.3 * Copyright 2002,2008 Free Software Foundation, Inc. 4 4 * 5 5 * This file is part of GNU Radio … … 24 24 #include <config.h> 25 25 #endif 26 #include <gr_fir_sysconfig_ x86.h>26 #include <gr_fir_sysconfig_powerpc.h> 27 27 28 28 gr_fir_sysconfig * … … 34 34 return singleton; 35 35 36 singleton = new gr_fir_sysconfig_ x86();36 singleton = new gr_fir_sysconfig_powerpc (); 37 37 return singleton; 38 38 }
