ergo
MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel > Class Template Reference

Template for for translations between unpacked and packed matrix storage. More...

#include <mm_kernel_outer_A.h>

Classes

struct  Assign_to_packed
 
struct  Extract_from_packed
 

Public Types

typedef T_gemm_kernel::real real
 Real number type (usually float or double)
 
typedef Ordering_col_wise Ordering_block_A
 
typedef Ordering_col_wise Ordering_block_B
 
typedef Ordering_col_wise Ordering_block_C
 
typedef Pack< M_block, K_block, Ordering_block_A, typename T_gemm_kernel::Pack_type_A > Pack_type_A
 
typedef Pack< K_block, N_block, Ordering_block_B, typename T_gemm_kernel::Pack_type_B > Pack_type_B
 
typedef Pack< M_block, N_block, Ordering_block_C, typename T_gemm_kernel::Pack_type_C > Pack_type_C
 

Static Public Member Functions

template<template< typename T_ordering > class T_assign, typename T_ordering_matrix>
static void exec (typename T_assign< T_ordering_matrix >::PtrType X, typename T_assign< T_ordering_matrix >::PtrTypePacked X_packed, int const rows_total_matrix, int const cols_total_matrix)
 Elaborate function that can be called either to assign to or extract from packed format.
 
template<typename T_ordering_matrix>
static void pack (real const *const X, real *X_packed, int const rows_total_matrix, int const cols_total_matrix)
 Convenience function for assignments to packed matrix.
 
template<typename T_ordering_matrix>
static void unpack (real *X, real const *const X_packed, int const rows_total_matrix, int const cols_total_matrix)
 Convenience function for extracting matrix from packed matrix.
 
static void exec (real const *const *const A, real const *const *const B, real *const C, int const i=1)
 Executes the matrix-matrix multiply C += A B with the three matrices A, B, and C stored using the packing types of this class.
 

Static Public Attributes

static int const rows = rows_kernel * T_rows_block
 Number of rows in the matrix.
 
static int const cols = cols_kernel * T_cols_block
 Number of columns in the matrix.
 
static unsigned int const size_packed = T_rows_block * T_cols_block * T_pack_type_kernel::size_packed
 Memory needed to store the matrix in packed form.
 
static int const M_kernel
 Number of rows of A and C kernels.
 
static int const N_kernel
 Number of columns of B and C kernels.
 
static int const K_kernel
 Number of columns of A kernels and rows of B kernels.
 
static int const M_block
 Number of rows of A and C (blocks).
 
static int const N_block
 Number of columns of B and C (blocks).
 
static int const K_block
 Number of columns of A and rows of B (blocks).
 
static int const M
 Number of rows of A and C.
 
static int const N
 Number of columns of B and C.
 
static int const K
 Number of columns of A and rows of B.
 

Static Private Attributes

static int const rows_kernel = T_pack_type_kernel::rows
 
static int const cols_kernel = T_pack_type_kernel::cols
 

Detailed Description

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
class MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >

Template for for translations between unpacked and packed matrix storage.

Template arguments:

  • T_rows_block : number of rows (blocks)
  • T_cols_block : number of columns (blocks)
  • T_ordering_block : Type that specifies how the matrix blocks are stored
  • T_pack_type_kernel : Type specifying how each matrix block should be packed

Member Typedef Documentation

◆ Ordering_block_A

typedef Ordering_col_wise MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Ordering_block_A

◆ Ordering_block_B

typedef Ordering_col_wise MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Ordering_block_B

◆ Ordering_block_C

typedef Ordering_col_wise MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Ordering_block_C

◆ Pack_type_A

typedef Pack< M_block, K_block, Ordering_block_A, typename T_gemm_kernel::Pack_type_A > MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack_type_A

◆ Pack_type_B

typedef Pack< K_block, N_block, Ordering_block_B, typename T_gemm_kernel::Pack_type_B > MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack_type_B

◆ Pack_type_C

typedef Pack< M_block, N_block, Ordering_block_C, typename T_gemm_kernel::Pack_type_C > MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack_type_C

◆ real

typedef T_gemm_kernel::real MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::real

Real number type (usually float or double)

Member Function Documentation

◆ exec() [1/2]

void MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::exec ( real const *const *const A,
real const *const *const B,
real *const C,
int const i = 1 )
static

Executes the matrix-matrix multiply C += A B with the three matrices A, B, and C stored using the packing types of this class.

◆ exec() [2/2]

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
template<template< typename T_ordering > class T_assign, typename T_ordering_matrix>
static void MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::exec ( typename T_assign< T_ordering_matrix >::PtrType X,
typename T_assign< T_ordering_matrix >::PtrTypePacked X_packed,
int const rows_total_matrix,
int const cols_total_matrix )
inlinestatic

Elaborate function that can be called either to assign to or extract from packed format.

Use of types in T_assign automatically sets the const qualifier on the desired argument.

◆ pack()

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
template<typename T_ordering_matrix>
static void MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::pack ( real const *const X,
real * X_packed,
int const rows_total_matrix,
int const cols_total_matrix )
inlinestatic

Convenience function for assignments to packed matrix.

The template argument specifies how the original (unpacked) matrix is stored (e.g. column or row wise)

◆ unpack()

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
template<typename T_ordering_matrix>
static void MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::unpack ( real * X,
real const *const X_packed,
int const rows_total_matrix,
int const cols_total_matrix )
inlinestatic

Convenience function for extracting matrix from packed matrix.

The template argument specifies how the unpacked matrix is stored (e.g. column or row wise)

Member Data Documentation

◆ cols

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::cols = cols_kernel * T_cols_block
static

Number of columns in the matrix.

◆ cols_kernel

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::cols_kernel = T_pack_type_kernel::cols
staticprivate

◆ K

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::K
static

Number of columns of A and rows of B.

◆ K_block

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::K_block
static

Number of columns of A and rows of B (blocks).

◆ K_kernel

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::K_kernel
static

Number of columns of A kernels and rows of B kernels.

◆ M

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::M
static

Number of rows of A and C.

◆ M_block

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::M_block
static

Number of rows of A and C (blocks).

◆ M_kernel

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::M_kernel
static

Number of rows of A and C kernels.

◆ N

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::N
static

Number of columns of B and C.

◆ N_block

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::N_block
static

Number of columns of B and C (blocks).

◆ N_kernel

int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::N_kernel
static

Number of columns of B and C kernels.

◆ rows

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::rows = rows_kernel * T_rows_block
static

Number of rows in the matrix.

◆ rows_kernel

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::rows_kernel = T_pack_type_kernel::rows
staticprivate

◆ size_packed

template<typename T_gemm_kernel, int T_M_block, int T_N_block>
template<int T_rows_block, int T_cols_block, typename T_ordering_block, typename T_pack_type_kernel>
unsigned int const MM_kernel_outer_A< T_gemm_kernel, T_M_block, T_N_block >::Pack< T_rows_block, T_cols_block, T_ordering_block, T_pack_type_kernel >::size_packed = T_rows_block * T_cols_block * T_pack_type_kernel::size_packed
static

Memory needed to store the matrix in packed form.

(Can be used in the allocation of memory for the packed matrix.)


The documentation for this class was generated from the following file: