Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating opencl multi_normal_cholesky_lpdf to match the other implementation #3021

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion stan/math/opencl/prim/multi_normal_cholesky_lpdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ inline return_type_t<T_y_cl, T_loc_cl, T_covar_cl> multi_normal_cholesky_lpdf(
static const char* function = "multi_normal_cholesky_lpdf(OpenCL)";

check_consistent_sizes(function, "y", y, "mu", mu);
check_square(function, "covariance parameter", L);
check_size_match(function, "Size of random variable", y.rows(),
"rows of covariance parameter", L.rows());
check_square(function, "Cholesky decomposition of a variance matrix", L);
check_cholesky_factor(function, "Cholesky decomposition of a variance matrix",
L);

if (max_size(y, mu, L) == 0) {
return 0.0;
Expand Down