DPCT1122#

Message#

<original type>’ is migrated to ‘<migrated type>’ in the template declaration; it may cause template function or class redefinition; please adjust the code.

Detailed Help#

SYCL* vector types like sycl::long4 are defined by ‘using <type><elems> = vec<<storage-type>, <elems>>’ in SYCL2020 Vector types section 4.12.2, but sycl::longlong4 is not defined. In the migration, both ‘long4’ and ‘longlong4’ are migrated to sycl::long4, this may cause template function or class redefinition.

Suggestions to Fix#

For example, this original CUDA* code:

1template <typename T> struct C { T a; };
2template <> struct C<longlong4> { longlong4 a; };
3template <> struct C<long4> { long4 a; };

results in the following migrated SYCL code:

1template <typename T> struct C { T a; };
2/*
3DPCT1122:0: 'longlong4' is migrated to 'sycl::long4' in the template
4declaration; it may cause template function or class redefinition; please adjust
5the code.
6*/
7template <> struct C<sycl::long4> { sycl::long4 a; };
8template <> struct C<sycl::long4> { sycl::long4 a; };

which needs to be rewritten to:

1template <typename T> struct C { T a; };
2template <> struct C<sycl::long4> { sycl::long4 a; };