Skip to content

Commit

Permalink
first clean up pass
Browse files Browse the repository at this point in the history
  • Loading branch information
artv3 committed Aug 12, 2024
1 parent d4c1e89 commit 3625b72
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 16 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions Intro_Tutorial/lessons/01_blt_cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
blt_add_executable(
NAME one
SOURCES one.cpp)
NAME 01_blt_cmake
SOURCES 01_blt_cmake.cpp)
4 changes: 2 additions & 2 deletions Intro_Tutorial/lessons/04_raja_forall/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blt_add_executable(
NAME four
SOURCES four.cpp
NAME 04_raja_forall
SOURCES 04_raja_forall.cpp
DEPENDS_ON RAJA umpire cuda)
4 changes: 2 additions & 2 deletions Intro_Tutorial/lessons/05_raja_reduce/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blt_add_executable(
NAME five
SOURCES five.cpp
NAME 05_raja_reduce
SOURCES 05_raja_reduce.cpp
DEPENDS_ON RAJA umpire)
4 changes: 2 additions & 2 deletions Intro_Tutorial/lessons/06_raja_umpire_uvm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (ENABLE_CUDA)
blt_add_executable(
NAME six
SOURCES six.cpp
NAME 06_raja_umpire_uvm
SOURCES 06_raja_umpire_uvm.cpp
DEPENDS_ON RAJA umpire cuda)
endif()

11 changes: 3 additions & 8 deletions Intro_Tutorial/lessons/08_raja_umpire_quick_pool/eight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

#include "RAJA/RAJA.hpp"
#include "umpire/Umpire.hpp"

//Uncomment to compile
//#define COMPILE
#include "umpire/strategy/QuickPool.hpp"

int main()
{
#if defined(COMPILE)

constexpr int N{1000};
constexpr int N{10000};
constexpr std::size_t CUDA_BLOCK_SIZE{256};
double* a{nullptr};
double* b{nullptr};
Expand All @@ -23,6 +19,7 @@ int main()
auto host_allocator = rm.getAllocator("HOST");

// TODO: create an allocator called "pool" using the QuickPool strategy
auto pool = rm.makeAllocator<umpire::strategy::QuickPool>("POOL", allocator);

a = static_cast<double *>(pool.allocate(N*sizeof(double)));
b = static_cast<double *>(pool.allocate(N*sizeof(double)));
Expand Down Expand Up @@ -55,7 +52,5 @@ int main()
host_allocator.deallocate(a_h);
host_allocator.deallocate(b_h);

#endif

return 0;
}

0 comments on commit 3625b72

Please sign in to comment.