Skip to content

Commit

Permalink
Improve set function of numRevIterations
Browse files Browse the repository at this point in the history
  • Loading branch information
kchristin22 committed Oct 28, 2024
1 parent 8800556 commit 348b3d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/clad/Differentiator/ReverseModeVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ namespace clad {
clang::Expr *m_Pop = nullptr;
clang::Expr *m_Push = nullptr;
ReverseModeVisitor& m_RMV;
clang::VarDecl* numRevIterations = nullptr;
clang::VarDecl* m_numRevIterations = nullptr;

public:
LoopCounter(ReverseModeVisitor& RMV);
Expand Down Expand Up @@ -553,12 +553,12 @@ namespace clad {
}

/// Sets the number of reverse iterations to be executed.
clang::VarDecl* setNumRevIterations(clang::VarDecl* numRevIterations) {
return this->numRevIterations = numRevIterations;
void setNumRevIterations(clang::VarDecl* numRevIterations) {
m_numRevIterations = numRevIterations;
}

/// Returns the number of reverse iterations to be executed.
clang::VarDecl* getNumRevIterations() const { return numRevIterations; }
clang::VarDecl* getNumRevIterations() const { return m_numRevIterations; }
};

/// Helper function to differentiate a loop body.
Expand Down

0 comments on commit 348b3d2

Please sign in to comment.