Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8409aae
creates a partials_propagator class to use instead of operands_and_pa…
SteveBronder Nov 1, 2022
19632bf
remove _impl from partials_propogation name and have maker function b…
SteveBronder Nov 1, 2022
b92f6f7
remove stan::math:: from edge calls
SteveBronder Nov 1, 2022
5aee33c
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Nov 1, 2022
4842aca
fix headers and add d() member to fvar
SteveBronder Nov 2, 2022
83e722f
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Nov 2, 2022
8d5d1a1
fix test names
SteveBronder Nov 3, 2022
29073d2
Merge branch 'feature/tuple-ops-partials3' of github.com:stan-dev/mat…
SteveBronder Nov 3, 2022
7bf3c7f
fix test name
SteveBronder Nov 3, 2022
4058343
header fix
SteveBronder Nov 3, 2022
03f02e2
unused local typedef
SteveBronder Nov 3, 2022
b864e8e
unused local typedef
SteveBronder Nov 3, 2022
cc63d3e
unused local typedef
SteveBronder Nov 3, 2022
02f91b5
update to develop
SteveBronder May 1, 2023
e8756f2
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot May 1, 2023
13b1a6e
Merge remote-tracking branch 'origin/develop' into feature/tuple-ops-…
SteveBronder May 2, 2023
adbd368
add partials function as a little helper
SteveBronder May 2, 2023
362fdc5
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot May 2, 2023
8e0f87f
add partials_vec helper function
SteveBronder May 2, 2023
6624034
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot May 2, 2023
edafa0b
Fixup ops_partials_edge for fvar
SteveBronder May 10, 2023
b1ef8d8
Merge commit '111f7832a17aa338bb454146f4ab3c6ba66c9e7f' into HEAD
yashikno May 10, 2023
296e8dc
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot May 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
  • Loading branch information
stan-buildbot committed May 10, 2023
commit 296e8dca8bdf700cb62bde9c76fbfce3efaaa6dd
7 changes: 4 additions & 3 deletions stan/math/fwd/functor/operands_and_partials.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ class ops_partials_edge<InnerType, T, require_std_vector_vt<is_fvar, T>> {

const Op& operands_;
inline Dx dx() {
return dot_product(as_column_vector_or_scalar(this->partials_),
as_column_vector_or_scalar(this->operands_).d());
return dot_product(as_column_vector_or_scalar(this->partials_),
as_column_vector_or_scalar(this->operands_).d());
}
};

Expand Down Expand Up @@ -160,7 +160,8 @@ class ops_partials_edge<Dx, std::vector<Eigen::Matrix<fvar<Dx>, R, C>>> {
inline Dx dx() {
Dx derivative(0);
for (size_t i = 0; i < this->operands_.size(); ++i) {
derivative += sum(elt_multiply(this->partials_vec_[i], this->operands_[i].d()));
derivative
+= sum(elt_multiply(this->partials_vec_[i], this->operands_[i].d()));
}
return derivative;
}
Expand Down
8 changes: 6 additions & 2 deletions stan/math/prim/functor/operands_and_partials.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,17 @@ struct ops_partials_edge<ViewElt, Op, require_st_arithmetic<Op>> {
* Get the operand for the edge. For doubles this is a compile time
* expression returning zero.
*/
static constexpr double operand() noexcept { return static_cast<double>(0.0); }
static constexpr double operand() noexcept {
return static_cast<double>(0.0);
}

/**
* Get the partial for the edge. For doubles this is a compile time
* expression returning zero.
*/
static constexpr double partial() noexcept { return static_cast<double>(0.0); }
static constexpr double partial() noexcept {
return static_cast<double>(0.0);
}
/**
* Return the tangent for the edge. For doubles this is a comple time
* expression returning zero.
Expand Down