Skip to content

Commit

Permalink
Fix opencl headers
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Jan 14, 2025
1 parent d7edcbd commit 4f53279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stan/math/rev/fun/inv_Phi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <stan/math/rev/meta.hpp>
#include <stan/math/rev/core.hpp>
#include <stan/math/prim/fun/exp.hpp>
#include <stan/math/prim/fun/inv_Phi.hpp>
#include <stan/math/prim/prob/std_normal_lpdf.hpp>
#include <stan/math/prim/functor/apply_scalar_binary.hpp>
Expand Down Expand Up @@ -38,7 +39,7 @@ inline auto inv_Phi(const T& p) {
const auto& arena_rtn = to_arena(inv_Phi(p.val()));
return make_callback_var(arena_rtn, [p, arena_rtn](auto& vi) mutable {
p.adj() += apply_scalar_binary(
vi.adj(), arena_rtn.val(), [](const auto& adj, const auto& rtn_val) {
vi.adj(), arena_rtn.val(), [](const double adj, const double rtn_val) {
return adj * exp(-std_normal_lpdf(rtn_val));
});
});
Expand Down

0 comments on commit 4f53279

Please sign in to comment.