From 5d0df621bc42c55dc34dc8642ee36677ebe4fd0b Mon Sep 17 00:00:00 2001 From: Dan Hoeflinger Date: Wed, 24 Jan 2024 16:59:06 -0500 Subject: [PATCH] formatting Signed-off-by: Dan Hoeflinger --- help_function/src/onedpl_test_device_ptr.cpp | 23 +++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/help_function/src/onedpl_test_device_ptr.cpp b/help_function/src/onedpl_test_device_ptr.cpp index 31024a3ab..33652cf42 100644 --- a/help_function/src/onedpl_test_device_ptr.cpp +++ b/help_function/src/onedpl_test_device_ptr.cpp @@ -19,13 +19,17 @@ #include -template -int ASSERT_EQUAL(String msg, _T1&& X, _T2&& Y, bool skip_pass_msg = false) { - if(X!=Y) { +template +int +ASSERT_EQUAL(String msg, _T1&& X, _T2&& Y, bool skip_pass_msg = false) +{ + if (X != Y) + { std::cout << "FAIL: " << msg << " - (" << X << "," << Y << ")" << std::endl; return 1; } - else if (!skip_pass_msg){ + else if (!skip_pass_msg) + { std::cout << "PASS: " << msg << std::endl; } return 0; @@ -148,11 +152,11 @@ test_permutation_iterator() dpct::device_pointer begin_res(data_res, 0); dpct::device_pointer end_res(data_res, 1024); #else - dpct::device_pointer data(1024*sizeof(T)); + dpct::device_pointer data(1024 * sizeof(T)); dpct::device_pointer begin(data); dpct::device_pointer end(data + 1024); - dpct::device_pointer data_res(1024*sizeof(T)); + dpct::device_pointer data_res(1024 * sizeof(T)); dpct::device_pointer begin_res(data_res); dpct::device_pointer end_res(data_res + 1024); #endif @@ -164,14 +168,17 @@ test_permutation_iterator() return ASSERT_EQUAL_N("device_ptr in permutation_iterator", begin_res, dpct::make_constant_iterator(T(1)), 1024); } -int main() { +int +main() +{ int failed_tests = 0; failed_tests += test_device_ptr_manipulation(); failed_tests += test_device_ptr_iteration(); failed_tests += test_permutation_iterator(); std::cout << std::endl << failed_tests << " failing test(s) detected." << std::endl; - if (failed_tests == 0) { + if (failed_tests == 0) + { return 0; } return 1;