Commit 968e411c authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Make indexing in temporary terms array ready for a (hypothetical future) implementation in C

parent f4b633b1
......@@ -121,7 +121,7 @@ ExprNode::checkIfTemporaryTermThenWrite(ostream &output, ExprNodeOutputType outp
// It is the responsibility of the caller to ensure that all temporary terms have their index
assert(it2 != temporary_terms_idxs.end());
output << "T" << LEFT_ARRAY_SUBSCRIPT(output_type)
<< it2->second
<< it2->second + ARRAY_SUBSCRIPT_OFFSET(output_type)
<< RIGHT_ARRAY_SUBSCRIPT(output_type);
}
return true;
......
......@@ -1179,7 +1179,7 @@ ModelTree::computeTemporaryTerms(bool is_matlab)
temporary_terms_g2 = temp_terms_map[eSecondDeriv];
temporary_terms_g3 = temp_terms_map[eThirdDeriv];
int idx = 1;
int idx = 0;
for (map<expr_t, expr_t>::const_iterator it = temporary_terms_mlv.begin();
it != temporary_terms_mlv.end(); it++)
temporary_terms_idxs[it->first] = idx++;
......
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