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

31
gpu/tp5/c/src/matrix.h Normal file
View file

@ -0,0 +1,31 @@
#pragma once
#include <vector>
#include <iostream>
constexpr int threads_per_bloc = 16;
constexpr int T = threads_per_bloc;
//
// CPU
//
std::vector<int> matmul1(
const std::vector<int>& A,
const std::vector<int>& B,
int N, int M, int P);
//
// GPU
//
std::vector<int> matmul2(
const std::vector<int>& A,
const std::vector<int>& B,
int N, int M, int P);
//
// GPU by bloc
//
std::vector<int> matmul3(
const std::vector<int>& A,
const std::vector<int>& B,
int N, int M, int P);