MOAB
4.9.3pre
|
#include <GeneralMatrixMatrixTriangular.h>
Public Types | |
enum | { BlockSize = meta_least_common_multiple<EIGEN_PLAIN_ENUM_MAX(mr,nr),EIGEN_PLAIN_ENUM_MIN(mr,nr)>::ret } |
typedef gebp_traits< LhsScalar, RhsScalar, ConjLhs, ConjRhs > | Traits |
typedef Traits::ResScalar | ResScalar |
Public Member Functions | |
void | operator() (ResScalar *_res, Index resStride, const LhsScalar *blockA, const RhsScalar *blockB, Index size, Index depth, const ResScalar &alpha) |
Definition at line 137 of file GeneralMatrixMatrixTriangular.h.
typedef Traits::ResScalar Eigen::internal::tribb_kernel< LhsScalar, RhsScalar, Index, mr, nr, ConjLhs, ConjRhs, UpLo >::ResScalar |
Definition at line 140 of file GeneralMatrixMatrixTriangular.h.
typedef gebp_traits<LhsScalar,RhsScalar,ConjLhs,ConjRhs> Eigen::internal::tribb_kernel< LhsScalar, RhsScalar, Index, mr, nr, ConjLhs, ConjRhs, UpLo >::Traits |
Definition at line 139 of file GeneralMatrixMatrixTriangular.h.
anonymous enum |
Definition at line 142 of file GeneralMatrixMatrixTriangular.h.
{ BlockSize = meta_least_common_multiple<EIGEN_PLAIN_ENUM_MAX(mr,nr),EIGEN_PLAIN_ENUM_MIN(mr,nr)>::ret };
void Eigen::internal::tribb_kernel< LhsScalar, RhsScalar, Index, mr, nr, ConjLhs, ConjRhs, UpLo >::operator() | ( | ResScalar * | _res, |
Index | resStride, | ||
const LhsScalar * | blockA, | ||
const RhsScalar * | blockB, | ||
Index | size, | ||
Index | depth, | ||
const ResScalar & | alpha | ||
) | [inline] |
Definition at line 145 of file GeneralMatrixMatrixTriangular.h.
{ typedef blas_data_mapper<ResScalar, Index, ColMajor> ResMapper; ResMapper res(_res, resStride); gebp_kernel<LhsScalar, RhsScalar, Index, ResMapper, mr, nr, ConjLhs, ConjRhs> gebp_kernel; Matrix<ResScalar,BlockSize,BlockSize,ColMajor> buffer; // let's process the block per panel of actual_mc x BlockSize, // again, each is split into three parts, etc. for (Index j=0; j<size; j+=BlockSize) { Index actualBlockSize = std::min<Index>(BlockSize,size - j); const RhsScalar* actual_b = blockB+j*depth; if(UpLo==Upper) gebp_kernel(res.getSubMapper(0, j), blockA, actual_b, j, depth, actualBlockSize, alpha, -1, -1, 0, 0); // selfadjoint micro block { Index i = j; buffer.setZero(); // 1 - apply the kernel on the temporary buffer gebp_kernel(ResMapper(buffer.data(), BlockSize), blockA+depth*i, actual_b, actualBlockSize, depth, actualBlockSize, alpha, -1, -1, 0, 0); // 2 - triangular accumulation for(Index j1=0; j1<actualBlockSize; ++j1) { ResScalar* r = &res(i, j + j1); for(Index i1=UpLo==Lower ? j1 : 0; UpLo==Lower ? i1<actualBlockSize : i1<=j1; ++i1) r[i1] += buffer(i1,j1); } } if(UpLo==Lower) { Index i = j+actualBlockSize; gebp_kernel(res.getSubMapper(i, j), blockA+depth*i, actual_b, size-i, depth, actualBlockSize, alpha, -1, -1, 0, 0); } } }