Skip to content

Commit 3ea4783

Browse files
committed
student t-test changes
1 parent 504dab1 commit 3ea4783

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

Libraries/oneMKL/monte_carlo_pi/mc_pi_device_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int main(int argc, char ** argv) {
112112
} catch (...) {
113113
// Some other exception detected
114114
std::cout << "Failure" << std::endl;
115-
exit(1);
115+
std::terminate();
116116
}
117117

118118
// Printing results

Libraries/oneMKL/student_t_test/t_test.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,14 @@ int main(int argc, char **argv) {
195195

196196
// Printing results
197197
std::cout << "T-test result with expected mean: " << res0 << "\n";
198-
std::cout << "T-test result with two input arrays: " << res1 << "\n\n";
198+
std::cout << "T-test result with two input arrays: " << res1 << "\n";
199+
200+
if(res0 != 1 || res1 != 1) {
201+
std::cout << "TEST FAILED" << std::endl;
202+
return 1;
203+
}
204+
205+
std::cout << "TEST PASSED" << std::endl;
199206

200207
return 0;
201208
}

Libraries/oneMKL/student_t_test/t_test_usm.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,13 @@ int main(int argc, char** argv) {
198198

199199
// Printing results
200200
std::cout << "T-test result with expected mean: " << res0 << "\n";
201-
std::cout << "T-test result with two input arrays: " << res1 << "\n\n";
201+
std::cout << "T-test result with two input arrays: " << res1 << "\n";
202202

203+
if(res0 != 1 || res1 != 1) {
204+
std::cout << "TEST FAILED" << std::endl;
205+
return 1;
206+
}
207+
208+
std::cout << "TEST PASSED" << std::endl;
203209
return 0;
204210
}

0 commit comments

Comments
 (0)