diff --git a/adoc/chapters/what_changed.adoc b/adoc/chapters/what_changed.adoc index f4322252..81482823 100644 --- a/adoc/chapters/what_changed.adoc +++ b/adoc/chapters/what_changed.adoc @@ -9,6 +9,10 @@ * The overload with a fallback/secondary queue parameter of the [code]#submit()# member function of [code]#sycl::queue# was deprecated. + * Added shorthand aliases for address spaces to reduce verbosity, enabling + (for example) [code]#sycl::access::address_space::global_space# to be + replaced with [code]#sycl::global_space#. + == What has changed from SYCL 1.2.1 to SYCL 2020 The SYCL runtime moved from namespace [code]#cl::sycl# provided by diff --git a/adoc/headers/multipointer.h b/adoc/headers/multipointer.h index c9e727b8..f30f595f 100644 --- a/adoc/headers/multipointer.h +++ b/adoc/headers/multipointer.h @@ -20,6 +20,12 @@ enum class decorated : /* unspecified */ { } // namespace access +// Shorthand aliases for address spaces +constexpr inline access::address_space global_space = access::address_space::global_space; +constexpr inline access::address_space local_space = access::address_space::local_space; +constexpr inline access::address_space private_space = access::address_space::private_space; +constexpr inline access::address_space generic_space = access::address_space::generic_space; + template struct remove_decoration { using type = /* ... */; };