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

Edit ViewMapping so assigning Views with the same custom layout compiles when const casting #327

Closed
mrtupek opened this issue Jun 11, 2016 · 2 comments
Assignees
Labels
Feature Request Create new capability; will potentially require voting
Milestone

Comments

@mrtupek
Copy link

mrtupek commented Jun 11, 2016

Christian figured out a fix for this on our side, but I wanted to submit a ticket to get it edited in the main branch and have it tracked. The following doesn't work:

View<double*, CustomLayout> a("a",5);
View<const double*, CustomLayout> b = a;

@crtrott crtrott added the Feature Request Create new capability; will potentially require voting label Jun 13, 2016
@crtrott crtrott added this to the Summer 2016 milestone Jun 13, 2016
@crtrott crtrott self-assigned this Jun 13, 2016
@crtrott
Copy link
Member

crtrott commented Jun 13, 2016

I believe a simple change to the default ViewMapping should be sufficient (the one which simply assigns m_offset and m_handle).

crtrott added a commit that referenced this issue Jun 13, 2016
This makes assignment work for views with the same layout, but different
const properties etc.. It addresses issue #327
@crtrott
Copy link
Member

crtrott commented Jun 13, 2016

Pushed to develop branch.

hcedwar pushed a commit to hcedwar/kokkos that referenced this issue Jul 11, 2016
This makes assignment work for views with the same layout, but different
const properties etc.. It addresses issue kokkos#327
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Create new capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

3 participants