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

View<>::shmem_size should runtime check for number of arguments equal to rank #176

Closed
crtrott opened this issue Jan 27, 2016 · 2 comments
Closed
Assignees
Labels
Enhancement Improve existing capability; will potentially require voting
Milestone

Comments

@crtrott
Copy link
Member

crtrott commented Jan 27, 2016

The shmem_size function should do a runtime check that the number of dimension arguments provided matches the rank of the view. This would catch user errors, which can lead to segfaults. An example is if you want a 3D shared view but forget one "*" in the shmem_size call, your third argument is silently ignored and later the code can segfault.

@crtrott crtrott added the Enhancement Improve existing capability; will potentially require voting label Jan 27, 2016
@crtrott
Copy link
Member Author

crtrott commented Jan 27, 2016

This is neither checked in the old view implementation nor in the new one.

@hcedwar hcedwar added this to the Spring 2016 milestone Mar 17, 2016
@crtrott crtrott assigned crtrott and unassigned ndellingwood May 24, 2016
@hcedwar
Copy link
Contributor

hcedwar commented Jun 1, 2016

Default argument becomes ~size_t(0) and require rank arguments that are not ~size_t(0).

@ndellingwood ndellingwood modified the milestones: Summer 2016, Spring 2016 Jun 8, 2016
gmackey added a commit to gmackey/kokkos that referenced this issue Jun 10, 2016
hcedwar added a commit that referenced this issue Jun 10, 2016
hcedwar pushed a commit to hcedwar/kokkos that referenced this issue Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

4 participants