Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SWIG priorities #139

Open
5 of 7 tasks
aprokop opened this issue Dec 4, 2017 · 4 comments
Open
5 of 7 tasks

SWIG priorities #139

aprokop opened this issue Dec 4, 2017 · 4 comments

Comments

@aprokop
Copy link
Collaborator

aprokop commented Dec 4, 2017

Ordered from high to low:

@aprokop
Copy link
Collaborator Author

aprokop commented Dec 4, 2017

@sethrj

@sethrj
Copy link
Collaborator

sethrj commented Dec 6, 2017

@aprokop To get the 2D array views, can you give me C++ code that gives

  • the pointer to the first element of the full contiguous 2D array
  • the sizes of the full array
  • the ranges of the slices
    ? Otherwise I think we can only support copying multivectors.

@aprokop
Copy link
Collaborator Author

aprokop commented Dec 14, 2017

@sethrj If you have a Tpetra::MultiVector<...>, the code you want is

  Tpetra::MultiVector<...> X;
   // The following returns multi-dimensional Kokkos::View
   // Right now, all the data is going to be on the host
   auto Xview = X->getLocalView();
   double* ptr = Xview.data();
   size_t dim_0 = Xview.extent(0);
   size_t dim_1 = Xview.extent(1);

This gives you the full 2D array data (not tested, though). The allocation should be contiguous (I don't think there is any padding). I'm not sure what you mean by the ranges of slices. We only need the full 2D array.

@sethrj
Copy link
Collaborator

sethrj commented Mar 8, 2018

I can get these last items done once #217 and #220 are merged.

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

No branches or pull requests

2 participants