33 #ifndef EIGEN_PARTIALLU_LAPACK_H
34 #define EIGEN_PARTIALLU_LAPACK_H
36 #include "Eigen/src/Core/util/MKL_support.h"
44 #define EIGEN_MKL_LU_PARTPIV(EIGTYPE, MKLTYPE, MKLPREFIX) \
45 template<int StorageOrder> \
46 struct partial_lu_impl<EIGTYPE, StorageOrder, lapack_int> \
49 static lapack_int blocked_lu(lapack_int rows, lapack_int cols, EIGTYPE* lu_data, lapack_int luStride, lapack_int* row_transpositions, lapack_int& nb_transpositions, lapack_int maxBlockSize=256) \
51 EIGEN_UNUSED_VARIABLE(maxBlockSize);\
52 lapack_int matrix_order, first_zero_pivot; \
53 lapack_int m, n, lda, *ipiv, info; \
56 matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \
59 ipiv = row_transpositions; \
62 nb_transpositions = 0; \
64 info = LAPACKE_##MKLPREFIX##getrf( matrix_order, m, n, (MKLTYPE*)a, lda, ipiv ); \
66 for(int i=0;i<m;i++) { ipiv[i]--; if (ipiv[i]!=i) nb_transpositions++; } \
68 eigen_assert(info >= 0); \
71 first_zero_pivot = info; \
72 return first_zero_pivot; \
76 EIGEN_MKL_LU_PARTPIV(
double,
double, d)
77 EIGEN_MKL_LU_PARTPIV(
float,
float, s)
78 EIGEN_MKL_LU_PARTPIV(dcomplex, MKL_Complex16, z)
79 EIGEN_MKL_LU_PARTPIV(scomplex, MKL_Complex8, c)
85 #endif // EIGEN_PARTIALLU_LAPACK_H
Definition: Eigen_Colamd.h:54