This is a test plan for the header files and namespaces as described in SYCL 2020 Section 4.3.
Estimated development time is one day.
The following combinations for namespaces and header files exist:
-
Header file
sycl/sycl.hpp
and namespace::sycl
. -
Header file
CL/sycl.hpp
and namespace::cl::sycl
.
Two versions are proposed:
Create a simple test program. For instance, the example program of listing in Section 3.15 "Example SYCL application" of the SYCL 2020 specification. Check if the program compiles when configured for both combinations.
Check if the entire CTS successfully compiles when configured both combinations.
This can be done by creating a configurable header file (e.g. sycl_cts.hpp.in
) with defines SYCL_HEADER
and SYCL_NAMEPACE
, and #include <SYCL_HEADER>
. For all existing tests, replace #include <sycl/sycl.hpp>
with #include "sycl_cts.hpp"
and sycl::
with SYCL_NAMESPACE::
. CMake’s try_compile
can be used to see if the tests compile. There should be a CTS option to disable this behavior and only compile and run the tests with sycl/sycl.hpp
and ::sycl
.