k-order DLL: fix wrong assertion in MATLAB mode
Bug introduced in 4c6e911d6
(only apparent under Octave, since under MATLAB
assertions are skipped).
Ref #217
time-shift
parent
2169341639
commit
a101457cf0
|
@ -125,11 +125,12 @@ DynamicModelMFile::eval(const Vector &y, const Vector &x, const Vector &modParam
|
||||||
if (retVal != 0)
|
if (retVal != 0)
|
||||||
throw DynareException(__FILE__, __LINE__, "Trouble calling " + funcname);
|
throw DynareException(__FILE__, __LINE__, "Trouble calling " + funcname);
|
||||||
|
|
||||||
assert(static_cast<int>(mxGetM(plhs[0])) == md[i-1].nrows());
|
|
||||||
assert(static_cast<int>(mxGetN(plhs[0])) == md[i-1].ncols());
|
|
||||||
|
|
||||||
if (i == 1)
|
if (i == 1)
|
||||||
std::copy_n(mxGetPr(plhs[0]), mxGetM(plhs[0])*mxGetN(plhs[0]), md[i-1].base());
|
{
|
||||||
|
assert(static_cast<int>(mxGetM(plhs[0])) == md[i-1].nrows());
|
||||||
|
assert(static_cast<int>(mxGetN(plhs[0])) == md[i-1].ncols());
|
||||||
|
std::copy_n(mxGetPr(plhs[0]), mxGetM(plhs[0])*mxGetN(plhs[0]), md[i-1].base());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
unpackSparseMatrixAndCopyIntoTwoDMatData(plhs[0], md[i-1]);
|
unpackSparseMatrixAndCopyIntoTwoDMatData(plhs[0], md[i-1]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue