We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e242314 commit 7fcbec4Copy full SHA for 7fcbec4
src/combinators/spikemixture.jl
@@ -23,6 +23,14 @@ end
23
24
for func in [:logdensityof, :logdensity_def]
25
@eval @inline function $func(μ::SpikeMixture, x)
26
+ # NOTE: We could instead write this as
27
+ # R1 = typeof(log(one(μ.s)))
28
+ # R2 = typeof(log(one(μ.w)))
29
+
30
+ # which would rely on constant propagation insteadof type inference.
31
+ # We'll try this for now and come back to the question if we see
32
+ # problems.
33
34
R1 = Core.Compiler.return_type(log, Tuple{typeof(μ.s)})
35
R2 = Core.Compiler.return_type(log, Tuple{typeof(μ.w)})
36
R3 = Core.Compiler.return_type($func, Tuple{typeof(μ.m),typeof(x)})
0 commit comments