Skip to content

Commit

Permalink
Test allocations on 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Sep 11, 2023
1 parent 7d5d7b2 commit 8a6cadf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
7 changes: 1 addition & 6 deletions src/inference/forward_backward.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ Base.length(fb::ForwardBackwardStorage) = size(fb.α, 1)
duration(fb::ForwardBackwardStorage) = size(fb.α, 2)

function loglikelihood(fb::ForwardBackwardStorage{R}) where {R}
logL = zero(R)
logL -= sum(log, fb.c)
logL += sum(fb.logm)
# for t in 1:duration(fb)
# logL += -log(fb.c[t]) + fb.logm[t]
# end
logL = -sum(log, fb.c) + sum(fb.logm)
return logL
end

Expand Down
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ using Test
@testset verbose = true "Type stability" begin
include("type_stability.jl")
end

@testset verbose = true "Allocations" begin
include("allocations.jl")
end
end

@testset "Interface" begin
Expand All @@ -31,10 +35,6 @@ using Test
include("correctness.jl")
end

@testset verbose = true "Allocations" begin
include("allocations.jl")
end

@testset verbose = true "Sparse" begin
include("sparse.jl")
end
Expand Down
8 changes: 4 additions & 4 deletions test/testitems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ end
include("type_stability.jl")
end

@testitem "Allocations" begin
include("allocations.jl")
end

@testitem "Interface" begin
include("interface.jl")
end
Expand All @@ -30,10 +34,6 @@ end
include("correctness.jl")
end

@testitem "Allocations" begin
include("allocations.jl")
end

@testitem "Sparse" begin
include("sparse.jl")
end
Expand Down

0 comments on commit 8a6cadf

Please sign in to comment.