From 348b3d221f7af484fa95db7e0441415795d35629 Mon Sep 17 00:00:00 2001 From: kchristin Date: Sun, 27 Oct 2024 19:24:04 +0200 Subject: [PATCH] Improve set function of numRevIterations --- include/clad/Differentiator/ReverseModeVisitor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/clad/Differentiator/ReverseModeVisitor.h b/include/clad/Differentiator/ReverseModeVisitor.h index 4b8d22837..dd8b9e014 100644 --- a/include/clad/Differentiator/ReverseModeVisitor.h +++ b/include/clad/Differentiator/ReverseModeVisitor.h @@ -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); @@ -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.