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

Restrict not honored for non-intel compilers #1922

Closed
rfbird opened this issue Dec 4, 2018 · 5 comments
Closed

Restrict not honored for non-intel compilers #1922

rfbird opened this issue Dec 4, 2018 · 5 comments

Comments

@rfbird
Copy link
Contributor

rfbird commented Dec 4, 2018

Currently when using the restrict memory trait, KOKKOS_RESTRICT is defined as empty when KOKKOS_COMPILER_INTEL is not found (i.e when using GCC).

I propose that despite other compilers not having great restrict behavior, we change the code to generate the restrict keyword any way and let the compiler have the chance of making the optimization (better than just not generating it)

Impending PR will implement a change which always defines KOKKOS_RESTRICT as __restrict__ regardless of compiler

rfbird added a commit to rfbird/kokkos that referenced this issue Dec 4, 2018
@crtrott
Copy link
Member

crtrott commented Dec 4, 2018

It can't be independent of compiler, since not all compilers know restrict. We need an enumerated list of compilers who know it.

@rfbird
Copy link
Contributor Author

rfbird commented Dec 4, 2018

Ah, my mistake. I was thinking that restrict is standard C so all compilers know it but most will ignore it.

Out of interest which compilers don't know it?

I'll update the PR to just do intel and GCC as those are the only ones I've personally tested

@guangyechen
Copy link

guangyechen commented Dec 4, 2018

@ndellingwood
Copy link
Contributor

Cross-referencing PR #1923

@ndellingwood ndellingwood added the Enhancement Improve existing capability; will potentially require voting label Feb 1, 2019
@ndellingwood ndellingwood added this to the 2019 April milestone Feb 7, 2019
ibaned added a commit that referenced this issue Mar 21, 2019
change restrict keyword to always be emitted per issue #1922
@crtrott crtrott removed this from the 2019 April milestone Aug 21, 2019
@dhollman dhollman added InDevelop and removed Enhancement Improve existing capability; will potentially require voting labels Aug 28, 2019
@dhollman
Copy link

The fix for this is now in master, so I'm closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants