Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
d1823aa4
Commit
d1823aa4
authored
8 years ago
by
Benjamin Cumming
Browse files
Options
Downloads
Patches
Plain Diff
add support for sum reduction to global communication
parent
a8773391
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/communication/mpi_global_policy.hpp
+5
-0
5 additions, 0 deletions
src/communication/mpi_global_policy.hpp
src/communication/serial_global_policy.hpp
+5
-0
5 additions, 0 deletions
src/communication/serial_global_policy.hpp
with
10 additions
and
0 deletions
src/communication/mpi_global_policy.hpp
+
5
−
0
View file @
d1823aa4
...
...
@@ -38,6 +38,11 @@ struct mpi_global_policy {
return
nest
::
mc
::
mpi
::
reduce
(
value
,
MPI_MAX
);
}
template
<
typename
T
>
static
T
sum
(
T
value
)
{
return
nest
::
mc
::
mpi
::
reduce
(
value
,
MPI_SUM
);
}
template
<
typename
T
,
typename
=
typename
std
::
enable_if
<
std
::
is_integral
<
T
>
::
value
>
...
...
This diff is collapsed.
Click to expand it.
src/communication/serial_global_policy.hpp
+
5
−
0
View file @
d1823aa4
...
...
@@ -35,6 +35,11 @@ struct serial_global_policy {
return
value
;
}
template
<
typename
T
>
static
T
sum
(
T
value
)
{
return
value
;
}
template
<
typename
T
,
typename
=
typename
std
::
enable_if
<
std
::
is_integral
<
T
>
::
value
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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