Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::internal::householder_qr_inplace_blocked< MatrixQR, HCoeffs, MatrixQRScalar, InnerStrideIsOne > Struct Template Reference

#include <src/eigen/Eigen/src/QR/HouseholderQR.h>

Static Public Member Functions

static void run (MatrixQR &mat, HCoeffs &hCoeffs, Index maxBlockSize=32, typename MatrixQR::Scalar *tempData=0)
 

Detailed Description

template<typename MatrixQR, typename HCoeffs, typename MatrixQRScalar = typename MatrixQR::Scalar, bool InnerStrideIsOne = (MatrixQR::InnerStrideAtCompileTime == 1 && HCoeffs::InnerStrideAtCompileTime == 1)>
struct Eigen::internal::householder_qr_inplace_blocked< MatrixQR, HCoeffs, MatrixQRScalar, InnerStrideIsOne >

Member Function Documentation

◆ run()

template<typename MatrixQR , typename HCoeffs , typename MatrixQRScalar = typename MatrixQR::Scalar, bool InnerStrideIsOne = (MatrixQR::InnerStrideAtCompileTime == 1 && HCoeffs::InnerStrideAtCompileTime == 1)>
static void Eigen::internal::householder_qr_inplace_blocked< MatrixQR, HCoeffs, MatrixQRScalar, InnerStrideIsOne >::run ( MatrixQR &  mat,
HCoeffs &  hCoeffs,
Index  maxBlockSize = 32,
typename MatrixQR::Scalar *  tempData = 0 
)
inlinestatic
298 {
299 typedef typename MatrixQR::Scalar Scalar;
300 typedef Block<MatrixQR,Dynamic,Dynamic> BlockType;
301
302 Index rows = mat.rows();
303 Index cols = mat.cols();
304 Index size = (std::min)(rows, cols);
305
306 typedef Matrix<Scalar,Dynamic,1,ColMajor,MatrixQR::MaxColsAtCompileTime,1> TempType;
307 TempType tempVector;
308 if(tempData==0)
309 {
310 tempVector.resize(cols);
311 tempData = tempVector.data();
312 }
313
314 Index blockSize = (std::min)(maxBlockSize,size);
315
316 Index k = 0;
317 for (k = 0; k < size; k += blockSize)
318 {
319 Index bs = (std::min)(size-k,blockSize); // actual size of the block
320 Index tcols = cols - k - bs; // trailing columns
321 Index brows = rows-k; // rows of the block
322
323 // partition the matrix:
324 // A00 | A01 | A02
325 // mat = A10 | A11 | A12
326 // A20 | A21 | A22
327 // and performs the qr dec of [A11^T A12^T]^T
328 // and update [A21^T A22^T]^T using level 3 operations.
329 // Finally, the algorithm continue on A22
330
331 BlockType A11_21 = mat.block(k,k,brows,bs);
332 Block<HCoeffs,Dynamic,1> hCoeffsSegment = hCoeffs.segment(k,bs);
333
334 householder_qr_inplace_unblocked(A11_21, hCoeffsSegment, tempData);
335
336 if(tcols)
337 {
338 BlockType A21_22 = mat.block(k,k+bs,brows,tcols);
339 apply_block_householder_on_the_left(A21_22,A11_21,hCoeffsSegment, false); // false == backward
340 }
341 }
342 }
void householder_qr_inplace_unblocked(MatrixQR &mat, HCoeffs &hCoeffs, typename MatrixQR::Scalar *tempData=0)
Definition HouseholderQR.h:256
void apply_block_householder_on_the_left(MatrixType &mat, const VectorsType &vectors, const CoeffsType &hCoeffs, bool forward)
Definition BlockHouseholder.h:79
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:33
typename Traits< remove_cvref_t< L > >::Scalar Scalar
Definition Line.hpp:36
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183
size_t cols(const T &raster)
Definition MarchingSquares.hpp:60
size_t rows(const T &raster)
Definition MarchingSquares.hpp:55

References Eigen::internal::apply_block_householder_on_the_left(), Eigen::internal::householder_qr_inplace_unblocked(), and Eigen::PlainObjectBase< Derived >::resize().

Referenced by Eigen::HouseholderQR< _MatrixType >::computeInPlace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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