Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
69916f46
Commit
69916f46
authored
7 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug that may cause an overflow in sort_j[].
parent
7e249423
No related branches found
No related tags found
1 merge request
!407
Patch vecorised pair interactions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner_doiact_vec.c
+2
-2
2 additions, 2 deletions
src/runner_doiact_vec.c
with
2 additions
and
2 deletions
src/runner_doiact_vec.c
+
2
−
2
View file @
69916f46
...
...
@@ -290,7 +290,7 @@ __attribute__((always_inline)) INLINE static void populate_max_index_no_cache(
const
float
first_di
=
sort_i
[
first_pi
].
d
+
pi
->
h
*
kernel_gamma
+
dx_max
-
rshift
;
/* Loop through particles in cell j until they are not in range of pi. */
while
(
temp
<
=
cj
->
count
&&
first_di
>
sort_j
[
temp
].
d
)
while
(
temp
<
cj
->
count
&&
first_di
>
sort_j
[
temp
].
d
)
temp
++
;
max_index_i
[
first_pi
]
=
temp
;
...
...
@@ -302,7 +302,7 @@ __attribute__((always_inline)) INLINE static void populate_max_index_no_cache(
const
float
di
=
sort_i
[
i
].
d
+
pi
->
h
*
kernel_gamma
+
dx_max
-
rshift
;
while
(
temp
<
=
cj
->
count
&&
di
>
sort_j
[
temp
].
d
)
while
(
temp
<
cj
->
count
&&
di
>
sort_j
[
temp
].
d
)
temp
++
;
max_index_i
[
i
]
=
temp
;
...
...
This diff is collapsed.
Click to expand it.
James Willis
@jwillis
mentioned in commit
2b18a5ec
·
7 years ago
mentioned in commit
2b18a5ec
mentioned in commit 2b18a5ece5b039ffedd18afb763b01b2b5e56250
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment