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
2a317de4
Verified
Commit
2a317de4
authored
3 years ago
by
raphael.bach
Browse files
Options
Downloads
Patches
Plain Diff
Make `fmpi_task_register()` add task to `fmpi_ctx`
parent
f2c5b7fd
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/fmpi_task.h
+5
-0
5 additions, 0 deletions
include/fmpi_task.h
include/internal/fmpi_ctx.h
+1
-1
1 addition, 1 deletion
include/internal/fmpi_ctx.h
src/fmpi_task.c
+2
-0
2 additions, 0 deletions
src/fmpi_task.c
with
8 additions
and
1 deletion
include/fmpi_task.h
+
5
−
0
View file @
2a317de4
...
...
@@ -40,6 +40,11 @@
* Maximum number of arguments that can be passed to a task.
*/
#define FMPI_TASK_ARGS_CNT_MAX 32
/**
* Maximum number of tasks that can be created.
* @todo Find a meaningful value.
*/
#define FMPI_TASK_MAX 32
/*==============================================================================
TYPE
==============================================================================*/
...
...
This diff is collapsed.
Click to expand it.
include/internal/fmpi_ctx.h
+
1
−
1
View file @
2a317de4
...
...
@@ -47,7 +47,7 @@
typedef
struct
fmpi_ctx
{
struct
fmpi_mpi_ctx
*
mpi
;
//!< TODO
struct
fmpi_futhark_ctx
*
fut
;
//!< TODO
struct
fmpi_task
tasks
[
32
];
struct
fmpi_task
tasks
[
FMPI_TASK_MAX
];
size_t
task_cnt
;
double
timer_start
;
//!< TODO
double
timer_stop
;
//!< TODO
...
...
This diff is collapsed.
Click to expand it.
src/fmpi_task.c
+
2
−
0
View file @
2a317de4
...
...
@@ -44,6 +44,7 @@ struct fmpi_task fmpi_task_register(
const
struct
fmpi_task_args
*
const
args
){
assert
(
ctx
!=
NULL
);
assert
(
ctx
->
task_cnt
<
FMPI_TASK_MAX
);
assert
(
args
!=
NULL
);
struct
fmpi_task
task
=
{
.
func
=
func
,
...
...
@@ -61,6 +62,7 @@ struct fmpi_task fmpi_task_register(
);
task
.
args
.
in
[
i
].
start
=
start
;
}
ctx
->
tasks
[
ctx
->
task_cnt
++
]
=
task
;
futhark_context_sync
(
ctx
->
fut
->
ctx
);
return
task
;
}
...
...
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