Skip to content

Commit

Permalink
Remove unnecessary copies
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Oct 2, 2023
1 parent c5051b5 commit 6c3f99f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/ik_gradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ auto step(GradientIk& self, Robot const& robot, CostFn const& cost_fn, double st
auto const count = self.local.size();

// compute gradient direction
self.working = self.local;
for (size_t i = 0; i < count; ++i) {
// test negative displacement
self.working[i] = self.local[i] - step_size;
Expand Down Expand Up @@ -55,8 +54,6 @@ auto step(GradientIk& self, Robot const& robot, CostFn const& cost_fn, double st
[&](auto value) { return value * f; });

// initialize line search
self.working = self.local;

for (size_t i = 0; i < count; ++i) {
self.working[i] = self.local[i] - self.gradient[i];
}
Expand Down

0 comments on commit 6c3f99f

Please sign in to comment.