Skip to content

Commit

Permalink
fix cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
PetroZarytskyi committed Nov 25, 2024
1 parent 3acb66a commit de08917
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Differentiator/ReverseModeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,10 +1462,10 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
return foundExpr;
}
// Not found, construct the adjoint and register it.
VarDecl* VDDiff =
BuildVarDecl(VD->getType(), CreateUniqueIdentifier(nameDiff_str),
m_DerivativeFnScope->getParent()->getParent(), DC,
getZeroInit(VD->getType()));
QualType TyDiff = getNonConstType(VD->getType(), m_Context, m_Sema);
VarDecl* VDDiff = BuildVarDecl(
TyDiff, CreateUniqueIdentifier(nameDiff_str),
m_DerivativeFnScope->getParent()->getParent(), DC, getZeroInit(TyDiff));

DC->addDecl(VDDiff);
DC->makeDeclVisibleInContext(VDDiff);
Expand Down

0 comments on commit de08917

Please sign in to comment.