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
91136354
Verified
Commit
91136354
authored
3 years ago
by
raphael.bach
Browse files
Options
Downloads
Patches
Plain Diff
Add `fmpi_futhark_get_data_async()`
parent
f9ec2437
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/internal/fmpi_futhark.h
+7
-0
7 additions, 0 deletions
include/internal/fmpi_futhark.h
src/fmpi_futhark.c
+20
-1
20 additions, 1 deletion
src/fmpi_futhark.c
with
27 additions
and
1 deletion
include/internal/fmpi_futhark.h
+
7
−
0
View file @
91136354
...
@@ -139,6 +139,13 @@ void * fmpi_futhark_get_data_sync(
...
@@ -139,6 +139,13 @@ void * fmpi_futhark_get_data_sync(
const
struct
fmpi_futhark_ctx
*
ctx
,
void
*
in
,
void
*
out
,
const
struct
fmpi_futhark_ctx
*
ctx
,
void
*
in
,
void
*
out
,
enum
fmpi_type_base
type
,
size_t
dim_cnt
enum
fmpi_type_base
type
,
size_t
dim_cnt
);
);
/*------------------------------------------------------------------------------
fmpi_futhark_get_data_async()
------------------------------------------------------------------------------*/
void
*
fmpi_futhark_get_data_async
(
const
struct
fmpi_futhark_ctx
*
ctx
,
void
*
in
,
void
*
out
,
enum
fmpi_type_base
type
,
size_t
dim_cnt
);
/*==============================================================================
/*==============================================================================
MACRO
MACRO
==============================================================================*/
==============================================================================*/
...
...
This diff is collapsed.
Click to expand it.
src/fmpi_futhark.c
+
20
−
1
View file @
91136354
...
@@ -161,7 +161,7 @@ void * fmpi_futhark_new_data(
...
@@ -161,7 +161,7 @@ void * fmpi_futhark_new_data(
return
fmpi_futhark_new_data_func_list
[
idx
](
ctx
,
data
,
x
,
y
,
z
);
return
fmpi_futhark_new_data_func_list
[
idx
](
ctx
,
data
,
x
,
y
,
z
);
}
}
/*------------------------------------------------------------------------------
/*------------------------------------------------------------------------------
fmpi_futhark_get_data()
fmpi_futhark_get_data
_sync
()
------------------------------------------------------------------------------*/
------------------------------------------------------------------------------*/
void
*
fmpi_futhark_get_data_sync
(
void
*
fmpi_futhark_get_data_sync
(
const
struct
fmpi_futhark_ctx
*
const
ctx
,
void
*
const
in
,
void
*
const
out
,
const
struct
fmpi_futhark_ctx
*
const
ctx
,
void
*
const
in
,
void
*
const
out
,
...
@@ -183,6 +183,25 @@ void * fmpi_futhark_get_data_sync(
...
@@ -183,6 +183,25 @@ void * fmpi_futhark_get_data_sync(
}
}
return
out
;
return
out
;
}
}
/*------------------------------------------------------------------------------
fmpi_futhark_get_data_async()
------------------------------------------------------------------------------*/
void
*
fmpi_futhark_get_data_async
(
const
struct
fmpi_futhark_ctx
*
const
ctx
,
void
*
const
in
,
void
*
const
out
,
const
enum
fmpi_type_base
type
,
const
size_t
dim_cnt
){
assert
(
ctx
!=
NULL
);
assert
(
in
!=
NULL
);
assert
(
out
!=
NULL
);
assert
(
dim_cnt
<=
FMPI_DIM_MAX
);
const
size_t
idx
=
FMPI_PRIV_FUTHARK_FUNC_IDX
(
dim_cnt
,
type
);
const
int
err
=
fmpi_futhark_get_data_func_list
[
idx
](
ctx
,
in
,
out
);
if
(
err
!=
FUTHARK_SUCCESS
)
{
FMPI_RAISE_FUTHARK_ERROR
(
ctx
,
"futhark_values_##T##_##D##d() failed!"
);
return
NULL
;
}
return
out
;
}
#define FMPI_FUTHARK_DEFINITION(D, T) \
#define FMPI_FUTHARK_DEFINITION(D, T) \
void * fmpi_futhark_new_##D##d_##T( \
void * fmpi_futhark_new_##D##d_##T( \
...
...
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