probcomp / GenExperimental.jl

Featherweight embedded probabilistic programming language and compositional inference programming library
MIT License
17 stars 2 forks source link

Use dot operators for broadcasting elementwise operations in AD #46

Open marcoct opened 7 years ago

marcoct commented 7 years ago

Due to changes made in Julia 0.6, it is difficult or impossible to properly overload dot-operators for custom types. See https://github.com/JuliaLang/julia/issues/22053 and https://github.com/JuliaLang/julia/issues/22662. Currently I removed use of dot-operators for GenValue types to avoid this problem, and use e.g. ewise(*, a, b) instead of a .* b. It would be nice to revert to using the dot-operators, when the dust around dot-operators and broadcast in Julia has settled.