openGPMP
Open Source Mathematics Package
|
Class for performing matrix multiplication on int type arrays. More...
#include <_igemm.hpp>
Public Member Functions | |
void | pack_micro_A (int k, const int *A, int incRowA, int incColA, int *buffer) |
Packs micro panels of size BLOCK_SZ_MR rows by k columns from A without padding. More... | |
void | pack_buffer_A (int mc, int kc, const int *A, int incRowA, int incColA, int *buffer) |
Packs panels from A with padding if needed. More... | |
void | pack_micro_B (int k, const int *B, int incRowB, int incColB, int *buffer) |
Packs micro panels of size BLOCK_SZ_NR columns by k rows from B without padding. More... | |
void | pack_buffer_B (int kc, int nc, const int *B, int incRowB, int incColB, int *buffer) |
Packs panels from B with padding if needed. More... | |
void | igemm_micro_kernel (int kc, int alpha, const int *A, const int *B, int beta, int *C, int incRowC, int incColC) |
Computes the micro kernel that multiplies panels from A and B. More... | |
void | igeaxpy (int m, int n, int alpha, const int *X, int incRowX, int incColX, int *Y, int incRowY, int incColY) |
Computes Y += alpha*X (int precision AX + Y) More... | |
void | igescal (int m, int n, int alpha, int *X, int incRowX, int incColX) |
Scales elements of X by alpha. More... | |
void | igemm_macro_kernel (int mc, int nc, int kc, int alpha, int beta, int *C, int incRowC, int incColC) |
Macro kernel for the multiplication of blocks of A and B. More... | |
void | igemm_nn (int m, int n, int k, int alpha, const int *A, int incRowA, int incColA, const int *B, int incRowB, int incColB, int beta, int *C, int incRowC, int incColC) |
Main IGEMM entrypoint, computes C <- beta*C + alpha*A*B. More... | |
Static Public Attributes | |
static int | IGEMM_BUFF_A [BLOCK_SZ_M *BLOCK_SZ_K] |
static int | IGEMM_BUFF_B [BLOCK_SZ_K *BLOCK_SZ_N] |
static int | IGEMM_BUFF_C [BLOCK_SZ_MR *BLOCK_SZ_NR] |
Class for performing matrix multiplication on int type arrays.
Definition at line 50 of file _igemm.hpp.
void gpmp::linalg::IGEMM::igeaxpy | ( | int | m, |
int | n, | ||
int | alpha, | ||
const int * | X, | ||
int | incRowX, | ||
int | incColX, | ||
int * | Y, | ||
int | incRowY, | ||
int | incColY | ||
) |
Computes Y += alpha*X (int precision AX + Y)
m | Number of rows |
n | Number of columns |
alpha | Scalar alpha |
X | Pointer to matrix X |
incRowX | Increment between consecutive rows of X |
incColX | Increment between consecutive columns of X |
Y | Pointer to matrix Y |
incRowY | Increment between consecutive rows of Y |
incColY | Increment between consecutive columns of Y |
Definition at line 208 of file igemm_arr.cpp.
void gpmp::linalg::IGEMM::igemm_macro_kernel | ( | int | mc, |
int | nc, | ||
int | kc, | ||
int | alpha, | ||
int | beta, | ||
int * | C, | ||
int | incRowC, | ||
int | incColC | ||
) |
Macro kernel for the multiplication of blocks of A and B.
mc | Number of rows in the block of C |
nc | Number of columns in the block of C |
kc | Number of columns in the blocks of A and rows of B |
alpha | Scalar alpha |
beta | Scalar beta |
C | Pointer to the output matrix C |
incRowC | Increment between consecutive rows of C |
incColC | Increment between consecutive columns of C |
Definition at line 265 of file igemm_arr.cpp.
References BLOCK_SZ_MR, BLOCK_SZ_NR, and python.linalg::C.
void gpmp::linalg::IGEMM::igemm_micro_kernel | ( | int | kc, |
int | alpha, | ||
const int * | A, | ||
const int * | B, | ||
int | beta, | ||
int * | C, | ||
int | incRowC, | ||
int | incColC | ||
) |
Computes the micro kernel that multiplies panels from A and B.
kc | Number of columns |
alpha | Scalar alpha |
A | Pointer to the packed panel A |
B | Pointer to the packed panel B |
beta | Scalar beta |
C | Pointer to the output matrix C |
incRowC | Increment between consecutive rows of C |
incColC | Increment between consecutive columns of C |
Definition at line 146 of file igemm_arr.cpp.
References python.linalg::A, python.linalg::B, BLOCK_SZ_MR, BLOCK_SZ_NR, and python.linalg::C.
void gpmp::linalg::IGEMM::igemm_nn | ( | int | m, |
int | n, | ||
int | k, | ||
int | alpha, | ||
const int * | A, | ||
int | incRowA, | ||
int | incColA, | ||
const int * | B, | ||
int | incRowB, | ||
int | incColB, | ||
int | beta, | ||
int * | C, | ||
int | incRowC, | ||
int | incColC | ||
) |
Main IGEMM entrypoint, computes C <- beta*C + alpha*A*B.
m | Number of rows of A and rows of C |
n | Number of columns of B and columns of C |
k | Number of columns of A and rows of B |
alpha | Scalar alpha |
A | Pointer to matrix A |
incRowA | Increment between consecutive rows of A |
incColA | Increment between consecutive columns of A |
B | Pointer to matrix B |
incRowB | Increment between consecutive rows of B |
incColB | Increment between consecutive columns of B |
beta | Scalar beta |
C | Pointer to matrix C |
incRowC | Increment between consecutive rows of C |
incColC | Increment between consecutive columns of C |
Definition at line 331 of file igemm_arr.cpp.
References python.linalg::A, python.linalg::B, BLOCK_SZ_K, BLOCK_SZ_M, BLOCK_SZ_N, and python.linalg::C.
void gpmp::linalg::IGEMM::igescal | ( | int | m, |
int | n, | ||
int | alpha, | ||
int * | X, | ||
int | incRowX, | ||
int | incColX | ||
) |
Scales elements of X by alpha.
m | Number of rows |
n | Number of columns |
alpha | Scalar alpha |
X | Pointer to matrix X |
incRowX | Increment between consecutive rows of X |
incColX | Increment between consecutive columns of X |
Definition at line 238 of file igemm_arr.cpp.
void gpmp::linalg::IGEMM::pack_buffer_A | ( | int | mc, |
int | kc, | ||
const int * | A, | ||
int | incRowA, | ||
int | incColA, | ||
int * | buffer | ||
) |
Packs panels from A with padding if needed.
mc | Number of rows to pack |
kc | Number of columns to pack |
A | Pointer to the source matrix A |
incRowA | Increment between consecutive rows of A |
incColA | Increment between consecutive columns of A |
buffer | Pointer to the buffer to store the packed panels |
Definition at line 67 of file igemm_arr.cpp.
References python.linalg::A, and BLOCK_SZ_MR.
void gpmp::linalg::IGEMM::pack_buffer_B | ( | int | kc, |
int | nc, | ||
const int * | B, | ||
int | incRowB, | ||
int | incColB, | ||
int * | buffer | ||
) |
Packs panels from B with padding if needed.
kc | Number of rows to pack |
nc | Number of columns to pack |
B | Pointer to the source matrix B |
incRowB | Increment between consecutive rows of B |
incColB | Increment between consecutive columns of B |
buffer | Pointer to the buffer to store the packed panels |
Definition at line 115 of file igemm_arr.cpp.
References python.linalg::B, and BLOCK_SZ_NR.
void gpmp::linalg::IGEMM::pack_micro_A | ( | int | k, |
const int * | A, | ||
int | incRowA, | ||
int | incColA, | ||
int * | buffer | ||
) |
Packs micro panels of size BLOCK_SZ_MR rows by k columns from A without padding.
k | Number of columns to pack |
A | Pointer to the source matrix A |
incRowA | Increment between consecutive rows of A |
incColA | Increment between consecutive columns of A |
buffer | Pointer to the buffer to store the packed micro panels |
Definition at line 50 of file igemm_arr.cpp.
References python.linalg::A, and BLOCK_SZ_MR.
void gpmp::linalg::IGEMM::pack_micro_B | ( | int | k, |
const int * | B, | ||
int | incRowB, | ||
int | incColB, | ||
int * | buffer | ||
) |
Packs micro panels of size BLOCK_SZ_NR columns by k rows from B without padding.
k | Number of rows to pack |
B | Pointer to the source matrix B |
incRowB | Increment between consecutive rows of B |
incColB | Increment between consecutive columns of B |
buffer | Pointer to the buffer to store the packed micro panels |
Definition at line 98 of file igemm_arr.cpp.
References python.linalg::B, and BLOCK_SZ_NR.
|
static |
< Buffer for storing packed micro panels of A
Buffer for storing packed micro panels of B
Integer type GEneral Matrix-Matrix product
Definition at line 53 of file _igemm.hpp.
|
static |
Buffer for storing intermediate results
Definition at line 55 of file _igemm.hpp.
|
static |
Definition at line 57 of file _igemm.hpp.