gpu
This commit is contained in:
parent
8b3bb9c382
commit
d976cfaf74
37 changed files with 2669 additions and 371 deletions
19
gpu/tp4/c/src/conv.h
Normal file
19
gpu/tp4/c/src/conv.h
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue