![]() |
Eigen
5.0.1
|
Classes | |
| class | gemm |
| class | transB |
| class | trsm |
This namespace contains various classes used to generate compile-time unrolls which are used throughout the trsm/gemm kernels. The unrolls are characterized as for-loops (1-D), nested for-loops (2-D), or triple nested for-loops (3-D). Unrolls are generated using std::integer_sequence
Example, the 2-D for-loop is unrolled by first flattening to a 1-D loop.
for(startI = 0; startI < endI; startI++) for(startC = 0; startC < endI*endJ; startC++) for(startJ = 0; startJ < endJ; startJ++) ----> startI = (startC)/(endJ) func(startI,startJ) startJ = (startC)%(endJ) func(...)
The 1-D loop can be expanded by using an auxiliary function with a template parameter used as an index.
template <endI, endJ, index> aux_func { startC = index startI = (startC)/(endJ) startJ = (startC)%(endJ) func(startI, startJ) }
Note: Additional wrapper functions are provided for aux_func which build the integer_sequence from endI, endJ, etc.
Conventions: 1) endX: specifies the terminal value for the for-loop, (ex: for(startX = 0; startX < endX; startX++))
2) rem, remM, remK template parameters are used for deciding whether to use masked operations for handling remaining tails (when sizes are not multiples of PacketSize or EIGEN_AVX_MAX_NUM_ROW)