From 63173c823d86f2a87eaf7c4b0cc98a1039371936 Mon Sep 17 00:00:00 2001 From: MichelJuillard <michel.juillard@mjui.fr> Date: Fri, 31 Mar 2023 22:05:17 +0200 Subject: [PATCH] fix for clang error "local binding used in enclosing function" --- src/ModelTree.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ModelTree.cc b/src/ModelTree.cc index cc273150..632e4929 100644 --- a/src/ModelTree.cc +++ b/src/ModelTree.cc @@ -357,6 +357,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t &eval_context) const jacob_map_t contemporaneous_jacobian; for (const auto &[indices, d1] : derivatives[1]) { + auto &d11 = d1; int deriv_id = indices[1]; if (getTypeByDerivID(deriv_id) == SymbolType::endogenous) { @@ -367,7 +368,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t &eval_context) const { try { - return d1->eval(eval_context); + return d11->eval(eval_context); } catch (ExprNode::EvalExternalFunctionException &e) { @@ -1885,11 +1886,14 @@ ModelTree::initializeMEXCompilationWorkers(int numworkers, const filesystem::pat mex_compilation_done.insert(output); */ /* The object just compiled may be a prerequisite for several + mex_compilation_done.insert(output); + */ + /* The object just compiled may be a prerequisite for several other objects, so notify all waiting workers. Also needed to notify the main thread when in ModelTree::waitForMEXCompilationWorkers().*/ /* - mex_compilation_cv.notify_all(); + mex_compilation_cv.notify_all(); } }); */ -- GitLab