Skip to content

Commit

Permalink
Fix size of transferred arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Jan 16, 2025
1 parent 714efa9 commit b598f4d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions crates/eko/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ fn unravel_qed<const DIM: usize>(
re: Vec::<f64>::new(),
im: Vec::<f64>::new(),
};
for obj_ in res.iter().take(order_qcd) {
for obj in obj_.iter().take(order_qed) {
for obj_ in res.iter().take(order_qcd + 1) {
for obj in obj_.iter().take(order_qed + 1) {
for col in obj.iter().take(DIM) {
for el in col.iter().take(DIM) {
target.re.push(el.re);
Expand All @@ -65,8 +65,8 @@ fn unravel_qed_ns(res: Vec<Vec<Complex<f64>>>, order_qcd: usize, order_qed: usiz
re: Vec::<f64>::new(),
im: Vec::<f64>::new(),
};
for col in res.iter().take(order_qcd) {
for el in col.iter().take(order_qed) {
for col in res.iter().take(order_qcd + 1) {
for el in col.iter().take(order_qed + 1) {
target.re.push(el.re);
target.im.push(el.im);
}
Expand Down
12 changes: 6 additions & 6 deletions src/eko/evolution_operator/quad_ker.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ def cb_quad_ker_qed(

if is_singlet:
# reconstruct singlet matrices
re_gamma_singlet = nb.carray(re_gamma_raw, (order_qcd, order_qed, 4, 4))
im_gamma_singlet = nb.carray(im_gamma_raw, (order_qcd, order_qed, 4, 4))
re_gamma_singlet = nb.carray(re_gamma_raw, (order_qcd + 1, order_qed + 1, 4, 4))
im_gamma_singlet = nb.carray(im_gamma_raw, (order_qcd + 1, order_qed + 1, 4, 4))
gamma_singlet = re_gamma_singlet + im_gamma_singlet * 1j

# scale var exponentiated is directly applied on gamma
Expand Down Expand Up @@ -458,8 +458,8 @@ def cb_quad_ker_qed(

elif is_valence:
# reconstruct valence matrices
re_gamma_valence = nb.carray(re_gamma_raw, (order_qcd, order_qed, 2, 2))
im_gamma_valence = nb.carray(im_gamma_raw, (order_qcd, order_qed, 2, 2))
re_gamma_valence = nb.carray(re_gamma_raw, (order_qcd + 1, order_qed + 1, 2, 2))
im_gamma_valence = nb.carray(im_gamma_raw, (order_qcd + 1, order_qed + 1, 2, 2))
gamma_valence = re_gamma_valence + im_gamma_valence * 1j

if sv_mode == sv.Modes.exponentiated:
Expand Down Expand Up @@ -493,8 +493,8 @@ def cb_quad_ker_qed(

else:
# construct non-singlet matrices
re_gamma_ns = nb.carray(re_gamma_raw, (order_qcd, order_qed))
im_gamma_ns = nb.carray(im_gamma_raw, (order_qcd, order_qed))
re_gamma_ns = nb.carray(re_gamma_raw, (order_qcd + 1, order_qed + 1))
im_gamma_ns = nb.carray(im_gamma_raw, (order_qcd + 1, order_qed + 1))
gamma_ns = re_gamma_ns + im_gamma_ns * 1j
if sv_mode == sv.Modes.exponentiated:
gamma_ns = sv_exponentiated.gamma_variation_qed(
Expand Down

0 comments on commit b598f4d

Please sign in to comment.