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