diff options
author | Pjotr Prins | 2017-12-07 09:16:25 +0000 |
---|---|---|
committer | Pjotr Prins | 2017-12-07 09:16:25 +0000 |
commit | 87223540e63f6da7ea085c1379deacc23b6ba5dc (patch) | |
tree | 2a1e1991afed471748e8212c75e13c11e756008c /src/lapack.cpp | |
parent | 29df576cca8052e4aa9142ce1bb0ab490b864976 (diff) | |
download | pangemma-87223540e63f6da7ea085c1379deacc23b6ba5dc.tar.gz |
Some more overflow checks
Diffstat (limited to 'src/lapack.cpp')
-rw-r--r-- | src/lapack.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lapack.cpp b/src/lapack.cpp index ee0a497..26333b6 100644 --- a/src/lapack.cpp +++ b/src/lapack.cpp @@ -128,6 +128,10 @@ void lapack_dgemm(char *TransA, char *TransB, double alpha, const gsl_matrix *A, gsl_matrix *C_t = gsl_matrix_alloc(C->size2, C->size1); gsl_matrix_transpose_memcpy(C_t, C); + check_int_mult_overflow(M,K1); + check_int_mult_overflow(N,K1); + check_int_mult_overflow(M,N); + dgemm_(TransA, TransB, &M, &N, &K1, &alpha, A_t->data, &LDA, B_t->data, &LDB, &beta, C_t->data, &LDC); |