Skip to content

[SYCL] Add non-standard vec aliases back to fix SYCL-CTS #7925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sycl/include/sycl/aliases.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,15 @@ class half;

// FIXME: OpenCL vector aliases are not defined by SYCL 2020 spec and should be
// removed from here. See intel/llvm#7888
// FIXME: schar, longlong and ulonglong aliases are not defined by SYCL 2020
// spec, but they are preserved in SYCL 2020 mode, because SYCL-CTS is
// still using them.
// See KhronosGroup/SYCL-CTS#446 and KhronosGroup/SYCL-Docs#335
#define __SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(N) \
__SYCL_MAKE_VECTOR_ALIASES_FOR_OPENCL_TYPES(N) \
__SYCL_MAKE_VECTOR_ALIAS(schar, std::int8_t, N) \
__SYCL_MAKE_VECTOR_ALIAS(longlong, std::int64_t, N) \
__SYCL_MAKE_VECTOR_ALIAS(ulonglong, std::uint64_t, N) \
__SYCL_MAKE_VECTOR_ALIAS(char, std::int8_t, N) \
__SYCL_MAKE_VECTOR_ALIAS(uchar, std::uint8_t, N) \
__SYCL_MAKE_VECTOR_ALIAS(short, std::int16_t, N) \
Expand Down
3 changes: 3 additions & 0 deletions sycl/test/basic_tests/vectors/aliases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
std::is_same_v<sycl::type##elems, sycl::vec<storage_type, elems>>);

#define CHECK_ALIASES_FOR_VEC_LENGTH(N) \
CHECK_ALIAS(schar, std::int8_t, N) \
CHECK_ALIAS(longlong, std::int64_t, N) \
CHECK_ALIAS(ulonglong, std::uint64_t, N) \
CHECK_ALIAS(char, std::int8_t, N) \
CHECK_ALIAS(uchar, std::uint8_t, N) \
CHECK_ALIAS(short, std::int16_t, N) \
Expand Down