discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] SIMD optimizations on FIR filters


From: Sérgio Rui Silva
Subject: Re: [Discuss-gnuradio] SIMD optimizations on FIR filters
Date: Tue, 15 Jul 2003 15:38:46 +0100 (WEST)
User-agent: PT Multimedia Webmail program

>>Are you sure you're not getting it?  It only prints once.

Sorry, my mistake... I'm getting the >>> gr_fir_FFF: using
3DNow! message as I should...

I made some alterations to the GrFIRfilterCCF class.

-> Taps can be changed in runtime: this is something that all
FIR and IIR filters classes should have and I added it to all
filter classes I'm using. When I have a correct patch to them
all I will send it.

--> The filter no longer uses the gr_fir_CCF, it now uses two
gr_fir_FFF classes (one for the real part and other for the
imaginary part), using this I achieved an increase of
performance of approximately 3x. This is fine for me, but if we
could have a gr_fir_CCF class with hand coded SIMD optimizations
an even bigger performance increase could be achieved.

Sergio Rui Silva

**************************************************************

  Faculdade de Engenharia da Universidade do Porto, Portugal 

                    http://www.fe.up.pt

***************************************************************

---------------------------------------------------------------------------------------
Words of wisdom:

"Never underestimate the bandwidth of a station wagon full of
tapes hurtling down the highway"

Andrew S. Tanenbaun
-------------------------------------------------------------------------------------
--
SAPO ADSL.PT, apanhe já o comboio da Banda Larga. Kit SAPO ADSL.PT - Grátis
http://adsl.sapo.pt

O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt

/* -*- c++ -*- */
/*
 * Copyright 2003 Free Software Foundation, Inc.
 * 
 * This file is part of GNU Radio
 * 
 * GNU Radio is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 * 
 * GNU Radio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with GNU Radio; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/*
*
* 15 July 2003
* Modifications:
* -> Taps can be changed in runtime;
* -> No longer uses the gr_fir_CCF, it now uses two gr_fir_FFF classes 
*  (one for the real part and other for the imaginary part), using this 
*  an increase of performance of approximately 3x is achievable.
*
*       Sergio Rui Silva (address@hidden)
*
*  Faculdade de Engenharia da Universidade do Porto, Portugal 
*
*                    http://www.fe.up.pt
*
*/

#ifndef _FIRFilterCCF2_H_
#define _FIRFilterCCF2_H_

#include <VrDecimatingSigProc.h>
#include <gr_fir_builderF.h>

class gr_fir_CCF;
class gr_fir_FFF;

/*!
 * \brief FIR filter with VrComplex input, VrComplex output and float taps
 */

class FIRFilterCCF2 : public VrDecimatingSigProc<VrComplex, VrComplex> {
 public:

  /*!
   * Construct a FIR filter with the given taps
   */

  FIRFilterCCF2 (int decimation_factor, const std::vector<float> &taps);

  /*!
   * Construct a FIR filter where the taps will be determined
   * at initialization time by invoking builder->taps (sampling_freq)
   *
   * FIRFilterCCF2 becomes responsible for life time management
   * of builder.
   */

  FIRFilterCCF2 (int decimation_factor, gr_fir_builderF *builder);
  virtual ~FIRFilterCCF2 ();

  virtual const char *name () { return "FIRFilterCCF2"; }
  virtual void initialize ();
  virtual void set_taps(const std::vector<float> &taps);
  virtual int work (VrSampleRange output, void *o[],
                    VrSampleRange inputs[], void *i[]);

 protected:
  gr_fir_builderF       *d_builder;
  gr_fir_FFF            *d_fir_real;
  gr_fir_FFF            *d_fir_imag;
  gr_fir_CCF            *d_fir;
};

#endif // _FIRFilterCCF2_H_

Attachment: FIRFilterCCF2.cpp
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]