Skip to content

Commit

Permalink
test1
Browse files Browse the repository at this point in the history
  • Loading branch information
gojakuch committed Sep 22, 2024
1 parent 5e6a1f4 commit 556e58c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/clad/Differentiator/STLBuiltins.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,27 @@ void push_back_reverse_forw(::std::vector<T>* v, U val, ::std::vector<T>* d_v,
d_v->push_back(0);
}

template <typename T, typename U>
void push_back_reverse_forw(::std::vector<T>* v, U val, ::std::vector<T>* d_v,
U /*d_val*/) {
v->push_back(val);
d_v->push_back(0);
}

template <typename T, typename U, typename pU>
void push_back_pullback(::std::vector<T>* v, U val, ::std::vector<T>* d_v,
pU* d_val) {
*d_val += d_v->back();
d_v->pop_back();
}

template <typename T, typename U>
void push_back_pullback(::std::vector<T>* v, U val, ::std::vector<T>* d_v,
U* d_val) {
*d_val += d_v->back();
d_v->pop_back();
}

template <typename T>
clad::ValueAndAdjoint<T&, T&> operator_subscript_reverse_forw(
::std::vector<T>* vec, typename ::std::vector<T>::size_type idx,
Expand Down

0 comments on commit 556e58c

Please sign in to comment.