Skip to content

Commit

Permalink
Update Tape.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rghouzra authored Dec 1, 2024
1 parent 698b797 commit b3a07e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ T Tape<T>::getAndResetOutputAdjoint(slot_type slot) {
throw OutOfRange("Requested output slot does not exist");

T ret = std::move(derivatives_[slot]); // use move semantics
derivatives_[slot] = T(); // more efficient
derivatives_[slot] = T(); // more generic
return ret;
}

Expand Down

0 comments on commit b3a07e6

Please sign in to comment.