-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove m_DerivativeForForwSweep from StmtDiff.
Currently, ``m_DerivativeForForwSweep`` is used to store adjoint to the reference to a given expression. e.g. 1) for ``x``, it stores ``_d_x`` 2) for ``x[i]``, ``_d_x[i]`` etc. We only use ``m_DerivativeForForwSweep`` to initialize reference-type variables. However, to initialize pointers, we use ``getExpr_dx()``. Pointers and references are equivalent and should be initialized the same way. When differentiating expressions, we initialize ``m_DerivativeForForwSweep`` either with the same value as ``Expr_dx`` or with ``nullptr``.
- Loading branch information
1 parent
d4d29d8
commit 715f6d2
Showing
2 changed files
with
27 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters