Skip to content

Commit 94df593

Browse files
pcaspersjenkins
authored andcommitted
QPR-12028 add a note
1 parent b9b97ee commit 94df593

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

QuantExt/qle/ad/forwardderivatives.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
namespace QuantExt {
3030

31+
/* Note: This formulation assumes a separate forward run to calculate the values. We could combine the calculation of
32+
the values and derivatives and apply the deleter to improve memory consumption */
33+
3134
template <class T>
3235
void forwardDerivatives(const ComputationGraph& g, const std::vector<T>& values, std::vector<T>& derivatives,
3336
const std::vector<std::function<std::vector<T>(const std::vector<const T*>&, const T*)>>& grad,

0 commit comments

Comments
 (0)