Visible to Intel only — GUID: GUID-BD8D8AA4-D4AA-462C-AF05-B649471A1FD8
Visible to Intel only — GUID: GUID-BD8D8AA4-D4AA-462C-AF05-B649471A1FD8
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:
class MyClass : int1 {
...
};
results in the following migrated SYCL* code:
/*
DPCT1055:0: Vector types with size 1 are migrated to the corresponding
fundamental types, which cannot be inherited. You need to rewrite the code.
*/
class MyClass : int {
...
};
which is rewritten to:
class MyClass {
public:
int x;
MyClass operator+(const MyClass& y) { ... }
MyClass operator=(const MyClass& y) { ... }
...
};