Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikkiese committed Dec 13, 2023
1 parent ad5bb49 commit b96aa86
Show file tree
Hide file tree
Showing 13 changed files with 190 additions and 240 deletions.
8 changes: 4 additions & 4 deletions src/Action/Action.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function get_Γ_comp_avx!(
) :: Nothing

# init with bare value
@turbo temp .= a.Γ[comp].bare
temp .= a.Γ[comp].bare

# add s channel
if ch_s
Expand Down Expand Up @@ -184,7 +184,7 @@ function replace_with!(
) :: Nothing

# replace self energy
@turbo a1.Σ .= a2.Σ
a1.Σ .= a2.Σ

# replace vertices
for i in eachindex(a1.Γ)
Expand Down Expand Up @@ -215,7 +215,7 @@ function mult_with!(
) :: Nothing

# multiply self energy
@turbo a.Σ .*= fac
a.Σ .*= fac

# multiply vertices
for i in eachindex(a.Γ)
Expand Down Expand Up @@ -267,7 +267,7 @@ function mult_with_add_to!(
) :: Nothing

# multiply add for the self energy
@turbo a1.Σ .+= fac .* a2.Σ
a1.Σ .+= fac .* a2.Σ

# multiply add for the vertices
for i in eachindex(a1.Γ)
Expand Down
24 changes: 12 additions & 12 deletions src/Action/channel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ function replace_with!(
ch2 :: Channel
) :: Nothing

@turbo ch1.q1 .= ch2.q1
@turbo ch1.q2_1 .= ch2.q2_1
@turbo ch1.q2_2 .= ch2.q2_2
@turbo ch1.q3 .= ch2.q3
ch1.q1 .= ch2.q1
ch1.q2_1 .= ch2.q2_1
ch1.q2_2 .= ch2.q2_2
ch1.q3 .= ch2.q3

return nothing
end
Expand All @@ -373,10 +373,10 @@ function mult_with!(
fac :: Float64
) :: Nothing

@turbo ch.q1 .*= fac
@turbo ch.q2_1 .*= fac
@turbo ch.q2_2 .*= fac
@turbo ch.q3 .*= fac
ch.q1 .*= fac
ch.q2_1 .*= fac
ch.q2_2 .*= fac
ch.q3 .*= fac

return nothing
end
Expand All @@ -388,10 +388,10 @@ function mult_with_add_to!(
ch1 :: Channel
) :: Nothing

@turbo ch1.q1 .+= fac .* ch2.q1
@turbo ch1.q2_1 .+= fac .* ch2.q2_1
@turbo ch1.q2_2 .+= fac .* ch2.q2_2
@turbo ch1.q3 .+= fac .* ch2.q3
ch1.q1 .+= fac .* ch2.q1
ch1.q2_1 .+= fac .* ch2.q2_1
ch1.q2_2 .+= fac .* ch2.q2_2
ch1.q3 .+= fac .* ch2.q3

return nothing
end
Expand Down
8 changes: 4 additions & 4 deletions src/Flow/BSE_s.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ function compute_channel_s_BSE!(
# parse result
for i in eachindex(a2.Γ)
if kernel == 1
@turbo a2.Γ[i].ch_s.q1[:, w1] .= view(tbuff[1], i, :)
a2.Γ[i].ch_s.q1[:, w1] .= view(tbuff[1], i, :)
elseif kernel == 2
@turbo a2.Γ[i].ch_s.q2_1[:, w1, w2] .= view(tbuff[1], i, :)
a2.Γ[i].ch_s.q2_1[:, w1, w2] .= view(tbuff[1], i, :)
elseif kernel == 3
@turbo a2.Γ[i].ch_s.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
a2.Γ[i].ch_s.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
else
@turbo a2.Γ[i].ch_s.q3[:, w1, w2, w3] .= view(tbuff[1], i, :)
a2.Γ[i].ch_s.q3[:, w1, w2, w3] .= view(tbuff[1], i, :)
end
end

Expand Down
8 changes: 4 additions & 4 deletions src/Flow/BSE_t.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ function compute_channel_t_BSE!(
# parse result
for i in eachindex(a2.Γ)
if kernel == 1
@turbo a2.Γ[i].ch_t.q1[:, w1] .= view(tbuff[1], i, :)
a2.Γ[i].ch_t.q1[:, w1] .= view(tbuff[1], i, :)
elseif kernel == 2
@turbo a2.Γ[i].ch_t.q2_1[:, w1, w2] .= view(tbuff[1], i, :)
a2.Γ[i].ch_t.q2_1[:, w1, w2] .= view(tbuff[1], i, :)
elseif kernel == 3
@turbo a2.Γ[i].ch_t.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
a2.Γ[i].ch_t.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
else
@turbo a2.Γ[i].ch_t.q3[:, w1, w2, w3] .= view(tbuff[1], i, :)
a2.Γ[i].ch_t.q3[:, w1, w2, w3] .= view(tbuff[1], i, :)
end
end

Expand Down
8 changes: 4 additions & 4 deletions src/Flow/BSE_u.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ function compute_channel_u_BSE!(
# parse result
for i in eachindex(a2.Γ)
if kernel == 1
@turbo a2.Γ[i].ch_u.q1[:, w1] .= view(tbuff[1], i, :)
a2.Γ[i].ch_u.q1[:, w1] .= view(tbuff[1], i, :)
elseif kernel == 2
@turbo a2.Γ[i].ch_u.q2_1[:, w1, w2] .= view(tbuff[1], i, :)
a2.Γ[i].ch_u.q2_1[:, w1, w2] .= view(tbuff[1], i, :)
elseif kernel == 3
@turbo a2.Γ[i].ch_u.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
a2.Γ[i].ch_u.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
else
@turbo a2.Γ[i].ch_u.q3[:, w1, w2, w3] .= view(tbuff[1], i, :)
a2.Γ[i].ch_u.q3[:, w1, w2, w3] .= view(tbuff[1], i, :)
end
end

Expand Down
4 changes: 2 additions & 2 deletions src/Flow/SDE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ function compute_channel_s_reduced!(
# parse result
for i in eachindex(a2.Γ)
if kernel == 1
@turbo a2.Γ[i].ch_s.q1[:, w1] .= view(tbuff[1], i, :)
a2.Γ[i].ch_s.q1[:, w1] .= view(tbuff[1], i, :)
else
@turbo a2.Γ[i].ch_s.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
a2.Γ[i].ch_s.q2_2[:, w1, w3] .= view(tbuff[1], i, :)
end
end

Expand Down
4 changes: 2 additions & 2 deletions src/Flow/bubbles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function compute_corrs_kat!(
) :: Nothing

# reset buffer
@turbo corrs .= 0.0
corrs .= 0.0

# compute boundary corrections
@sync for i in 1 : size(corrs, 3)
Expand Down Expand Up @@ -168,7 +168,7 @@ function compute_corrs!(
) :: Nothing

# reset buffer
@turbo corrs .= 0.0
corrs .= 0.0

# compute boundary corrections
@sync for i in 1 : size(corrs, 3)
Expand Down
Loading

0 comments on commit b96aa86

Please sign in to comment.