-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Vectorise ternary functions #2638
Comments
Great! |
Ah cool. How does stanc3 handle the ternary operator? I was thinking that the vectorised |
With the ternary C++ operator: real a = k > 0 ? 5 : 10; is generated as: a = (logical_gt(k, 0) ? 5 : 10); Maybe we should think about using |
Sounds good, will do! |
Description
As with the unary and binary functions, it would useful to add a framework for vectorising ternary functions (like
fma
,inc_beta
, andif_else
).Eigen has a framework
CwiseTernaryOp
which we can use in combination with the existingapply_scalar_binary
framework to cover the various combinationsCurrent Version:
v4.2.1
The text was updated successfully, but these errors were encountered: