Skip to content

Commit

Permalink
Merge pull request #91 from fdarricau/master
Browse files Browse the repository at this point in the history
Fix for NumericQuadraticFunction with dynamic allocation checking
  • Loading branch information
bchretien committed Apr 13, 2015
2 parents 2be0719 + 83c5aea commit 793e71c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/roboptim/core/numeric-quadratic-function.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ namespace roboptim
GenericNumericQuadraticFunction<T>::impl_gradient
(gradient_ref gradient, const_argument_ref x, size_type) const
{
gradient.noalias () = 2 * a_ * x;
gradient += b_;
buffer_.noalias () = 2 * a_ * x;
buffer_ += b_;
gradient = buffer_;
}

// A
Expand Down

0 comments on commit 793e71c

Please sign in to comment.