Finite Impulse Response (FIR) Filter in CUDA implemented as a 1D convolution

In this post, we consider the problem of calculating the output of a FIR (Finite Impulse Response) filter by directly evaluating the 1D convolution in CUDA.

In the case when the filter impulse response duration isĀ long, one thing that can be done to evaluate the filtered input is performing the calculations directly in the conjugate domain using FFTs.

On our GitHub website, a sample code using the cuFFT library is reported. It is a direct translation of the Matlab-based example reported at Low-Pass Filtering by FFT Convolution

Opposite to that, when the convolution kernel has short duration, implementing a hand-written kernel exploiting shared memory caching may be more convenient. An example is reported on our GitHub website.

More details can be found in the book by D.B. Kirk and W.-m. W. Hwu: Programming Massively Parallel Processors, Second Edition: A Hands-on Approach

2 thoughts on “Finite Impulse Response (FIR) Filter in CUDA implemented as a 1D convolution

  1. Hi,
    I am trying to compile this example (I cloned all your github repositories to get the relevant files), but my compile fails with:
    CUDA-Utilities/ fatal error: BBComplex.h: No such file or directory
    Looking though your github repos, I can’t locate the file BBComplex.h; can you please let me know where I can get it?

    1. OrangeOwl says:

      Hi, thank you for your interest in our post. The file you are looking for is in the ComplexCUDA repository on GitHub.
      Have a nice day.

Leave a Reply

Your email address will not be published. Required fields are marked *