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
a3a9e469
Commit
a3a9e469
authored
Mar 04, 2019
by
Paul
Browse files
Formatting
parent
ab9a6dea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+5
-6
test/include/test.hpp
test/include/test.hpp
+1
-1
No files found.
test/gpu/miopen.cpp
View file @
a3a9e469
...
@@ -149,27 +149,26 @@ void run_verify_program()
...
@@ -149,27 +149,26 @@ void run_verify_program()
std
::
set_terminate
(
nullptr
);
std
::
set_terminate
(
nullptr
);
}
}
template
<
class
T
>
template
<
class
T
>
int
auto_register_verify_program
()
int
auto_register_verify_program
()
{
{
test
::
add_test_case
(
migraphx
::
get_type_name
<
T
>
(),
[]
{
run_verify_program
<
T
>
();
});
test
::
add_test_case
(
migraphx
::
get_type_name
<
T
>
(),
[]
{
run_verify_program
<
T
>
();
});
return
0
;
return
0
;
}
}
template
<
class
T
>
template
<
class
T
>
struct
verify_program
struct
verify_program
{
{
static
int
static_register
;
static
int
static_register
;
// This typedef ensures that the static member will be instantiated if
// This typedef ensures that the static member will be instantiated if
// the class itself is instantiated
// the class itself is instantiated
using
static_register_type
=
std
::
integral_constant
<
decltype
(
&
static_register
),
&
static_register
>
;
using
static_register_type
=
std
::
integral_constant
<
decltype
(
&
static_register
),
&
static_register
>
;
};
};
template
<
class
T
>
template
<
class
T
>
int
verify_program
<
T
>::
static_register
=
auto_register_verify_program
<
T
>
();
int
verify_program
<
T
>::
static_register
=
auto_register_verify_program
<
T
>
();
struct
test_literals
:
verify_program
<
test_literals
>
struct
test_literals
:
verify_program
<
test_literals
>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
...
...
test/include/test.hpp
View file @
a3a9e469
...
@@ -251,7 +251,7 @@ inline void run(int argc, const char* argv[])
...
@@ -251,7 +251,7 @@ inline void run(int argc, const char* argv[])
#define TEST_PRIMITIVE_CAT(x, ...) x##__VA_ARGS__
#define TEST_PRIMITIVE_CAT(x, ...) x##__VA_ARGS__
// NOLINTNEXTLINE
// NOLINTNEXTLINE
#define TEST_CASE_REGISTER(...) \
#define TEST_CASE_REGISTER(...)
\
static test::auto_register_test_case TEST_CAT(register_test_case_, __LINE__) = \
static test::auto_register_test_case TEST_CAT(register_test_case_, __LINE__) = \
test::auto_register_test_case(#__VA_ARGS__, &__VA_ARGS__);
test::auto_register_test_case(#__VA_ARGS__, &__VA_ARGS__);
...
...
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