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

Algorithms: fill_random assumes dimensions fit in unsigned int #389

Closed
mhoemmen opened this issue Aug 9, 2016 · 0 comments
Closed

Algorithms: fill_random assumes dimensions fit in unsigned int #389

mhoemmen opened this issue Aug 9, 2016 · 0 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone

Comments

@mhoemmen
Copy link
Contributor

mhoemmen commented Aug 9, 2016

The fill_random_functor_* functors (which implement fill_random) all assume that all dimensions of the input View fit in unsigned int. This blocks trilinos/Trilinos#454. In general, it prevents use of Views of dimension > 4B, which could block a common use case of #241 among others.

Proposed fix: Replace all use of unsigned int with ViewType::size_type.

@mhoemmen mhoemmen added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Aug 9, 2016
@mhoemmen mhoemmen self-assigned this Aug 9, 2016
@hcedwar hcedwar added this to the Summer 2016 milestone Aug 10, 2016
crtrott added a commit that referenced this issue Aug 17, 2016
The function call random_fill is now also templated on an IndexType
which defaults to int64_t.
Note: I moved the as internal intended functors into the Impl namespace.
@crtrott crtrott closed this as completed Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

3 participants