add @inbounds to static and dynamic Jacobian

time-shift
Houtan Bastani 2015-08-20 12:12:17 +02:00
parent a244754a15
commit 786d1bfcf1
1 changed files with 4 additions and 1 deletions

View File

@ -1470,7 +1470,10 @@ ModelTree::set_cutoff_to_zero()
void
ModelTree::jacobianHelper(ostream &output, int eq_nb, int col_nb, ExprNodeOutputType output_type) const
{
output << " g1" << LEFT_ARRAY_SUBSCRIPT(output_type);
output << " ";
if (IS_JULIA(output_type))
output << "@inbounds ";
output << "g1" << LEFT_ARRAY_SUBSCRIPT(output_type);
if (IS_MATLAB(output_type) || IS_JULIA(output_type))
output << eq_nb + 1 << "," << col_nb + 1;
else