Skip to content

Commit

Permalink
Fix missig update of private var
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Nov 7, 2024
1 parent 120ceef commit eb44166
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/interface/sparse_pack_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SparsePackBase {
using bounds_h_t = typename bounds_t::HostMirror;
using block_props_t = ParArray2D<int>;
using block_props_h_t = typename block_props_t::HostMirror;
using coords_t = ParArray1D<ParArray0D<Coordinates_t>>;
using coords_t = Kokkos::View<ParArray0D<Coordinates_t> *, LayoutWrapper, DevMemSpace>;

// Returns a SparsePackBase object that is either newly created or taken
// from the cache in pmd. The cache itself handles the all of this logic
Expand Down
6 changes: 4 additions & 2 deletions src/mesh/meshblock_pack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <utility>
#include <vector>

#include "Kokkos_Core_fwd.hpp"
#include "coordinates/coordinates.hpp"
#include "interface/variable_pack.hpp"
#include "kokkos_abstraction.hpp"
Expand All @@ -38,7 +39,8 @@ class MeshBlockPack {
using pack_type = T;

MeshBlockPack() = default;
MeshBlockPack(const ParArray1D<T> view, const std::array<int, 5> dims)
MeshBlockPack(const Kokkos::View<T *, LayoutWrapper, DevMemSpace> view,
const std::array<int, 5> dims)
: v_(view), dims_(dims), ndim_((dims[2] > 1 ? 3 : (dims[1] > 1 ? 2 : 1))) {}

KOKKOS_FORCEINLINE_FUNCTION
Expand Down Expand Up @@ -85,7 +87,7 @@ class MeshBlockPack {
const Coordinates_t &GetCoords(const int i) const { return v_(i).GetCoords(); }

private:
ParArray1D<T> v_;
Kokkos::View<T *, LayoutWrapper, DevMemSpace> v_;
std::array<int, 5> dims_;
int ndim_;
};
Expand Down

0 comments on commit eb44166

Please sign in to comment.