Skip to content

Commit

Permalink
some inverstigations
Browse files Browse the repository at this point in the history
  • Loading branch information
gojakuch committed Dec 9, 2024
1 parent 1ebc777 commit e870826
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Differentiator/ReverseModeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1555,9 +1555,9 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
// diffedOpCall->getTrailingRequiresClause()
);

// Cloned->addDecl(ClonedOpCall); // do we need this?
Cloned->addDecl(ClonedOpCall);

auto* diffedOpCall = DifferentiateCallOperatorIfLambda(Original, ClonedOpCall);
// auto* diffedOpCall = DifferentiateCallOperatorIfLambda(Original, ClonedOpCall);

// llvm::SmallVector<clang::ParmVarDecl*, 8> params;
// for (unsigned i = 0; i < diffedOpCall->param_size(); ++i) {
Expand Down Expand Up @@ -1592,7 +1592,7 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
}

StmtDiff ReverseModeVisitor::VisitLambdaExpr(const clang::LambdaExpr* LE) {
// ============== CAP
// ============== CAPTURES

auto children_iterator_range = LE->children();
std::vector<Expr *> children_Exp;
Expand Down Expand Up @@ -1633,7 +1633,7 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
llvm::ArrayRef<Expr*> childrenRef_Exp_dx; // =
// clad_compat::makeArrayRef(children_Exp_dx.data(), children_Exp_dx.size());

// ============== CAP
// ============== CAPTURES

// FIXME: ideally, we need to create a reverse_forw lambda and not copy the original one for the forward pass.
auto forwardLambdaClass = LE->getLambdaClass();
Expand Down Expand Up @@ -2310,7 +2310,7 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
// FIXME: Add support for reference arguments to the numerical diff. If
// it already correctly support reference arguments then confirm the
// support and add tests for the same.
if (!pullbackFD && !utils::HasAnyReferenceOrPointerArgument(FD) &&
if (!pullbackFD && !utils::HasAnyReferenceOrPointerArgument(FD) &&
!isa<CXXMethodDecl>(FD)) {
// Try numerically deriving it.
if (NArgs == 1) {
Expand Down

0 comments on commit e870826

Please sign in to comment.