diff --git a/src/gammas/gammaNUMCKpar.jl b/src/gammas/gammaNUMCKpar.jl index 123f6e0..36a72da 100755 --- a/src/gammas/gammaNUMCKpar.jl +++ b/src/gammas/gammaNUMCKpar.jl @@ -37,11 +37,10 @@ Numeric comparison of two columns - `cut_a::Number=1`: Lower bound for close string distances. - `cut_b::Number=2`: Lower bound for partial string distances. """ -function gammaNUMCKpar!(vecA, vecB, +function gammaNUMCKpar!(vecA::Vector, vecB::Vector, results::DiBitMatrix; cut_a=1,cut_b=2, partial::Bool=true) - N_a = length(vecA) N_b = length(vecB) @@ -72,16 +71,21 @@ function gammaNUMCKpar!(vecA, vecB, # preallocation of ranges for the threads tids = Threads.nthreads() - breaksize= len ÷ (tids-1) - starts = (collect(0:(tids-1))) .* breaksize .+ 1 - ends = starts[:] - if last(starts) == len - pop!(starts) - popfirst!(ends) - else - ends = append!(starts[:], [len]) - popfirst!(ends) + starts = [1] + ends = [len] + if tids > 1 + breaksize = len ÷ (tids-1) + starts = (collect(0:(tids-1))) .* breaksize .+ 1 + ends = starts[:] + if last(starts) == len + pop!(starts) + popfirst!(ends) + else + ends = append!(starts[:], [len]) + popfirst!(ends) + end end + tids=length(starts) Threads.@threads for tid in 1:tids diff --git a/src/patterns.jl b/src/patterns.jl index b7c7313..16ee2c4 100644 --- a/src/patterns.jl +++ b/src/patterns.jl @@ -192,7 +192,9 @@ end function match_and_link(patterns::Vector{DiBitMatrix}, e::Dict{String, Any}, _dims::Tuple{Int64,Int64}, final_name::String) + @info "getting match patterns" counts=get_match_patterns(patterns) + @info "running emlink" resultsEM=emlinkMARmov(counts.patterns, length.(counts.indices), _dims,