This commit is contained in:
JOLIMAITRE Matthieu 2024-03-28 17:58:33 +01:00
parent 8b3bb9c382
commit d976cfaf74
37 changed files with 2669 additions and 371 deletions

19
gpu/tp4/c/src/conv.h Normal file
View file

@ -0,0 +1,19 @@
#pragma once
#include <iostream>
#include <vector>
//
// 1D convolution
// - x: input array of size N
// - y: kernel of odd size M
//
// CPU
std::vector<int> conv1(const std::vector<int>& x, const std::vector<int>& y);
// GPU (naive)
std::vector<int> conv2(const std::vector<int>& x, const std::vector<int>& y);
// GPU (optimized)
std::vector<int> conv3(const std::vector<int>& x, const std::vector<int>& y);