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
174e8e0c
Commit
174e8e0c
authored
7 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Call doself_subset_density when macro defined.
parent
72911669
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
+18
-7
18 additions, 7 deletions
tests/test27cells.c
with
18 additions
and
7 deletions
tests/test27cells.c
+
18
−
7
View file @
174e8e0c
...
...
@@ -34,15 +34,23 @@
#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"
#ifdef DOSELF_SUBSET
#define DOSELF1_NAME "runner_doself_subset_density_vec"
#else
#define DOSELF1_NAME "runner_doself_density_vec"
#endif
#define DOPAIR1_NAME "runner_dopair1_density_vec"
#endif
#ifndef DOSELF1
#define DOSELF1 runner_doself1_density
#define DOSELF1_SUBSET runner_doself_subset_density
#ifdef DOSELF_SUBSET
#define DOSELF1_NAME "runner_doself1_subset_density"
#else
#define DOSELF1_NAME "runner_doself1_density"
#endif
#endif
#ifndef DOPAIR1
#define DOPAIR1 runner_dopair1_branch_density
...
...
@@ -470,11 +478,11 @@ int main(int argc, char *argv[]) {
DOPAIR1
(
&
runner
,
main_cell
,
cells
[
j
]);
const
ticks
sub_toc
=
getticks
();
timings
[
j
]
+=
sub_toc
-
sub_tic
;
timings
[
j
]
+=
getticks
()
-
sub_tic
;
}
}
#ifdef DOSELF_SUBSET
int
*
pid
=
NULL
;
int
count
=
0
;
if
((
pid
=
malloc
(
sizeof
(
int
)
*
main_cell
->
count
))
==
NULL
)
...
...
@@ -484,15 +492,18 @@ int main(int argc, char *argv[]) {
pid
[
count
]
=
k
;
++
count
;
}
#endif
/* And now the self-interaction */
const
ticks
self_tic
=
getticks
();
DOSELF1_SUBSET
(
&
runner
,
main_cell
,
main_cell
->
parts
,
pid
,
count
);
const
ticks
self_toc
=
getticks
();
#ifdef DOSELF_SUBSET
DOSELF1_SUBSET
(
&
runner
,
main_cell
,
main_cell
->
parts
,
pid
,
count
);
#else
DOSELF1
(
&
runner
,
main_cell
);
#endif
timings
[
13
]
+=
self_toc
-
self_tic
;
timings
[
13
]
+=
getticks
()
-
self_tic
;
#endif
...
...
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