Commit 555fc986 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix bug in gemv binding

parent 7c593654
/*
* Copyright (C) 2010-2011 Dynare Team
* Copyright (C) 2010-2013 Dynare Team
*
* This file is part of Dynare.
*
......@@ -63,16 +63,19 @@ namespace blas
gemv(const char *transa, double alpha, const Mat1 &A,
const Vec2 &B, double beta, Vec3 &C)
{
blas_int m = A.getRows(), n = B.getSize(), k = A.getCols(), l = C.getSize();
blas_int m = A.getRows(), n = A.getCols();
if (*transa == 'T')
{
m = A.getCols();
k = A.getRows();
assert(C.getSize() == A.getCols());
assert(B.getSize() == A.getRows());
}
else
{
assert(C.getSize() == A.getRows());
assert(B.getSize() == A.getCols());
}
assert(m == l);
assert(k == n);
blas_int lda = A.getLd(), ldb = B.getStride(), ldc = C.getStride();
dgemv(transa, &m, &n, &alpha, A.getData(), &lda,
dgemv(transa, &m, &n, &alpha, A.getData(), &lda,
B.getData(), &ldb, &beta, C.getData(), &ldc);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment