Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pierre NARVOR
rtac_base
Commits
d4d8f116
Commit
d4d8f116
authored
Oct 27, 2021
by
Pierre NARVOR
Browse files
[cuda/functors] makeshift fix to silence a bugged nvcc warning
parent
1cbf17d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
cuda/include/rtac_base/cuda/FunctorCompound.h
View file @
d4d8f116
...
...
@@ -71,6 +71,16 @@ struct FunctorCompound
else
{
return
std
::
get
<
Level
>
(
functors_
)(
call_functor
<
Level
+
1
>
(
input
));
}
// CAUTION : THE CODE BELOW IS UNREACHABLE, BUT THIS IS DONE ON
// PURPOSE.
// At the time this file were written, there was a bug in nvcc compiler
// about if constexpr. The bug triggers a "warning: missing return
// statement at end of non-void function" even though the function
// always returns in one of the branch of the condition above. The line
// below is to suppress the warning but has no effect on the code. See
// here for more info :
// https://stackoverflow.com/questions/64523302/cuda-missing-return-statement-at-end-of-non-void-function-in-constexpr-if-fun
return
std
::
get
<
Level
>
(
functors_
)(
input
);
}
public:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment