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
826230b9
Commit
826230b9
authored
7 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Call doself_subset_density_vec instead of doself1_density_vec.
parent
21fe8595
No related branches found
No related tags found
1 merge request
!445
Doself subset vec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test27cells.c
+17
-1
17 additions, 1 deletion
tests/test27cells.c
with
17 additions
and
1 deletion
tests/test27cells.c
+
17
−
1
View file @
826230b9
...
...
@@ -32,6 +32,7 @@
#if defined(WITH_VECTORIZATION)
#define DOSELF1 runner_doself1_density_vec
#define DOSELF1_SUBSET runner_doself_subset_density_vec
#define DOPAIR1 runner_dopair1_branch_density
#define DOSELF1_NAME "runner_doself1_density_vec"
#define DOPAIR1_NAME "runner_dopair1_density_vec"
...
...
@@ -39,6 +40,7 @@
#ifndef DOSELF1
#define DOSELF1 runner_doself1_density
#define DOSELF1_SUBSET runner_doself_subset_density
#define DOSELF1_NAME "runner_doself1_density"
#endif
...
...
@@ -300,6 +302,10 @@ void runner_doself1_density(struct runner *r, struct cell *ci);
void
runner_doself1_density_vec
(
struct
runner
*
r
,
struct
cell
*
ci
);
void
runner_dopair1_branch_density
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
cell
*
cj
);
void
runner_doself_subset_density
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
void
runner_doself_subset_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
/* And go... */
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -469,10 +475,20 @@ int main(int argc, char *argv[]) {
}
}
int
*
pid
=
NULL
;
int
count
=
0
;
if
((
pid
=
malloc
(
sizeof
(
int
)
*
main_cell
->
count
))
==
NULL
)
error
(
"Can't allocate memory for pid."
);
for
(
int
k
=
0
;
k
<
main_cell
->
count
;
k
++
)
if
(
part_is_active
(
&
main_cell
->
parts
[
k
],
&
engine
))
{
pid
[
count
]
=
k
;
++
count
;
}
/* And now the self-interaction */
const
ticks
self_tic
=
getticks
();
DOSELF1
(
&
runner
,
main_cell
);
DOSELF1
_SUBSET
(
&
runner
,
main_cell
,
main_cell
->
parts
,
pid
,
count
);
const
ticks
self_toc
=
getticks
();
...
...
This diff is collapsed.
Click to expand it.
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