-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpmpp__blas.h
executable file
·57 lines (50 loc) · 1.84 KB
/
pmpp__blas.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef PMPP__BLAS_H_
#define PMPP__BLAS_H_
/**
* Kernel that performs the axpy BLAS operation
* @param a The constant "a"
* @param x The array "x"
* @param y The array "y"
* @param n The lenght of the arrays
*/
__global__ void pmpp__axpy_kernel(double a, double *x, double *y, int n);
/**
* The host function that performs the axpy BLAS operation
* @param a The constant "a"
* @param x The array "x"
* @param y The array "y"
* @param n The lenght of the arrays
*/
void pmpp__axpy_host(double a, double *x, double *y, int n);
/**
* Kernel that performs a naive (without tiling) GEMM operation
* @param A The matrix A
* @param B The matrix B
* @param C The matrix C
* @param I The number of rows of the matrix A
* @param J The number of columns of the matrix A (The number of rows of the matrix B)
* @param K The number of columns of the matrix B
*/
__global__ void pmpp__gemm_kernel(double *A, double *B, double * C, const int I, const int J, const int K);
/**
* Kernel that performs a tiled GEMM operation
* @param A The matrix A
* @param B The matrix B
* @param C The matrix C
* @param I The number of rows of the matrix A
* @param J The number of columns of the matrix A (The number of rows of the matrix B)
* @param K The number of columns of the matrix B
* @param TILE_WIDTH The tile width for square tiles
*/
__global__ void pmpp__tiled_gemm_kernel(double *A, double *B, double *C, const int I, const int J, const int K, const int TILE_WIDTH);
/**
* Host function that performs a naive GEMM operation
* @param A The matrix A
* @param B The matrix B
* @param C The matrix C
* @param I The number of rows of the matrix A
* @param J The number of columns of the matrix A (The number of rows of the matrix B)
* @param K The number of columns of the matrix B
*/
void pmpp__gemm_host(double *A, double *B, double *C, const int I,const int J,const int K);
#endif /* PMPP__BLAS_H_ */