Skip to content

Commit 44efb45

Browse files
update: use greedy scheduler
1 parent 6e01423 commit 44efb45

77 files changed

Lines changed: 125 additions & 125 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ WAV = "1.2"
134134
Wavelets = "0.9, 0.10"
135135
WaveletsExt = "0.2"
136136
XDF = "0.2"
137-
julia = "1.10"
137+
julia = "1.11"

src/NeuroAnalyzer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ https://neuroanalyzer.org
55
"""
66
module NeuroAnalyzer
77

8-
@assert VERSION >= v"1.10.0" "NeuroAnalyzer requires Julia 1.10.0 or above."
8+
@assert VERSION >= v"1.11.0" "NeuroAnalyzer requires Julia 1.11.0 or above."
99

1010
# set constants
1111

src/analyze/acor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function acor(s::AbstractArray; l::Int64=round(Int64, min(size(s[1, :, 1], 1) -
120120
ac = zeros(ch_n, length(-l:l), ep_n)
121121

122122
@inbounds for ep_idx in 1:ep_n
123-
Threads.@threads :static for ch_idx in 1:ch_n
123+
Threads.@threads :greedy for ch_idx in 1:ch_n
124124
ac[ch_idx, :, ep_idx] = @views acor(s[ch_idx, :, ep_idx], l=l, demean=demean, biased=biased, method=method)
125125
end
126126
end

src/analyze/acov.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function acov(s::AbstractArray; l::Int64=round(Int64, min(size(s[1, :, 1], 1) -
123123
ac = zeros(ch_n, length(-l:l), ep_n)
124124

125125
@inbounds for ep_idx in 1:ep_n
126-
Threads.@threads :static for ch_idx in 1:ch_n
126+
Threads.@threads :greedy for ch_idx in 1:ch_n
127127
ac[ch_idx, :, ep_idx] = @views acov(s[ch_idx, :, ep_idx], l=l, demean=demean, biased=biased, method=method)
128128
end
129129
end

src/analyze/band_mpower.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function band_mpower(s::AbstractArray; fs::Int64, frq_lim::Tuple{Real, Real}, me
9090
maxbp = zeros(ch_n, ep_n)
9191

9292
@inbounds for ep_idx in 1:ep_n
93-
Threads.@threads :static for ch_idx in 1:ch_n
93+
Threads.@threads :greedy for ch_idx in 1:ch_n
9494
mbp[ch_idx, ep_idx], maxfrq[ch_idx, ep_idx], maxbp[ch_idx, ep_idx] = @views band_mpower(s[ch_idx, :, ep_idx], fs=fs, frq_lim=frq_lim, method=method, nt=nt, wlen=wlen, woverlap=woverlap, w=w, ncyc=ncyc, gw=gw, wt=wt)
9595
end
9696
end

src/analyze/band_power.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function band_power(s::AbstractArray; fs::Int64, frq_lim::Tuple{Real, Real}, met
8989
bp = zeros(ch_n, ep_n)
9090

9191
@inbounds for ep_idx in 1:ep_n
92-
Threads.@threads :static for ch_idx in 1:ch_n
92+
Threads.@threads :greedy for ch_idx in 1:ch_n
9393
bp[ch_idx, ep_idx] = @views band_power(s[ch_idx, :, ep_idx], fs=fs, frq_lim=frq_lim, method=method, nt=nt, wlen=wlen, woverlap=woverlap, w=w, ncyc=ncyc, gw=gw, wt=wt)
9494
end
9595
end

src/analyze/coherence.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function coherence(s1::AbstractArray, s2::AbstractArray; method::Symbol=:mt, fs:
118118
mscoh = zeros(ch_n, length(f), ep_n)
119119

120120
@inbounds for ep_idx in 1:ep_n
121-
Threads.@threads :static for ch_idx in 1:ch_n
121+
Threads.@threads :greedy for ch_idx in 1:ch_n
122122
coh[ch_idx, :, ep_idx], mscoh[ch_idx, :, ep_idx], _ = @views coherence(s1[ch_idx, :, ep_idx], s2[ch_idx, :, ep_idx], method=method, fs=fs, frq_lim=frq_lim, demean=demean, nt=nt, wlen=wlen, woverlap=woverlap, w=w)
123123
end
124124
end

src/analyze/corm.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function corm(s::AbstractArray; norm::Bool=false)::Array{Float64, 4}
100100
end
101101
CUDA.synchronize()
102102
else
103-
Threads.@threads :static for s_idx in 1:ep_len
103+
Threads.@threads :greedy for s_idx in 1:ep_len
104104
@views @inbounds cm[:, :, s_idx, ep_idx] = corm(s[:, s_idx, ep_idx], norm=norm)
105105

106106
# update progress bar

src/analyze/covm.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function covm(s::AbstractArray; norm::Bool=false)::Array{Float64, 4}
9999
end
100100
CUDA.synchronize()
101101
else
102-
Threads.@threads :static for s_idx in 1:ep_len
102+
Threads.@threads :greedy for s_idx in 1:ep_len
103103
@views @inbounds cm[:, :, s_idx, ep_idx] = covm(s[:, s_idx, ep_idx], norm=norm)
104104

105105
# update progress bar

src/analyze/cph.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function cph(s::AbstractArray; fs::Int64)::@NamedTuple{ph::Array{Float64, 4}, f:
5959
progress_bar && (progbar = Progress(ep_n * ch_n, dt=1, barlen=20, color=:white))
6060

6161
@inbounds for ep_idx in 1:ep_n
62-
Threads.@threads :static for ch_idx1 in 1:ch_n
62+
Threads.@threads :greedy for ch_idx1 in 1:ch_n
6363
for ch_idx2 in 1:ch_idx1
6464
ph[ch_idx1, ch_idx2, :, ep_idx], _ = @views cph(s[ch_idx1, :, ep_idx], s[ch_idx2, :, ep_idx], fs=fs)
6565
end
@@ -70,7 +70,7 @@ function cph(s::AbstractArray; fs::Int64)::@NamedTuple{ph::Array{Float64, 4}, f:
7070
end
7171

7272
@inbounds for cph_idx in axes(ph, 3)
73-
Threads.@threads :static for ep_idx in 1:ep_n
73+
Threads.@threads :greedy for ep_idx in 1:ep_n
7474
for ch_idx1 in 1:(ch_n - 1)
7575
for ch_idx2 in (ch_idx1 + 1):ch_n
7676
ph[ch_idx1, ch_idx2, cph_idx, ep_idx] = @views ph[ch_idx2, ch_idx1, cph_idx, ep_idx]
@@ -113,7 +113,7 @@ function cph(s1::AbstractArray, s2::AbstractArray; fs::Int64)::@NamedTuple{ph::A
113113
ph = zeros(ch_n, length(f), ep_n)
114114

115115
@inbounds for ep_idx in 1:ep_n
116-
Threads.@threads :static for ch_idx in 1:ch_n
116+
Threads.@threads :greedy for ch_idx in 1:ch_n
117117
ph[ch_idx, :, ep_idx], _ = @views cph(s1[ch_idx, :, ep_idx], s2[ch_idx, :, ep_idx], fs=fs)
118118
end
119119
end

0 commit comments

Comments
 (0)