tylerjw / cuda_fir

CUDA implementation of complex single precision float FIR filter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CUDA FIR filter

Optimized cuda FIR filter implementation for complex sample data. Generic CPU implementation for reference. Python code for generating and testing vectors.

Building

You will need a working install of the Cuda Development Enviroment with the binary directory in your path.

  1. Follow post install steps on nvidia's website (if this is the first time using cuda): Post install instructions

  2. Checkout the code

git clone https://github.com/tylerjw/cuda_fir.git
  1. Create build directory
cd cuda_fir
mkdir build
cd build
  1. Run cmake
cmake ../
  1. Build
make

Python Scripts

In the scripts directory there are a few python scripts. You will need python3 with scipy and numpy to run them.

  • generateExampleData.py - creates noise.cap and filtered.cap and plots fft of them into png files
  • samples.py - plots fft of cpuout.cap and cudaout.cap in png files
  • testout.py - compares cpuout.cap and cudaout.cap

Running

  1. Use scripts/generateExampleData.py to generate sample data.
  2. Run the code to generate outputs.
  3. Use scripts/samples.py and scripts/testout.py to compare.
python3 scripts/generateExampleData.py
build/bin/main noise.cap cpuout.cap cudaout.cap
python3 scripts/samples.py
python3 scripts/testout.py

About

CUDA implementation of complex single precision float FIR filter

License:MIT License


Languages

Language:C++ 31.9%Language:Cuda 31.2%Language:Python 17.1%Language:Shell 9.6%Language:CMake 8.5%Language:C 1.7%