Visible to Intel only — GUID: GUID-5F38A6B9-77C1-4EE6-8C4B-569BCF9EDB8F
Visible to Intel only — GUID: GUID-5F38A6B9-77C1-4EE6-8C4B-569BCF9EDB8F
DPCT1064
Message
Migrated <function name> call is used in a macro/template definition and may not be valid for all macro/template uses. Adjust the code.
Detailed Help
The warning is generated when the function call is used in a macro definition and needs to be migrated differently, depending on how the macro is called. The Intel® DPC++ Compatibility Tool generates code that is valid for one of the calls of the macro, but may not be valid for all calls of this macro in the code.
For example: The function pow can be migrated to sycl::pow<double> or sycl::pown, depending on the types of parameters passed through macro arguments.
For example, this original CUDA* code:
#define POW(B, E) pow(B, E)
__device__ void foo() {
double a = POW(2.5, 3.1);
double b = POW(2.5, 2);
}
results in the following migrated SYCL* code:
/*
DPCT1064:0: Migrated pow call is used in a macro/template definition and may not
be valid for all macro/template uses. Adjust the code.
*/
#define POW(B, E) dpct::pow(B, E)
void foo() {
double a = POW(2.5, 3.1);
double b = POW(2.5, 2);
}
which is rewritten to:
void foo() {
double a = POW(2.5, 3.1);
double b = 2.5 * 2.5;
}
Suggestions to Fix
Declare new macros for different use cases of the macro call in the resulting code.