Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kirill Terekhov
INMOST
Commits
8228d5ef
Commit
8228d5ef
authored
Oct 31, 2014
by
Kirill Nikitin
Browse files
Parallel: added AggregateMax functions
Added MPI_Allreduce wrapper with MPI_MAX operation.
parent
5e041bc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
inmost_mesh.h
View file @
8228d5ef
...
...
@@ -993,6 +993,8 @@ namespace INMOST
Storage
::
integer
Integrate
(
Storage
::
integer
input
);
Storage
::
integer
ExclusiveSum
(
Storage
::
integer
input
);
Storage
::
real
Integrate
(
Tag
t
,
ElementType
mask
);
Storage
::
real
AggregateMax
(
Storage
::
real
input
);
Storage
::
integer
AggregateMax
(
Storage
::
integer
input
);
void
RecomputeParallelStorage
(
ElementType
mask
);
__INLINE
const
Tag
SendtoTag
()
const
{
return
tag_sendto
;}
__INLINE
const
Tag
SharedTag
()
const
{
return
tag_shared
;}
...
...
mesh_parallel.cpp
View file @
8228d5ef
...
...
@@ -255,8 +255,23 @@ namespace INMOST
return
output
;
}
Storage
::
real
Mesh
::
AggregateMax
(
Storage
::
real
input
)
{
Storage
::
real
output
=
input
;
#if defined(USE_MPI)
MPI_Allreduce
(
&
input
,
&
output
,
1
,
INMOST_MPI_DATA_REAL_TYPE
,
MPI_MAX
,
comm
);
#endif
return
output
;
}
Storage
::
integer
Mesh
::
AggregateMax
(
Storage
::
integer
input
)
{
Storage
::
integer
output
=
input
;
#if defined(USE_MPI)
MPI_Allreduce
(
&
input
,
&
output
,
1
,
INMOST_MPI_DATA_INTEGER_TYPE
,
MPI_MAX
,
comm
);
#endif
return
output
;
}
void
DefaultUnpack
(
Tag
tag
,
Element
*
element
,
INMOST_DATA_BULK_TYPE
*
data
,
INMOST_DATA_ENUM_TYPE
size
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment