Open aprokop opened 6 years ago
@sethrj
@aprokop To get the 2D array views, can you give me C++ code that gives
@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.
I can get these last items done once #217 and #220 are merged.
Ordered from high to low:
MultiVector::get2dCopy
and such.Teuchos::ArrayRCP<double> f();
ierr
See #119Map<LO,GO,NO>
inTpetra_Map.i
not work?%typemap(in) LO a %{ ... %}
not work while%typemap(in) int a %{ ... %}
does? SeeTpetra_Map.i
for example.std::string description()