DPCT1055#
Message#
Vector types with size 1 are migrated to the corresponding fundamental types, which cannot be inherited. You need to rewrite the code.
Detailed Help#
The warning message is emitted when vector type with size 1 is inherited by a class or struct in the original code. Since the vector type with size 1 is migrated to the corresponding fundamental type in DPC++ and the fundamental type cannot be inherited, you need to rewrite the code.
Suggestions to Fix#
You can declare a new field with the corresponding fundamental type, for example int for int1, in the class/struct and override the required operators.
For example, this original CUDA* code:
1class MyClass : int1 {
2 ...
3};
results in the following migrated SYCL* code:
1/*
2DPCT1055:0: Vector types with size 1 are migrated to the corresponding
3fundamental types, which cannot be inherited. You need to rewrite the code.
4*/
5class MyClass : int {
6 ...
7};
which is rewritten to:
1class MyClass {
2public:
3 int x;
4 MyClass operator+(const MyClass& y) { ... }
5 MyClass operator=(const MyClass& y) { ... }
6 ...
7};