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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
raphael.bach
fmpi
Commits
607fd63d
Verified
Commit
607fd63d
authored
3 years ago
by
raphael.bach
Browse files
Options
Downloads
Patches
Plain Diff
Add `FMPI_REGISTER_SYNC_TASK()`
parent
ccaad32b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/array_sum/main.c
+2
-2
2 additions, 2 deletions
examples/array_sum/main.c
include/fmpi_core.h
+7
-1
7 additions, 1 deletion
include/fmpi_core.h
with
9 additions
and
3 deletions
examples/array_sum/main.c
+
2
−
2
View file @
607fd63d
...
@@ -31,8 +31,8 @@ int main(int argc, char * argv[])
...
@@ -31,8 +31,8 @@ int main(int argc, char * argv[])
};
};
const
size_t
in_size
=
sizeof
(
in
)
/
sizeof
(
T
);
const
size_t
in_size
=
sizeof
(
in
)
/
sizeof
(
T
);
T
out
=
-
1
;
T
out
=
-
1
;
struct
fmpi_task
array_sum_task
=
FMPI_
TASK_
REGISTER
(
struct
fmpi_task
array_sum_task
=
FMPI_REGISTER
_SYNC_TASK
(
ctx
,
array_sum
,
FMPI_TASK_TYPE_SYNC
,
fmpi_no_stencil
(),
ctx
,
array_sum
,
fmpi_no_stencil
(),
fmpi_data_out
(
ctx
,
&
out
),
fmpi_data_out
(
ctx
,
&
out
),
fmpi_data_1d_in
(
ctx
,
in
,
in_size
)
fmpi_data_1d_in
(
ctx
,
in
,
in_size
)
);
);
...
...
This diff is collapsed.
Click to expand it.
include/fmpi_core.h
+
7
−
1
View file @
607fd63d
...
@@ -27,10 +27,11 @@
...
@@ -27,10 +27,11 @@
INCLUDE
INCLUDE
==============================================================================*/
==============================================================================*/
// Internal
// Internal
#include
"fmpi_task.h"
#include
"internal/fmpi_ctx.h"
#include
"internal/fmpi_ctx.h"
/*==============================================================================
/*==============================================================================
PUBLIC FUNCTION
PUBLIC FUNCTION
==============================================================================*/
==============================================================================
=
*/
/*------------------------------------------------------------------------------
/*------------------------------------------------------------------------------
fmpi_init()
fmpi_init()
------------------------------------------------------------------------------*/
------------------------------------------------------------------------------*/
...
@@ -137,6 +138,11 @@ do { \
...
@@ -137,6 +138,11 @@ do { \
printf(__VA_ARGS__); \
printf(__VA_ARGS__); \
} \
} \
} while(0)
} while(0)
/*------------------------------------------------------------------------------
FMPI_REGISTER_SYNC_TASK()
------------------------------------------------------------------------------*/
#define FMPI_REGISTER_SYNC_TASK(ctx, func, stencil, ...) \
FMPI_TASK_REGISTER(ctx, func, FMPI_TASK_TYPE_SYNC, stencil, __VA_ARGS__)
/*==============================================================================
/*==============================================================================
GUARD
GUARD
==============================================================================*/
==============================================================================*/
...
...
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