Handle some Index to int conversions in BLAS/LAPACK support.

This commit is contained in:
Gael Guennebaud
2016-05-26 17:29:04 +02:00
parent f253e19296
commit 2a44a70142
7 changed files with 21 additions and 20 deletions

View File

@@ -46,7 +46,7 @@ template<int StorageOrder> \
struct partial_lu_impl<EIGTYPE, StorageOrder, lapack_int> \
{ \
/* \internal performs the LU decomposition in-place of the matrix represented */ \
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) \
static lapack_int blocked_lu(Index rows, Index cols, EIGTYPE* lu_data, Index luStride, lapack_int* row_transpositions, lapack_int& nb_transpositions, lapack_int maxBlockSize=256) \
{ \
EIGEN_UNUSED_VARIABLE(maxBlockSize);\
lapack_int matrix_order, first_zero_pivot; \
@@ -54,11 +54,11 @@ struct partial_lu_impl<EIGTYPE, StorageOrder, lapack_int> \
EIGTYPE* a; \
/* Set up parameters for ?getrf */ \
matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \
lda = luStride; \
lda = convert_index<lapack_int>(luStride); \
a = lu_data; \
ipiv = row_transpositions; \
m = rows; \
n = cols; \
m = convert_index<lapack_int>(rows); \
n = convert_index<lapack_int>(cols); \
nb_transpositions = 0; \
\
info = LAPACKE_##MKLPREFIX##getrf( matrix_order, m, n, (MKLTYPE*)a, lda, ipiv ); \