File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -1544,10 +1544,10 @@ SYCL spec supported by the current SYCL compiler.
15441544
15451545The `SYCLCOMPAT_CHECK_ERROR` macro encapsulates an error-handling mechanism for
15461546expressions that might throw `sycl::exception` and `std::runtime_error`. If no
1547- exceptions are thrown, it returns `syclcompat::error_code::SUCCESS `. If a
1548- `sycl::exception` is caught, it returns `syclcompat::error_code::BACKEND_ERROR `.
1547+ exceptions are thrown, it returns `syclcompat::error_code::success `. If a
1548+ `sycl::exception` is caught, it returns `syclcompat::error_code::backend_error `.
15491549If a `std::runtime_error` exception is caught,
1550- `syclcompat::error_code::DEFAULT_ERROR ` is returned instead. For both cases, it
1550+ `syclcompat::error_code::default_error ` is returned instead. For both cases, it
15511551prints the error message to the standard error stream.
15521552
15531553``` c++
@@ -1580,7 +1580,7 @@ template <int Arg> class syclcompat_kernel_scalar;
15801580
15811581
15821582namespace syclcompat {
1583- enum error_code { SUCCESS = 0, BACKEND_ERROR = 1, DEFAULT_ERROR = 999 };
1583+ enum error_code { success = 0, backend_error = 1, default_error = 999 };
15841584}
15851585
15861586#define SYCLCOMPAT_CHECK_ERROR(expr)
Original file line number Diff line number Diff line change @@ -67,19 +67,19 @@ template <int Arg> class syclcompat_kernel_scalar;
6767 SYCLCOMPAT_PATCH_VERSION)
6868
6969namespace syclcompat {
70- enum error_code { SUCCESS = 0 , BACKEND_ERROR = 1 , DEFAULT_ERROR = 999 };
70+ enum error_code { success = 0 , backend_error = 1 , default_error = 999 };
7171}
7272
7373#define SYCLCOMPAT_CHECK_ERROR (expr ) \
7474 [&]() { \
7575 try { \
7676 expr; \
77- return syclcompat::error_code::SUCCESS ; \
77+ return syclcompat::error_code::success ; \
7878 } catch (sycl::exception const &e) { \
7979 std::cerr << e.what () << std::endl; \
80- return syclcompat::error_code::BACKEND_ERROR ; \
80+ return syclcompat::error_code::backend_error ; \
8181 } catch (std::runtime_error const &e) { \
8282 std::cerr << e.what () << std::endl; \
83- return syclcompat::error_code::DEFAULT_ERROR ; \
83+ return syclcompat::error_code::default_error ; \
8484 } \
8585 }()
Original file line number Diff line number Diff line change @@ -54,10 +54,10 @@ void test_check_error() {
5454 throw std::runtime_error (" Expected invalid exception in test_check_error" );
5555 };
5656
57- assert (syclcompat::error_code::SUCCESS == SYCLCOMPAT_CHECK_ERROR ());
58- assert (syclcompat::error_code::BACKEND_ERROR ==
57+ assert (syclcompat::error_code::success == SYCLCOMPAT_CHECK_ERROR ());
58+ assert (syclcompat::error_code::backend_error ==
5959 SYCLCOMPAT_CHECK_ERROR (sycl_error_throw ()));
60- assert (syclcompat::error_code::DEFAULT_ERROR ==
60+ assert (syclcompat::error_code::default_error ==
6161 SYCLCOMPAT_CHECK_ERROR (runtime_error_throw ()));
6262}
6363
You can’t perform that action at this time.
0 commit comments