Skip to content

Commit db04b1e

Browse files
[NFC][SYCL] Move builtin tests sycl/test/basic_tests/{*builtins*.cpp,builtins/} (#12667)
While at it, fix formatting and modernize include to SYCL 2020 (`<sycl/sycl.hpp>`).
1 parent d69a4c2 commit db04b1e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sycl/test/basic_tests/relational_builtins.cpp renamed to sycl/test/basic_tests/builtins/relational_builtins.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// NOTE: Compile the test fully to ensure the library exports the right host
55
// symbols.
66

7-
#include <CL/sycl.hpp>
7+
#include <sycl/sycl.hpp>
88

99
// Some helper macros to verify return type of the builtins. To be used like
1010
// this
@@ -19,15 +19,15 @@ template <class... Args> struct CheckHelper {
1919
template <class F> static auto call(F f) { return f(Args()...); }
2020
};
2121

22-
#define CHECK(EXPECTED, FUNC, ...) \
22+
#define CHECK(EXPECTED, FUNC, ...) \
2323
{ \
2424
auto ret = CheckHelper<__VA_ARGS__>::call( \
25-
[](auto... args) { return cl::sycl::FUNC(args...); }); \
26-
static_assert(std::is_same_v<decltype(ret), EXPECTED>); \
25+
[](auto... args) { return sycl::FUNC(args...); }); \
26+
static_assert(std::is_same_v<decltype(ret), EXPECTED>); \
2727
}
2828

2929
void foo() {
30-
using namespace cl::sycl;
30+
using namespace sycl;
3131
using boolm = marray<bool, 2>;
3232

3333
using int16v = vec<int16_t, 2>;
@@ -247,9 +247,9 @@ void foo() {
247247
}
248248

249249
int main() {
250-
cl::sycl::queue q;
250+
sycl::queue q;
251251
foo(); // Verify host.
252-
q.submit([&](cl::sycl::handler &cgh) {
252+
q.submit([&](sycl::handler &cgh) {
253253
cgh.single_task<class test>([]() {
254254
foo(); // verify device
255255
});

0 commit comments

Comments
 (0)