Skip to content

Commit 6d35b89

Browse files
PetroZarytskyivgvassilev
authored andcommitted
Fix broken master after merging #1438 and #1437 at the same time.
This PR addresses 2 problems that arose after that: a mismatch in the signature of a new custom `reverse_forw` and a new tape popping up in a test.
1 parent 5df072d commit 6d35b89

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/clad/Differentiator/STLBuiltins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ template <
729729
typename It,
730730
typename ::clad::custom_derivatives::helpers::is_iterator<It>::type = 1>
731731
clad::ValueAndAdjoint<It, It> operator_plus_plus_reverse_forw(It* it, int,
732-
It* d_it, int*) {
732+
It* d_it, int) {
733733
return {++*it, ++*d_it};
734734
}
735735

lib/Differentiator/ReverseModeVisitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ Expr* ReverseModeVisitor::getStdInitListSizeExpr(const Expr* E) {
20392039
CallArgs, Loc, CUDAExecConfig)
20402040
.get();
20412041
}
2042-
if (call->getType()->isVoidType())
2042+
if (!needsForwPass)
20432043
return StmtDiff(call);
20442044
Expr* callRes = nullptr;
20452045
if (isInsideLoop)

0 commit comments

Comments
 (0)