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 27, 2024
1 parent e8d644d commit e1745be
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 @@ -503,7 +503,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 @@ -538,12 +538,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 e1745be

Please sign in to comment.