Skip to content

Commit 35528d0

Browse files
Print before error in multi_threaded_persistent_auto_pch.cpp
1 parent c427a5c commit 35528d0

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

sycl/test-e2e/KernelCompiler/multi_threaded_persistent_auto_pch.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ void iota(float start, float *ptr) {
7373
std::this_thread::sleep_for(100ms);
7474
}
7575

76-
if (removed_iter == -1) {
77-
std::cout << "Removal has not been tested, adjust N" << std::endl;
78-
return 1;
79-
}
80-
if (removed_iter == 0) {
81-
std::cout << "Sleep is too long" << std::endl;
82-
return 2;
83-
}
84-
8576
for (auto &t : threads)
8677
if (t.joinable())
8778
t.join();
@@ -109,4 +100,16 @@ void iota(float start, float *ptr) {
109100
std::cout << i << ": " << static_cast<int>(durations[i].count()) << "ms"
110101
<< std::endl;
111102
}
103+
104+
if (removed_iter == -1) {
105+
std::cout << "Removal has not been tested, adjust N" << std::endl;
106+
return 1;
107+
}
108+
109+
if (removed_iter == 0) {
110+
std::cout << "Sleep is too long" << std::endl;
111+
return 2;
112+
}
113+
114+
return 0;
112115
}

0 commit comments

Comments
 (0)