Skip to content
New issue

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

fix wrong used method prefix #3114

Conversation

psychocoderHPC
Copy link
Member

Fix places where the method prefix of the declaration and implementation
is not matching. Bugs found with hip-clang.

The latest release 0.4.3 is also effected but I never got an error before using hip-clang.

@psychocoderHPC psychocoderHPC added bug a bug in the project's code affects latest release a bug that affects the latest stable release labels Nov 19, 2019
@psychocoderHPC
Copy link
Member Author

found that also nvcc shows a warnings about it:

/bigdata/hplsim/scratch/widera/dev/include/pmacc/../picongpu/fields/FieldTmp.tpp(319): warning: a __host__ function("picongpu::FieldTmp::getUnit") redeclared with __host__ __device__, hence treated as a __host__ __device__ function

@sbastrakov
Copy link
Member

From the tests compile issues, it looks like getUnit() should really remain host-device as it is called from both sides. So the fix is, I believe, to have HDINLINE at both declarations and definitions.

Fix places where the method prefix of the declaration and implementation
is not matching.
@psychocoderHPC psychocoderHPC force-pushed the fix-wrongFunctionPrefix branch from 3820d3f to 94132fe Compare November 21, 2019 09:41
@psychocoderHPC
Copy link
Member Author

I updated this PR and set getUnit to HDINLINE

@sbastrakov sbastrakov merged commit 5373b6e into ComputationalRadiationPhysics:dev Nov 21, 2019
@psychocoderHPC psychocoderHPC deleted the fix-wrongFunctionPrefix branch November 21, 2019 13:19
@ax3l ax3l added the component: core in PIConGPU (core application) label Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects latest release a bug that affects the latest stable release bug a bug in the project's code component: core in PIConGPU (core application)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants