|
2 | 2 |
|
3 | 3 | This file describes macros that have effect on SYCL compiler and run-time.
|
4 | 4 |
|
5 |
| -### `RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR` |
| 5 | +- **RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR** |
6 | 6 |
|
7 |
| -The spec assumes that the SYCL implementation does address space deduction. |
8 |
| -However, for our implementation, the deduction is performed in the middle end, |
9 |
| -where it's hard to provide user friendly diagnositcs. |
10 |
| -Due to these problems writing to raw pointers obtained from `constant_ptr` is |
11 |
| -not diagnosed now. |
12 |
| -The user can enable diagnostics upon writing to such pointers via enabling the |
13 |
| -`RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR` macro. |
14 |
| -This allows `constant_ptr` to use constant pointers as underlying |
15 |
| -pointer types. Thus, conversions from `constant_ptr` to raw pointers will return |
16 |
| -constant pointers and writing to const pointers will be diagnosed by the |
17 |
| -front-end. |
18 |
| -This behavior is not following the SYCL spec since `constant_ptr` conversions to |
19 |
| -the underlying pointer types return pointers without any additional qualifiers |
20 |
| -so it's disabled by default. |
| 7 | + The spec assumes that the SYCL implementation does address space deduction. |
| 8 | + However, for our implementation, the deduction is performed in the middle end, |
| 9 | + where it's hard to provide user friendly diagnositcs. |
| 10 | + Due to these problems writing to raw pointers obtained from `constant_ptr` is |
| 11 | + not diagnosed now. |
| 12 | + The user can enable diagnostics upon writing to such pointers via enabling the |
| 13 | + `RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR` macro. |
| 14 | + This allows `constant_ptr` to use constant pointers as underlying |
| 15 | + pointer types. Thus, conversions from `constant_ptr` to raw pointers will return |
| 16 | + constant pointers and writing to const pointers will be diagnosed by the |
| 17 | + front-end. |
| 18 | + This behavior is not following the SYCL spec since `constant_ptr` conversions to |
| 19 | + the underlying pointer types return pointers without any additional qualifiers |
| 20 | + so it's disabled by default. |
21 | 21 |
|
22 |
| -### `DISABLE_SYCL_INSTRUMENTATION_METADATA` |
| 22 | +- **DISABLE_SYCL_INSTRUMENTATION_METADATA** |
23 | 23 |
|
24 |
| -This macro is used to disable passing of code location information to public |
25 |
| -methods. |
| 24 | + This macro is used to disable passing of code location information to public |
| 25 | + methods. |
26 | 26 |
|
27 |
| -### `SYCL2020_DISABLE_DEPRECATION_WARNINGS` |
| 27 | +- **SYCL2020_DISABLE_DEPRECATION_WARNINGS** |
28 | 28 |
|
29 |
| -Disables warnings coming from usage of SYCL 1.2.1 APIs, that are deprecated in |
30 |
| -SYCL 2020. |
| 29 | + Disables warnings coming from usage of SYCL 1.2.1 APIs, that are deprecated in |
| 30 | + SYCL 2020. |
31 | 31 |
|
32 |
| -### `SYCL_DISABLE_DEPRECATION_WARNINGS` |
| 32 | +- **SYCL_DISABLE_DEPRECATION_WARNINGS** |
33 | 33 |
|
34 |
| -Disables all deprecation warnings in SYCL runtime headers, including SYCL 1.2.1 deprecations. |
| 34 | + Disables all deprecation warnings in SYCL runtime headers, including SYCL 1.2.1 deprecations. |
35 | 35 |
|
36 |
| -### Version macros |
| 36 | +## Version macros |
37 | 37 |
|
38 | 38 | - `__LIBSYCL_MAJOR_VERSION` is set to SYCL runtime library major version.
|
39 | 39 | - `__LIBSYCL_MINOR_VERSION` is set to SYCL runtime library minor version.
|
|
0 commit comments