Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
yaxt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
dkrz-sw
yaxt
Commits
85f14c13
Commit
85f14c13
authored
2 months ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
exchangers: Use macro to replace accessor.
parent
c7779f98
No related branches found
Branches containing commit
No related tags found
1 merge request
!31
Draft: Attempt at fuller exchanger interface
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xt_exchanger_simple_base.c
+10
-2
10 additions, 2 deletions
src/xt_exchanger_simple_base.c
src/xt_exchanger_simple_base_internal.h
+7
-1
7 additions, 1 deletion
src/xt_exchanger_simple_base_internal.h
with
17 additions
and
3 deletions
src/xt_exchanger_simple_base.c
+
10
−
2
View file @
85f14c13
...
...
@@ -61,6 +61,14 @@
#include
"xt_exchanger_simple_base.h"
#include
"xt_exchanger_simple_base_internal.h"
#undef xt_exchanger_simple_base_get_send_msg
#define xt_exchanger_simple_base_get_send_msg(exchanger) \
((struct Xt_msg_param *)(exchanger->msgs))
#undef xt_exchanger_simple_base_get_recv_msg
#define xt_exchanger_simple_base_get_recv_msg(exchanger) \
((struct Xt_msg_param *)((exchanger)->msgs + (exchanger)->nmsg[SEND]))
// static const char filename[] = "xt_exchanger_simple_base.c";
static
Xt_exchanger
...
...
@@ -135,14 +143,14 @@ adjusted_rank(int r, int comm_rank, int comm_size)
#include
"xt_quicksort_base.h"
const
struct
Xt_msg_param
*
xt_exchanger_simple_base_get_send_msg
(
Xt_exchanger_simple_base
exchanger
)
(
xt_exchanger_simple_base_get_send_msg
)
(
Xt_exchanger_simple_base
exchanger
)
{
return
exchanger
->
msgs
;
}
const
struct
Xt_msg_param
*
xt_exchanger_simple_base_get_recv_msg
(
Xt_exchanger_simple_base
exchanger
)
(
xt_exchanger_simple_base_get_recv_msg
)
(
Xt_exchanger_simple_base
exchanger
)
{
return
exchanger
->
msgs
+
exchanger
->
nmsg
[
SEND
];
}
...
...
This diff is collapsed.
Click to expand it.
src/xt_exchanger_simple_base_internal.h
+
7
−
1
View file @
85f14c13
...
...
@@ -81,7 +81,6 @@ xt_exchanger_simple_base_vtable;
struct
Xt_exchanger_simple_base_
{
const
struct
xt_exchanger_vtable
*
vtable
;
int
nmsg
[
2
];
int
config_flags
;
int
tag_offset
;
MPI_Comm
comm
;
struct
Xt_msg_param
msgs
[];
...
...
@@ -93,6 +92,13 @@ xt_exchanger_simple_base_get_send_msg(Xt_exchanger_simple_base exchanger);
PPM_DSO_INTERNAL
const
struct
Xt_msg_param
*
xt_exchanger_simple_base_get_recv_msg
(
Xt_exchanger_simple_base
exchanger
);
#define xt_exchanger_simple_base_get_send_msg(exchanger) \
((const struct Xt_msg_param *)(exchanger->msgs))
#define xt_exchanger_simple_base_get_recv_msg(exchanger) \
((const struct Xt_msg_param *)((exchanger)->msgs + (exchanger)->nmsg[SEND]))
#endif // XT_EXCHANGER_SIMPLE_BASE_INTERNAL_H
/*
...
...
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