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

subview member function ? #280

Closed
kyungjoo-kim opened this issue May 13, 2016 · 4 comments
Closed

subview member function ? #280

kyungjoo-kim opened this issue May 13, 2016 · 4 comments
Assignees
Labels
Feature Request Create new capability; will potentially require voting
Milestone

Comments

@kyungjoo-kim
Copy link
Contributor

kyungjoo-kim commented May 13, 2016

Now we have dynrankview and view and they have different subview syntax. If I receive a view with a template type, for instance

template<typeanme ViewType>
void function(ViewType a) {
  // either of two are needed
  auto sub = Kokkos::subview(a, 1, Kokkos::ALL());
  auto sub = Kokkos::subdynrankview(a, 1, Kokkos::ALL());

  // is this possible or other unified wayt to create a subview ? 
  auto sub = a::subview(a, 1, Kokkos::ALL());
  auto sub = decltype(a)::subview(a, 1, Kokkos::ALL());
}
@ndellingwood
Copy link
Contributor

If I understand correctly, the template type ViewType may be either DynRankView of View, so you are wanting a generic subview call that works for both.
Currently what you have (auto sub = a::subview(...) ) is not possible, the name change to subdynview was made due to some implicit conversions causing the compiler trouble deducing the proper subview. I can look back into that.

@kyungjoo-kim
Copy link
Contributor Author

Yes.You got the point. If we have a generic subview, that would be the best. Alternatively my suggestion is to put static member function of subview under the view so that proper subview is derived from the view.

@hcedwar hcedwar added the Feature Request Create new capability; will potentially require voting label May 18, 2016
@hcedwar hcedwar added this to the Spring 2016 milestone May 18, 2016
@hcedwar
Copy link
Contributor

hcedwar commented May 18, 2016

Need to resolve the 'subview' vs. 'subdynrankview' function resolution issue as opposed to adding a member function.

@hcedwar hcedwar modified the milestones: Summer 2016, Spring 2016 May 25, 2016
@ndellingwood
Copy link
Contributor

@kyungjoo-kim
With #359 can now use subview function with DynRankView

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