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
28254866
Verified
Commit
28254866
authored
3 years ago
by
raphael.bach
Browse files
Options
Downloads
Patches
Plain Diff
Replace pragma to disable warnings with a less intrusive method
parent
9a305354
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/internal/generic/fmpi_futhark_generic.h
+6
-17
6 additions, 17 deletions
include/internal/generic/fmpi_futhark_generic.h
with
6 additions
and
17 deletions
include/internal/generic/fmpi_futhark_generic.h
+
6
−
17
View file @
28254866
...
...
@@ -48,28 +48,17 @@ struct fmpi_futhark_ctx;
#define FMPI_FUTHARK_ARRAY_ENTRY_LIST(D) \
CPL_MAP_FIXED(FMPI_PRIV_FUTHARK_ARRAY_ENTRY, CPL_COMMA, (D), FMPI_FUTHARK_TYPES)
#if defined(__GNUC__) || defined(__GNUG__)
_Pragma
(
"GCC diagnostic ignored
\"
-Wunused-parameter
\"
"
)
_Pragma
(
"GCC diagnostic push"
)
#elif defined(__clang__)
_Pragma
(
"clang diagnostic ignored
\"
-Wunused-parameter
\"
"
)
_Pragma
(
"clang diagnostic push"
)
#endif
// In a comma separeted list of expressions contained in a pair of parentheses
// only the last one is returned, allowing to silence warnings about unused
// parameters by putting them first.
#define FMPI_FUTHARK_NEW_1(T, ctx, array, x, y, z) \
futhark_new_##T##_1d(ctx, array, (int64_t)(x))
;
((void)(y), (void)(z),
futhark_new_##T##_1d(ctx, array, (int64_t)(x))
)
#define FMPI_FUTHARK_NEW_2(T, ctx, array, x, y, z) \
futhark_new_##T##_2d(ctx, array, (int64_t)(x), (int64_t)(y));
#if defined(__GNUC__) || defined(__GNUG__)
_Pragma
(
"GCC diagnostic push"
)
#elif defined(__clang__)
_Pragma
(
"clang diagnostic push"
)
#endif
((void)(z), futhark_new_##T##_2d(ctx, array, (int64_t)(x), (int64_t)(y)))
#define FMPI_FUTHARK_NEW_3(T, ctx, array, x, y, z) \
futhark_new_##T##_3d(ctx, array, (int64_t)(x), (int64_t)(y), (int64_t)(z))
;
futhark_new_##T##_3d(ctx, array, (int64_t)(x), (int64_t)(y), (int64_t)(z))
#define FMPI_FUTHARK_DECLARATION(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