Changeset 8959

Show
Ignore:
Timestamp:
07/20/08 18:38:16
Author:
eb
Message:

Added framework for PowerPC VMX (AltiVec?) support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/branches/developers/eb/vmx/config/gr_set_md_cpu.m4

    r6044 r8959  
    11dnl 
    2 dnl Copyright 2003 Free Software Foundation, Inc. 
     2dnl Copyright 2003,2008 Free Software Foundation, Inc. 
    33dnl  
    44dnl This file is part of GNU Radio 
     
    2929  AC_MSG_CHECKING([for machine dependent speedups]) 
    3030  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 ;; 
    3535  esac 
    3636  AC_MSG_RESULT($MD_CPU) 
     
    4040  AM_CONDITIONAL(MD_CPU_x86,     test "$MD_CPU" = "x86") 
    4141  AM_CONDITIONAL(MD_SUBCPU_x86_64,  test "$MD_SUBCPU" = "x86_64") 
     42  AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc") 
    4243  AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic") 
    4344]) 
  • gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/Makefile.am

    r8057 r8959  
    118118        sysconfig_x86.cc                \ 
    119119        gr_fir_sysconfig_x86.cc         \ 
    120         gr_cpu.cc                     \ 
     120        gr_cpu_x86.cc                 \ 
    121121        gr_fir_ccc_simd.cc              \ 
    122122        gr_fir_ccc_x86.cc               \ 
     
    167167        qa_ccomplex_dotprod_x86.cc       
    168168 
     169powerpc_CODE = \ 
     170        sysconfig_powerpc.cc \ 
     171        gr_fir_sysconfig_powerpc.cc \ 
     172        gr_cpu_powerpc.cc 
     173 
     174powerpc_qa_CODE = 
     175 
     176 
    169177# 
    170178# include each <foo>_CODE entry here... 
     
    176184        $(x86_SUBCODE)                  \ 
    177185        $(x86_64_SUBCODE)               \ 
    178         $(x86_qa_CODE) 
     186        $(x86_qa_CODE)                  \ 
     187        $(powerpc_CODE)                 \ 
     188        $(powerpc_qa_CODE) 
    179189 
    180190 
     
    233243 
    234244libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(x86_qa_CODE) 
     245endif 
     246 
     247if MD_CPU_powerpc 
     248libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(powerpc_CODE) 
     249libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(powerpc_qa_CODE) 
    235250endif 
    236251 
  • gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu.h

    r6044 r8959  
    11/* -*- c++ -*- */ 
    22/* 
    3  * Copyright 2002 Free Software Foundation, Inc. 
     3 * Copyright 2002,2008 Free Software Foundation, Inc. 
    44 *  
    55 * This file is part of GNU Radio 
     
    3030  static bool has_3dnow (); 
    3131  static bool has_3dnowext (); 
     32  static bool has_vmx (); 
    3233}; 
    3334 
  • gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu_powerpc.cc

    r8953 r8959  
    11/* -*- c++ -*- */ 
    22/* 
    3  * Copyright 2002 Free Software Foundation, Inc. 
     3 * Copyright 2002,2008 Free Software Foundation, Inc. 
    44 *  
    55 * This file is part of GNU Radio 
     
    2323#include <gr_cpu.h> 
    2424 
    25 /* 
    26  * execute CPUID instruction, return EAX, EBX, ECX and EDX values in result 
    27  */ 
    28 extern "C" { 
    29 void cpuid_x86 (unsigned int op, unsigned int result[4]); 
    30 }; 
    31  
    32 /* 
    33  * CPUID functions returning a single datum 
    34  */ 
    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  
    6625bool 
    6726gr_cpu::has_mmx () 
    6827{ 
    69   unsigned int edx = cpuid_edx (1);     // standard features 
    70   return (edx & (1 << 23)) != 0; 
     28  return false; 
    7129} 
    7230 
     
    7432gr_cpu::has_sse () 
    7533{ 
    76   unsigned int edx = cpuid_edx (1);     // standard features 
    77   return (edx & (1 << 25)) != 0; 
     34  return false; 
    7835} 
    7936 
     
    8138gr_cpu::has_sse2 () 
    8239{ 
    83   unsigned int edx = cpuid_edx (1);     // standard features 
    84   return (edx & (1 << 26)) != 0; 
     40  return false; 
    8541} 
    8642 
     
    8844gr_cpu::has_3dnow () 
    8945{ 
    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; 
    9647} 
    9748 
     
    9950gr_cpu::has_3dnowext () 
    10051{ 
    101   unsigned int extended_fct_count = cpuid_eax (0x80000000); 
    102   if (extended_fct_count < 0x80000001) 
    103     return false; 
     52  return false; 
     53
    10454 
    105   unsigned int extended_features = cpuid_edx (0x80000001); 
    106   return (extended_features & (1 << 30)) != 0; 
     55bool 
     56gr_cpu::has_vmx () 
     57
     58  return true;          // FIXME assume we've always got it 
    10759} 
  • gnuradio/branches/developers/eb/vmx/gnuradio-core/src/lib/filter/gr_cpu_x86.cc

    r8953 r8959  
    106106  return (extended_features & (1 << 30)) != 0; 
    107107} 
     108 
     109bool 
     110gr_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  
    11/* -*- c++ -*- */ 
    22/* 
    3  * Copyright 2002 Free Software Foundation, Inc. 
     3 * Copyright 2002,2008 Free Software Foundation, Inc. 
    44 *  
    55 * This file is part of GNU Radio 
     
    2323#include <config.h> 
    2424#endif 
    25 #include <gr_fir_sysconfig_x86.h> 
     25#include <gr_fir_sysconfig_powerpc.h> 
    2626#include <gr_cpu.h> 
    2727 
    2828#include <gr_fir_ccf.h> 
    2929#include <gr_fir_ccf_generic.h> 
    30 #include <gr_fir_ccf_x86.h> 
     30//#include <gr_fir_ccf_powerpc.h> 
    3131#include <gr_fir_fcc.h> 
    3232#include <gr_fir_fcc_generic.h> 
    33 #include <gr_fir_fcc_x86.h> 
     33//#include <gr_fir_fcc_powerpc.h> 
    3434#include <gr_fir_fff.h> 
    3535#include <gr_fir_fff_generic.h> 
    36 #include <gr_fir_fff_x86.h> 
     36//#include <gr_fir_fff_powerpc.h> 
    3737#include <gr_fir_fsf.h> 
    3838#include <gr_fir_fsf_generic.h> 
    39 #include <gr_fir_fsf_x86.h> 
     39//#include <gr_fir_fsf_powerpc.h> 
    4040#include <gr_fir_ccc.h> 
    4141#include <gr_fir_ccc_generic.h> 
    42 #include <gr_fir_ccc_x86.h> 
     42//#include <gr_fir_ccc_powerpc.h> 
    4343#include <gr_fir_scc.h> 
    4444#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> 
    5046 
    5147#include <iostream> 
     
    5551 * ---------------------------------------------------------------- 
    5652 * static functions that serve as constructors... 
    57  * Is it possible to take the address of a normal constructor? 
    5853 * ---------------------------------------------------------------- 
    5954 */ 
    6055 
     56#if 0 
    6157static 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); 
     58make_gr_fir_ccf_vmx(const std::vector<float> &taps) 
     59
     60  return new gr_fir_ccf_vmx(taps); 
    7161} 
    7262 
    7363static 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); 
     64make_gr_fir_fcc_vmx(const std::vector<gr_complex> &taps) 
     65
     66  return new gr_fir_fcc_vmx(taps); 
    8367} 
    8468 
    8569static 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); 
     70make_gr_fir_ccc_vmx (const std::vector<gr_complex> &taps) 
     71
     72  return new gr_fir_ccc_vmx (taps); 
    10173} 
    10274 
    10375static 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); 
     76make_gr_fir_fff_vmx (const std::vector<float> &taps) 
     77
     78  return new gr_fir_fff_vmx (taps); 
    11379} 
    11480 
    11581static 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 
     82make_gr_fir_fsf_vmx (const std::vector<float> &taps) 
     83
     84  return new gr_fir_fsf_vmx (taps); 
     85
    14086 
    14187static 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 
     88make_gr_fir_scc_vmx(const std::vector<gr_complex> &taps) 
     89
     90  return new gr_fir_scc_vmx(taps); 
     91
     92#endif 
    15893 
    15994/* 
    16095 * ---------------------------------------------------------------- 
    161  * Return instances of the fastest x86 versions of these classes. 
     96 * Return instances of the fastest powerpc versions of these classes. 
    16297 * 
    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, 
    16899 *              else return generic version. 
    169  * 
    170  * FIXME: benchmark, store result, use stored result to 
    171  *   select the fastest version. 
    172100 * ---------------------------------------------------------------- 
    173101 */ 
    174102 
    175103gr_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   } 
     104gr_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 
    195117 
    196118  if (first){ 
     
    202124 
    203125gr_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   } 
     126gr_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 
    223139 
    224140  if (first){ 
     
    230146 
    231147gr_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   } 
     148gr_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 
    259161   
    260162  if (first){ 
     
    266168 
    267169gr_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   } 
     170gr_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 
    287183   
    288184  if (first){ 
     
    294190 
    295191gr_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   } 
     192gr_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 
    315205   
    316206  if (first){ 
     
    321211} 
    322212 
    323 #if 0 
    324 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 code 
    328   // 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 #endif 
    344213 
    345214gr_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   } 
     215gr_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 
    373228 
    374229  if (first){ 
     
    386241 
    387242void  
    388 gr_fir_sysconfig_x86::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) 
     243gr_fir_sysconfig_powerpc::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) 
    389244{ 
    390245  gr_fir_ccf_info       t; 
     
    394249 
    395250  // 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 
     260void  
     261gr_fir_sysconfig_powerpc::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) 
    411262{ 
    412263  gr_fir_fcc_info       t; 
     
    416267 
    417268  // 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 
     278void  
     279gr_fir_sysconfig_powerpc::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) 
    433280{ 
    434281  gr_fir_ccc_info       t; 
     
    438285 
    439286  // 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 
     296void  
     297gr_fir_sysconfig_powerpc::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) 
    461298{ 
    462299  gr_fir_fff_info       t; 
     
    466303 
    467304  // 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 
     314void  
     315gr_fir_sysconfig_powerpc::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info) 
    483316{ 
    484317  gr_fir_fsf_info       t; 
     
    488321 
    489322  // 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 
     332void  
     333gr_fir_sysconfig_powerpc::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) 
    505334{ 
    506335  gr_fir_scc_info       t; 
     
    510339 
    511340  // 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  
    11/* -*- c++ -*- */ 
    22/* 
    3  * Copyright 2002 Free Software Foundation, Inc. 
     3 * Copyright 2002,2008 Free Software Foundation, Inc. 
    44 *  
    55 * This file is part of GNU Radio 
     
    2020 * Boston, MA 02110-1301, USA. 
    2121 */ 
    22 #ifndef INCLUDED_GR_FIR_SYSCONFIG_X86_H 
    23 #define INCLUDED_GR_FIR_SYSCONFIG_X86_H 
     22#ifndef INCLUDED_GR_FIR_SYSCONFIG_POWERPC_H 
     23#define INCLUDED_GR_FIR_SYSCONFIG_POWERPC_H 
    2424 
    2525#include <gr_fir_sysconfig_generic.h> 
    2626 
    27 class gr_fir_sysconfig_x86 : public gr_fir_sysconfig_generic { 
     27class gr_fir_sysconfig_powerpc : public gr_fir_sysconfig_generic { 
    2828public: 
    2929  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  
    11/* -*- c++ -*- */ 
    22/* 
    3  * Copyright 2002 Free Software Foundation, Inc. 
     3 * Copyright 2002,2008 Free Software Foundation, Inc. 
    44 *  
    55 * This file is part of GNU Radio 
     
    2424#include <config.h> 
    2525#endif 
    26 #include <gr_fir_sysconfig_x86.h> 
     26#include <gr_fir_sysconfig_powerpc.h> 
    2727 
    2828gr_fir_sysconfig * 
     
    3434    return singleton; 
    3535 
    36   singleton = new gr_fir_sysconfig_x86 (); 
     36  singleton = new gr_fir_sysconfig_powerpc (); 
    3737  return singleton; 
    3838}