Skip to content

Commit

Permalink
Correct contra fields summation
Browse files Browse the repository at this point in the history
  • Loading branch information
ggaspersic committed Sep 3, 2023
1 parent 5e1c3ae commit 5b3cf86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/block_ffm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ impl<L: OptimizerTrait + 'static> BlockFFM<L> {
let acc_0 = _mm_mul_ps(contra_field_0, contra_field_0);
let acc_1 = _mm_mul_ps(contra_field_1, contra_field_1);

contra_field = hadd_ps(_mm_add_ps(acc_0, acc_1));
contra_field += hadd_ps(_mm_add_ps(acc_0, acc_1));
}

for k in ffmk_end_as_usize..ffmk_as_usize {
Expand Down Expand Up @@ -1146,7 +1146,7 @@ impl<L: OptimizerTrait + 'static> BlockFFM<L> {
contra_fields_ptr_1 = contra_fields_ptr_1.add(STEP);
contra_fields_ptr_2 = contra_fields_ptr_2.add(STEP);

contra_field = hadd_ps(_mm_add_ps(acc_0, acc_1));
contra_field += hadd_ps(_mm_add_ps(acc_0, acc_1));
}

for k in ffmk_end_as_usize..ffmk_as_usize {
Expand Down

0 comments on commit 5b3cf86

Please sign in to comment.