-
Notifications
You must be signed in to change notification settings - Fork 1
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
Question #2
Comments
@Broadcasted replaces Base's @., but doesn't materialize the result, ie doesn't allocate. Instead, the broadcasted expression gets fed into the lpdf function (compare StanBlocks.jl/src/functions.jl Line 86 in cf7cc37
StanBlocks.jl/src/functions.jl Line 11 in cf7cc37
I think initial Benchmarking revealed that to be faster than doing it the "standard" way. I think that Stan either already does such an optimization OR is conceivably able to do it via Eigen (C++) expressions, ie without the "user" having to do additional stuff like adding the @Broadcasted macro. Doing it this way, including implementing the lpdf functions myself instead of relying on distributions.jl, made that optimizations easier to do. |
Thanks, very helpful. |
Hi, @nsiccha,
README
contains the following exampleIs there a reason for
@broadcasted
instead of more Julian broadcasting syntaxThe text was updated successfully, but these errors were encountered: