Skip to content

[SYCL] Solve name resolution problems due to Windows integer types #523

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

Closed
wants to merge 1 commit into from
Closed
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
15 changes: 9 additions & 6 deletions sycl/include/CL/sycl/detail/generic_type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ using is_ulongn = typename is_contained<
// ugenlong: unsigned long int, ulongn
template <typename T>
using is_ugenlong =
std::integral_constant<bool, is_contained<T, type_list<cl_ulong>>::value ||
is_ulongn<T>::value>;
std::integral_constant<bool,
is_contained<T, type_list<unsigned long, cl_ulong>>::value ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will something broken if we will delete cl_ulong from here?
I prefer see one type here, like in a comment(SYCL spec, ugenlong set) above.
The same applies to other changes.

is_ulongn<T>::value>;

// longn: long2, long3, long4, long8, long16
template <typename T>
Expand All @@ -249,8 +250,8 @@ using is_longn = typename is_contained<
// genlong: long int, longn
template <typename T>
using is_genlong =
std::integral_constant<bool, is_contained<T, type_list<cl_long>>::value ||
is_longn<T>::value>;
std::integral_constant<bool,
is_contained<T, type_list<long, cl_long>>::value || is_longn<T>::value>;

// ulonglongn: ulonglong2, ulonglong3, ulonglong4,ulonglong8, ulonglong16
template <typename T>
Expand Down Expand Up @@ -314,7 +315,8 @@ using is_ugeninteger = std::integral_constant<
template <typename T>
using is_sgeninteger = typename is_contained<
T, type_list<cl_char, cl_schar, cl_uchar, cl_short, cl_ushort, cl_int,
cl_uint, cl_long, cl_ulong, longlong, ulonglong>>::type;
cl_uint, cl_long, cl_ulong, long, unsigned long,
longlong, ulonglong>>::type;

// vgeninteger: charn, scharn, ucharn, shortn, ushortn, intn, uintn, longn,
// ulongn, longlongn, ulonglongn
Expand All @@ -329,7 +331,8 @@ using is_vgeninteger = std::integral_constant<
// sigeninteger: char, signed char, short, int, long int, , long long int
template <typename T>
using is_sigeninteger = typename is_contained<
T, type_list<cl_char, cl_schar, cl_short, cl_int, cl_long, longlong>>::type;
T, type_list<cl_char, cl_schar, cl_short, cl_int, cl_long, long,
longlong>>::type;

// sugeninteger: unsigned char, unsigned short, unsigned int, unsigned long
// int, unsigned long long int
Expand Down