This is a test plan for SYCL_EXTERNAL macro as described in Section 5.10. of the SYCL 2020 specification.
All of the tests should use #ifdef SYCL_EXTERNAL
so they can be skipped if feature is not supported.
All test cases a function is declared with SYCL_EXTERNAL in translation unit with test case and defined in some translation unit, where the function is also declared with SYCL_EXTERNAL. This function is called in test case from both host and device code. From device code it’s called from both single_task and parallel_for (for 1 item). Function has accessor as a parameter and is used to assign value to it. For call from host host_accessor is used.
Function declared as
template <sycl::aspect aspect>
SYCL_EXTERNAL [[sycl::device_has(aspect)]] void function(AccessotType acc);
and called with aspect that is supported by current device.
Function declared as
template <sycl::aspect aspect>
[[sycl::device_has(aspect)]] SYCL_EXTERNAL void function(AccessotType acc);
and called with aspect that is supported by current device.