Skip to content

Commit

Permalink
subview now compiles with the DefaultExecutionSpace.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricchevalier19 committed Jun 3, 2024
1 parent fd568e2 commit be668f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
8 changes: 6 additions & 2 deletions Exercises/subview/Begin/exercise_subview_begin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ int main( int argc, char* argv[] )
// typedef Kokkos::Serial ExecSpace;
// typedef Kokkos::Threads ExecSpace;
// typedef Kokkos::OpenMP ExecSpace;
typedef Kokkos::Cuda ExecSpace;
// typedef Kokkos::Cuda ExecSpace;

typedef Kokkos::DefaultExecutionSpace ExecSpace;

// typedef Kokkos::HostSpace MemSpace;
// typedef Kokkos::OpenMP MemSpace;
typedef Kokkos::CudaSpace MemSpace;
// typedef Kokkos::CudaSpace MemSpace;
// typedef Kokkos::CudaUVMSpace MemSpace;

typedef Kokkos::DefaultExecutionSpace::memory_space MemSpace;

typedef Kokkos::LayoutLeft Layout;
// typedef Kokkos::LayoutRight Layout;

Expand Down
16 changes: 9 additions & 7 deletions Exercises/subview/Solution/exercise_subview_solution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,22 @@ int main( int argc, char* argv[] )

// typedef Kokkos::Serial ExecSpace;
// typedef Kokkos::Threads ExecSpace;
typedef Kokkos::OpenMP ExecSpace;
// typedef Kokkos::OpenMP ExecSpace;
// typedef Kokkos::Cuda ExecSpace;
// typedef Kokkos::Experimental::HIP ExecSpace;

typedef Kokkos::DefaultExecutionSpace ExecSpace;

// typedef Kokkos::HostSpace MemSpace;
typedef Kokkos::OpenMP MemSpace;
// typedef Kokkos::OpenMP MemSpace;
// typedef Kokkos::CudaSpace MemSpace;
// typedef Kokkos::CudaUVMSpace MemSpace;
// typedef Kokkos::Experimental::HIPSpace MemSpace;

// typedef Kokkos::LayoutLeft Layout;
typedef Kokkos::LayoutRight Layout;
typedef Kokkos::DefaultExecutionSpace::memory_space MemSpace;

typedef Kokkos::LayoutLeft Layout;
// typedef Kokkos::LayoutRight Layout;

typedef Kokkos::RangePolicy<ExecSpace> range_policy;
typedef Kokkos::RangePolicy<ExecSpace> range_policy;

// Allocate y, x vectors and Matrix A on device.
typedef Kokkos::View<double*, Layout, MemSpace> ViewVectorType;
Expand Down

0 comments on commit be668f9

Please sign in to comment.