We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the input:
#pragma omp target parallel for for (int i = 0; i < n; ++i) y[i] += a * x[i];
If it's in a C file, the kernel is OK. Variable a is rewritten as *ap__ and used correctly.
a
*ap__
__global__ void OUT__1__7822__axpy_omp__48__kernel__(long *np__,double *ap__,double *_dev_x,double *_dev_y) { ... for (i = _dev_lower; ((long )i) <= _dev_upper; i += 1) { _dev_y[i] += *ap__ * _dev_x[I]; // *ap__ is used. Correct. } }
However, if the same OpenMP code is in a C++ file. The generated kernel would be:
__global__ void OUT__1__7822__axpy_omp__48__kernel__(long *np__,double *ap__,double *_dev_x,double *_dev_y) { ... for (i = _dev_lower; ((long )i) <= _dev_upper; i += 1) { _dev_y[i] += ap__ * _dev_x[i]; // ap__ is used. Incorrect. } }
Please notice that ap__ is used as a pointer without dereferencing.
ap__
I've checked the lowering and outlining modules. So far, no C++-specific handler has been found.
The text was updated successfully, but these errors were encountered:
You can use the outline tutorial to isolate the outline problem, for example:
rexompiler-build/tutorial/outliner$ ./outlineTutorial -rose:outline:enable_debug -rose:outline:enable_classic -rose:outline:line "12" -c /home/yyan7/compiler/rexompiler/tutorial/outliner/inputCode_OutlineLoop2.c
Sorry, something went wrong.
No branches or pull requests
Given the input:
If it's in a C file, the kernel is OK. Variable
a
is rewritten as*ap__
and used correctly.However, if the same OpenMP code is in a C++ file. The generated kernel would be:
Please notice that
ap__
is used as a pointer without dereferencing.I've checked the lowering and outlining modules. So far, no C++-specific handler has been found.
The text was updated successfully, but these errors were encountered: