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
6befe934
Commit
6befe934
authored
Oct 10, 2023
by
Brian Pickrell
Browse files
joinable threads in test
parent
d0db0cd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
test/targets.cpp
test/targets.cpp
+3
-4
No files found.
test/targets.cpp
View file @
6befe934
...
...
@@ -23,7 +23,7 @@
*/
#include <migraphx/register_target.hpp>
#include <migraphx/target.hpp>
#include <
thread
>
#include <
migraphx/par_for.hpp
>
#include "test.hpp"
TEST_CASE
(
make_target
)
...
...
@@ -53,7 +53,7 @@ TEST_CASE(targets)
TEST_CASE
(
concurrent_targets
)
{
std
::
vector
<
std
::
thread
>
threads
;
std
::
vector
<
migraphx
::
joinable_
thread
>
threads
;
#ifdef HAVE_GPU
std
::
string
target_name
=
"gpu"
;
#elif defined(HAVE_CPU)
...
...
@@ -86,8 +86,7 @@ TEST_CASE(concurrent_targets)
threads
.
emplace_back
(
thread_body
);
}
for
(
auto
&
tt
:
threads
)
tt
.
join
();
// joinable_thread don't need to have join() called.
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
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