Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
23f79a8
first draft of core functionality
georgematheos May 17, 2020
c9b1d49
add support for address schemas
georgematheos May 17, 2020
1e0a589
update choicemap docs
georgematheos May 17, 2020
623bc8f
refactoring and tests
georgematheos May 18, 2020
83349c7
performance improvements and benchmarking
georgematheos May 19, 2020
b9b5312
benchmark for dynamic choicemap lookups
georgematheos May 19, 2020
bce5e77
inline dynamicchoicemap methods
georgematheos May 19, 2020
a985f9b
remove old version benchmark file
georgematheos May 19, 2020
1f5029c
minor testing cleanup
georgematheos May 19, 2020
eb6adf7
ensure valuechoicemap[] syntax works
georgematheos May 19, 2020
eef9417
provide some examples in the documentation
georgematheos May 19, 2020
a83adfb
fix some typos
georgematheos May 19, 2020
1bd705f
add phrase 'nesting level zero' to docs
georgematheos May 19, 2020
676828b
distribution <: GenFn; dynamic DSL simplification
georgematheos Jun 17, 2020
5bf4207
simplify static ir code
georgematheos Jun 18, 2020
61673a4
brief documentation for Dist <: GenFn
georgematheos Jun 18, 2020
298a333
short map over distribution test
georgematheos Jun 18, 2020
e34875a
default static_get_submap = EmptyChoiceMap
georgematheos Jun 18, 2020
972d455
default static_get_submap = EmptyChoiceMap
georgematheos Jun 18, 2020
ee64d12
dist performance improvements
georgematheos Jun 18, 2020
fd1991f
minor performance improvement
georgematheos Jun 18, 2020
c3d5db0
performance improvement related to zip bug
georgematheos Jun 18, 2020
f652346
Merge branch '20200516-georgematheos-valuechoicemaps' into 20200617-g…
georgematheos Jun 20, 2020
8a43845
better static retdiff checking
georgematheos Jun 20, 2020
ffd9373
add static info for dist trace type
georgematheos Jun 25, 2020
67d5e12
don't use static get_submap for staticchoicemap
georgematheos Jun 25, 2020
4966ea9
some simple MH benchmarks
georgematheos Jun 25, 2020
0909a5b
bug fix
georgematheos Jun 25, 2020
47cca59
remove ChoiceAt; bug fixes
georgematheos Jun 25, 2020
10df952
decrease iters on benchmark
georgematheos Jun 25, 2020
a79390e
merge in updated master
georgematheos Jul 3, 2020
b1c4fc2
address_tree v0
georgematheos Jul 3, 2020
3d1b519
bug fixing
georgematheos Jul 5, 2020
bc9b7f6
bug fixes -> tests passing
georgematheos Jul 6, 2020
9c74360
remove old choicemap & selection code
georgematheos Jul 6, 2020
588e1dd
minor progress
georgematheos Jul 6, 2020
7d09e26
addrs, selection minus
georgematheos Jul 7, 2020
216118c
use for regenerate functionality
georgematheos Jul 7, 2020
7ef7904
remove unnecessary selection functions
georgematheos Jul 7, 2020
726a627
unify update & regenerate for static gen fns
georgematheos Jul 7, 2020
4194a5b
callat
georgematheos Jul 7, 2020
88a860b
map
georgematheos Jul 7, 2020
23c3dfc
unfold
georgematheos Jul 8, 2020
0bd125b
cleanup
georgematheos Jul 8, 2020
488eecd
fix bug in static NoChange inference
georgematheos Jul 8, 2020
eeebc5a
speedy changes to get UsingWorld working
georgematheos Jul 8, 2020
3645830
bug fixes with addresstrees
georgematheos Jul 8, 2020
78819ff
generate(, , ::Selection) --> generate(, , EmptyChoiceMap())
georgematheos Jul 9, 2020
7c69f4d
bug fixes & cleanup
georgematheos Jul 9, 2020
7844fd4
bug fixes and additional tests
georgematheos Jul 9, 2020
cdb0ce4
Merge remote-tracking branch 'upstream/better-macro-support' into 202…
georgematheos Jul 10, 2020
a320e13
SelectionLeaf & InvertedSelection
georgematheos Jul 27, 2020
cea1b66
bug fix
georgematheos Jul 27, 2020
481d891
has_value for any address tree; UnderlyingChoices; generate(,,::AddrT…
georgematheos Jul 27, 2020
b15d6c1
bug fixes
georgematheos Jul 27, 2020
ad93f20
invert selection schemas
georgematheos Jul 27, 2020
8da07fe
add update(disttr, _, _, Val, ::Empty)
georgematheos Jul 31, 2020
f339474
bug fix
georgematheos Jul 31, 2020
aa24dba
getproperty diffs; update fewer julia nodes in static DSL using diffs
georgematheos Aug 3, 2020
a80e9d4
error check on set_value
georgematheos Aug 20, 2020
5354537
fix deep_dynamic_copy bug
georgematheos Aug 20, 2020
f104677
small improvements to diffs
georgematheos Aug 20, 2020
c0d864a
bug fix
georgematheos Aug 20, 2020
e820035
update custom_determ for new update
georgematheos Aug 20, 2020
015f484
new diff tests
georgematheos Aug 20, 2020
dab37e6
dist bug fix
georgematheos Aug 20, 2020
8a92051
bug fixes in equality
georgematheos Aug 20, 2020
4cda43a
change bug behavior on overwriting values
georgematheos Aug 20, 2020
1b3b824
initial impls for setmap, multiset
georgematheos Aug 20, 2020
24fa021
fix method overwrite issues
georgematheos Aug 21, 2020
05f974c
add setmap tests
georgematheos Aug 21, 2020
d620d29
minor changes & bug fixes
georgematheos Aug 21, 2020
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
Prev Previous commit
Next Next commit
add static info for dist trace type
  • Loading branch information
georgematheos committed Jun 25, 2020
commit ffd9373c243593fbf46ef9b4331a93b9a787fdfd
3 changes: 3 additions & 0 deletions src/distribution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ end
abstract type Distribution{T} <: GenerativeFunction{T, DistributionTrace{T}} end
@inline DistributionTrace(val::T, args::Tuple, dist::Dist) where {T, Dist <: Distribution} = DistributionTrace{T, Dist}(val, args, logpdf(dist, val, args...))

# we need to know the specific distribution in the trace type so the compiler can specialize GFI calls fully
@inline get_trace_type(::Dist) where {T, Dist <: Distribution{T}} = DistributionTrace{T, Dist}

function Base.convert(::Type{DistributionTrace{U, <:Any}}, tr::DistributionTrace{<:Any, Dist}) where {U, Dist}
DistributionTrace{U, Dist}(convert(U, tr.val), tr.args, dist(tr))
end
Expand Down