Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fmpi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
raphael.bach
fmpi
Commits
96e2c187
Verified
Commit
96e2c187
authored
2 years ago
by
raphael.bach
Browse files
Options
Downloads
Patches
Plain Diff
Remove unnecessary parameters from ` fmpi_mpi_gather_in_place()`
parent
dff08f84
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/internal/fmpi_mpi.h
+2
-3
2 additions, 3 deletions
include/internal/fmpi_mpi.h
src/fmpi_mpi.c
+9
-13
9 additions, 13 deletions
src/fmpi_mpi.c
with
11 additions
and
16 deletions
include/internal/fmpi_mpi.h
+
2
−
3
View file @
96e2c187
...
...
@@ -213,9 +213,8 @@ MPI_Datatype fmpi_mpi_type(enum fmpi_type_base type);
fmpi_mpi_gather_in_place()
------------------------------------------------------------------------------*/
int
fmpi_mpi_gather_in_place
(
const
struct
fmpi_mpi_ctx
*
ctx
,
const
void
*
send_buf
,
size_t
send_cnt
,
MPI_Datatype
send_type
,
void
*
recv_buf
,
size_t
recv_cnt
,
MPI_Datatype
recv_type
,
int
root
,
MPI_Comm
comm
const
struct
fmpi_mpi_ctx
*
ctx
,
void
*
buf
,
MPI_Datatype
type
,
size_t
send_cnt
,
size_t
recv_cnt
,
int
root
,
MPI_Comm
comm
);
/*==============================================================================
GUARD
...
...
This diff is collapsed.
Click to expand it.
src/fmpi_mpi.c
+
9
−
13
View file @
96e2c187
...
...
@@ -226,30 +226,26 @@ MPI_Datatype fmpi_mpi_type(const enum fmpi_type_base type)
fmpi_mpi_gather_in_place()
------------------------------------------------------------------------------*/
int
fmpi_mpi_gather_in_place
(
const
struct
fmpi_mpi_ctx
*
const
ctx
,
const
void
*
const
send_buf
,
const
size_t
send_cnt
,
MPI_Datatype
send_type
,
void
*
const
recv_buf
,
const
size_t
recv_cnt
,
MPI_Datatype
recv_type
,
const
int
root
,
MPI_Comm
comm
const
struct
fmpi_mpi_ctx
*
const
ctx
,
void
*
const
buf
,
MPI_Datatype
type
,
const
size_t
send_cnt
,
const
size_t
recv_cnt
,
const
int
root
,
MPI_Comm
comm
)
{
assert
(
ctx
!=
NULL
);
assert
(
send_buf
!=
NULL
);
assert
(
recv_buf
!=
NULL
);
assert
(
buf
!=
NULL
);
assert
(
send_cnt
<=
INT_MAX
);
assert
(
recv_cnt
<=
INT_MAX
);
if
(
send_type
==
recv_type
)
{
assert
(
send_cnt
<=
recv_cnt
);
}
assert
(
send_cnt
<=
recv_cnt
);
int
err
=
MPI_SUCCESS
;
if
(
ctx
->
rank
==
root
)
{
err
=
MPI_Gather
(
MPI_IN_PLACE
,
(
int
)
send_cnt
,
send_
type
,
recv_
buf
,
(
int
)
recv_cnt
,
recv_
type
,
MPI_IN_PLACE
,
(
int
)
send_cnt
,
type
,
buf
,
(
int
)
recv_cnt
,
type
,
root
,
comm
);
}
else
{
err
=
MPI_Gather
(
send_
buf
,
(
int
)
send_cnt
,
send_
type
,
recv_
buf
,
(
int
)
recv_cnt
,
recv_
type
,
buf
,
(
int
)
send_cnt
,
type
,
buf
,
(
int
)
recv_cnt
,
type
,
root
,
comm
);
}
...
...
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