/simple-convolution

This is a simple convolution implementation both for CPU_only and GPU_only (using CUDA)

Primary LanguageCudaMIT LicenseMIT

Simple Convolution

This is a simple convolution implementation both for CPU_only and GPU_only (using CUDA).

In this project I implimented the convolution algorithm both for a 1d vector and a 2d vector. Both implimentations are templated so you can pass any typename you need.

Getting started

Firstly, iclude the Convolution.h file. #include "Convolution.h"

Then you can use the static methods myConvolve passing the correct inputs

1D vectors

To use the one dimentional convolution function just call the myConvolve function with 2 vectors of doubles.

std::vector<T> input, filter, conv;
conv = nvolution::myConvolve(input, filter);

1d-conv

2D vectors

To use the 2 dimentional convolution function just call the myConvolve function with 2 2d vectors of doubles.

std::vector<std::vector<T>> input, filter, conv;
conv = nvolution::myConvolve(input, filter);

1d-conv