Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
43dc4ccf
Commit
43dc4ccf
authored
Jun 19, 2018
by
Paul
Browse files
Add fixes for cppcheck
parent
97d5b3ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
CMakeLists.txt
CMakeLists.txt
+2
-0
src/include/rtg/requires.hpp
src/include/rtg/requires.hpp
+5
-1
No files found.
CMakeLists.txt
View file @
43dc4ccf
...
@@ -106,6 +106,8 @@ rocm_enable_cppcheck(
...
@@ -106,6 +106,8 @@ rocm_enable_cppcheck(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/targets/cpu/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/targets/cpu/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/targets/miopen/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/targets/miopen/include
DEFINE
CPPCHECK=1
)
)
add_subdirectory
(
src
)
add_subdirectory
(
src
)
...
...
src/include/rtg/requires.hpp
View file @
43dc4ccf
...
@@ -6,11 +6,15 @@
...
@@ -6,11 +6,15 @@
namespace
rtg
{
namespace
rtg
{
template
<
bool
...
Bs
>
template
<
bool
...
Bs
>
struct
and_
:
std
::
is_same
<
and_
<
Bs
...
>
,
and_
<
(
Bs
||
true
)...
>>
struct
and_
:
std
::
is_same
<
and_
<
Bs
...
>
,
and_
<
(
Bs
||
true
)...
>>
// NOLINT
{
{
};
};
#ifdef CPPCHECK
#define RTG_REQUIRES(...) class=void
#else
#define RTG_REQUIRES(...) class = typename std::enable_if<and_<__VA_ARGS__, true>{}>::type
#define RTG_REQUIRES(...) class = typename std::enable_if<and_<__VA_ARGS__, true>{}>::type
#endif
}
// namespace rtg
}
// namespace rtg
...
...
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