mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add template to specify QR permutation index type, Fix ColPivHouseholderQR Lapacke bindings
This commit is contained in:
@@ -70,6 +70,7 @@ namespace lapacke_helpers {
|
||||
|
||||
template<typename Scalar, UpLoType Mode>
|
||||
struct lapacke_llt {
|
||||
EIGEN_STATIC_ASSERT(((Mode == Lower) || (Mode == Upper)),MODE_MUST_BE_UPPER_OR_LOWER)
|
||||
template<typename MatrixType>
|
||||
static Index blocked(MatrixType& m)
|
||||
{
|
||||
@@ -80,10 +81,11 @@ namespace lapacke_helpers {
|
||||
/* Set up parameters for ?potrf */
|
||||
lapack_int size = to_lapack(m.rows());
|
||||
lapack_int matrix_order = lapack_storage_of(m);
|
||||
constexpr char uplo = Mode == Upper ? 'U' : 'L';
|
||||
Scalar* a = &(m.coeffRef(0,0));
|
||||
lapack_int lda = to_lapack(m.outerStride());
|
||||
|
||||
lapack_int info = potrf(matrix_order, translate_mode<Mode>, size, to_lapack(a), lda );
|
||||
lapack_int info = potrf(matrix_order, uplo, size, to_lapack(a), lda );
|
||||
info = (info==0) ? -1 : info>0 ? info-1 : size;
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user