diff --git a/Intro_Tutorial/lessons/03_umpire_allocator/solution/03_umpire_allocator_solution.cpp b/Intro_Tutorial/lessons/03_umpire_allocator/03_umpire_allocator_solution.cpp similarity index 100% rename from Intro_Tutorial/lessons/03_umpire_allocator/solution/03_umpire_allocator_solution.cpp rename to Intro_Tutorial/lessons/03_umpire_allocator/03_umpire_allocator_solution.cpp diff --git a/Intro_Tutorial/lessons/03_umpire_allocator/CMakeLists.txt b/Intro_Tutorial/lessons/03_umpire_allocator/CMakeLists.txt index f4b317a..c3299ff 100644 --- a/Intro_Tutorial/lessons/03_umpire_allocator/CMakeLists.txt +++ b/Intro_Tutorial/lessons/03_umpire_allocator/CMakeLists.txt @@ -2,3 +2,8 @@ blt_add_executable( NAME 03_umpire_allocator SOURCES 03_umpire_allocator.cpp DEPENDS_ON RAJA umpire cuda) + +blt_add_executable( + NAME 03_umpire_allocator_solution + SOURCES 03_umpire_allocator_solution.cpp + DEPENDS_ON RAJA umpire cuda) diff --git a/Intro_Tutorial/lessons/04_raja_forall/solution/04_raja_forall_solution.cpp b/Intro_Tutorial/lessons/04_raja_forall/04_raja_forall_solution.cpp similarity index 100% rename from Intro_Tutorial/lessons/04_raja_forall/solution/04_raja_forall_solution.cpp rename to Intro_Tutorial/lessons/04_raja_forall/04_raja_forall_solution.cpp diff --git a/Intro_Tutorial/lessons/04_raja_forall/CMakeLists.txt b/Intro_Tutorial/lessons/04_raja_forall/CMakeLists.txt index c5fbe91..3f17e33 100644 --- a/Intro_Tutorial/lessons/04_raja_forall/CMakeLists.txt +++ b/Intro_Tutorial/lessons/04_raja_forall/CMakeLists.txt @@ -1,4 +1,9 @@ blt_add_executable( NAME 04_raja_forall SOURCES 04_raja_forall.cpp - DEPENDS_ON RAJA umpire cuda) + DEPENDS_ON RAJA umpire) + +blt_add_executable( + NAME 04_raja_forall_solution + SOURCES 04_raja_forall_solution.cpp + DEPENDS_ON RAJA umpire) diff --git a/Intro_Tutorial/lessons/05_raja_reduce/solution/05_raja_reduce_solution.cpp b/Intro_Tutorial/lessons/05_raja_reduce/05_raja_reduce_solution.cpp similarity index 98% rename from Intro_Tutorial/lessons/05_raja_reduce/solution/05_raja_reduce_solution.cpp rename to Intro_Tutorial/lessons/05_raja_reduce/05_raja_reduce_solution.cpp index e1a28c8..af34ba3 100644 --- a/Intro_Tutorial/lessons/05_raja_reduce/solution/05_raja_reduce_solution.cpp +++ b/Intro_Tutorial/lessons/05_raja_reduce/05_raja_reduce_solution.cpp @@ -5,7 +5,7 @@ #include "RAJA/RAJA.hpp" //TODO: uncomment this out in order to build! -//#define COMPILE +#define COMPILE int main() { diff --git a/Intro_Tutorial/lessons/05_raja_reduce/CMakeLists.txt b/Intro_Tutorial/lessons/05_raja_reduce/CMakeLists.txt index a6e6260..1c002ed 100644 --- a/Intro_Tutorial/lessons/05_raja_reduce/CMakeLists.txt +++ b/Intro_Tutorial/lessons/05_raja_reduce/CMakeLists.txt @@ -2,3 +2,8 @@ blt_add_executable( NAME 05_raja_reduce SOURCES 05_raja_reduce.cpp DEPENDS_ON RAJA umpire) + +blt_add_executable( + NAME 05_raja_reduce_solution + SOURCES 05_raja_reduce_solution.cpp + DEPENDS_ON RAJA umpire) diff --git a/Intro_Tutorial/lessons/06_raja_umpire_host_device/solution/06_raja_umpire_host_device_solution.cpp b/Intro_Tutorial/lessons/06_raja_umpire_host_device/06_raja_umpire_host_device_solution.cpp similarity index 95% rename from Intro_Tutorial/lessons/06_raja_umpire_host_device/solution/06_raja_umpire_host_device_solution.cpp rename to Intro_Tutorial/lessons/06_raja_umpire_host_device/06_raja_umpire_host_device_solution.cpp index a8a6c6f..686ef91 100644 --- a/Intro_Tutorial/lessons/06_raja_umpire_host_device/solution/06_raja_umpire_host_device_solution.cpp +++ b/Intro_Tutorial/lessons/06_raja_umpire_host_device/06_raja_umpire_host_device_solution.cpp @@ -3,8 +3,13 @@ #include "RAJA/RAJA.hpp" #include "umpire/Umpire.hpp" +//TODO: uncomment this out in order to build! +#define COMPILE + int main() { +#if defined(COMPILE) + constexpr int N{10000}; //TODO: Set up a block size value constexpr std::size_t CUDA_BLOCK_SIZE{256}; @@ -55,5 +60,6 @@ int main() host_allocator.deallocate(a_h); host_allocator.deallocate(b_h); +#endif return 0; } diff --git a/Intro_Tutorial/lessons/06_raja_umpire_host_device/CMakeLists.txt b/Intro_Tutorial/lessons/06_raja_umpire_host_device/CMakeLists.txt index d59fdb6..cc554f4 100644 --- a/Intro_Tutorial/lessons/06_raja_umpire_host_device/CMakeLists.txt +++ b/Intro_Tutorial/lessons/06_raja_umpire_host_device/CMakeLists.txt @@ -3,4 +3,9 @@ if (ENABLE_CUDA) NAME 06_raja_umpire_host_device SOURCES 06_raja_umpire_host_device.cpp DEPENDS_ON RAJA umpire cuda) + + blt_add_executable( + NAME 06_raja_umpire_host_device_solution + SOURCES 06_raja_umpire_host_device_solution.cpp + DEPENDS_ON RAJA umpire cuda) endif() diff --git a/Intro_Tutorial/lessons/07_raja_algs/solution/07_raja_atomic_solution.cpp b/Intro_Tutorial/lessons/07_raja_algs/07_raja_atomic_solution.cpp similarity index 99% rename from Intro_Tutorial/lessons/07_raja_algs/solution/07_raja_atomic_solution.cpp rename to Intro_Tutorial/lessons/07_raja_algs/07_raja_atomic_solution.cpp index b772e87..8d3fb19 100644 --- a/Intro_Tutorial/lessons/07_raja_algs/solution/07_raja_atomic_solution.cpp +++ b/Intro_Tutorial/lessons/07_raja_algs/07_raja_atomic_solution.cpp @@ -7,7 +7,7 @@ #include "umpire/Umpire.hpp" //TODO: uncomment this out in order to build! -//#define COMPILE +#define COMPILE int main() { diff --git a/Intro_Tutorial/lessons/07_raja_algs/solution/07_raja_scan_solution.cpp b/Intro_Tutorial/lessons/07_raja_algs/07_raja_scan_solution.cpp similarity index 99% rename from Intro_Tutorial/lessons/07_raja_algs/solution/07_raja_scan_solution.cpp rename to Intro_Tutorial/lessons/07_raja_algs/07_raja_scan_solution.cpp index 14fc06a..8ea7cc8 100644 --- a/Intro_Tutorial/lessons/07_raja_algs/solution/07_raja_scan_solution.cpp +++ b/Intro_Tutorial/lessons/07_raja_algs/07_raja_scan_solution.cpp @@ -7,7 +7,7 @@ #include "umpire/Umpire.hpp" //TODO: uncomment this out in order to build! -//#define COMPILE +#define COMPILE int main() { diff --git a/Intro_Tutorial/lessons/07_raja_algs/CMakeLists.txt b/Intro_Tutorial/lessons/07_raja_algs/CMakeLists.txt index b1d6feb..7856503 100644 --- a/Intro_Tutorial/lessons/07_raja_algs/CMakeLists.txt +++ b/Intro_Tutorial/lessons/07_raja_algs/CMakeLists.txt @@ -1,9 +1,21 @@ +if (ENABLE_CUDA) blt_add_executable( NAME 07_raja_atomic SOURCES 07_raja_atomic.cpp DEPENDS_ON RAJA umpire cuda) +blt_add_executable( + NAME 07_raja_atomic_solution + SOURCES 07_raja_atomic_solution.cpp + DEPENDS_ON RAJA umpire cuda) + blt_add_executable( NAME 07_raja_scan SOURCES 07_raja_scan.cpp DEPENDS_ON RAJA umpire cuda) + +blt_add_executable( + NAME 07_raja_scan_solution + SOURCES 07_raja_scan_solution.cpp + DEPENDS_ON RAJA umpire cuda) +endif() diff --git a/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/solution/08_raja_umpire_quick_pool_solution.cpp b/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/08_raja_umpire_quick_pool_solution.cpp similarity index 95% rename from Intro_Tutorial/lessons/08_raja_umpire_quick_pool/solution/08_raja_umpire_quick_pool_solution.cpp rename to Intro_Tutorial/lessons/08_raja_umpire_quick_pool/08_raja_umpire_quick_pool_solution.cpp index 1040690..e91bc96 100644 --- a/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/solution/08_raja_umpire_quick_pool_solution.cpp +++ b/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/08_raja_umpire_quick_pool_solution.cpp @@ -6,8 +6,13 @@ // use it in the code below #include "umpire/strategy/QuickPool.hpp" +//Uncomment to compile +//#define COMPILE + int main() { +#if defined(COMPILE) + constexpr int N{10000}; constexpr std::size_t CUDA_BLOCK_SIZE{256}; double* a{nullptr}; @@ -54,5 +59,7 @@ int main() host_allocator.deallocate(a_h); host_allocator.deallocate(b_h); +#endif + return 0; } diff --git a/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/CMakeLists.txt b/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/CMakeLists.txt index 83a0ca2..a557ff3 100644 --- a/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/CMakeLists.txt +++ b/Intro_Tutorial/lessons/08_raja_umpire_quick_pool/CMakeLists.txt @@ -3,4 +3,9 @@ if (ENABLE_CUDA) NAME 08_raja_umpire_quick_pool SOURCES 08_raja_umpire_quick_pool.cpp DEPENDS_ON RAJA umpire cuda) + + blt_add_executable( + NAME 08_raja_umpire_quick_pool_solution + SOURCES 08_raja_umpire_quick_pool_solution.cpp + DEPENDS_ON RAJA umpire cuda) endif() diff --git a/Intro_Tutorial/lessons/09_raja_view/09_raja_view.cpp b/Intro_Tutorial/lessons/09_raja_view/09_raja_view.cpp index f87f99c..a7c7360 100644 --- a/Intro_Tutorial/lessons/09_raja_view/09_raja_view.cpp +++ b/Intro_Tutorial/lessons/09_raja_view/09_raja_view.cpp @@ -42,7 +42,7 @@ int main() // TODO: Create a standard MxN RAJA::View called "A", initialized with the // "a" array. - RAJA::View> A(???, ???, ???); + RAJA::View> A( ???, ???, ??? ); // A left-oriented layout view initialized with the "result_left" array auto L = RAJA::make_permuted_view(result_left, M, N); diff --git a/Intro_Tutorial/lessons/09_raja_view/09_raja_view_solution.cpp b/Intro_Tutorial/lessons/09_raja_view/09_raja_view_solution.cpp index f2ef4a3..9007e3a 100644 --- a/Intro_Tutorial/lessons/09_raja_view/09_raja_view_solution.cpp +++ b/Intro_Tutorial/lessons/09_raja_view/09_raja_view_solution.cpp @@ -4,6 +4,7 @@ #include "umpire/Umpire.hpp" #include "umpire/strategy/QuickPool.hpp" +// TODO: Uncomment this in order to build! #define COMPILE // Method to print arrays associated with the Views in the lesson diff --git a/Profile_Demo/CMakeLists.txt b/Profile_Demo/CMakeLists.txt index 84739cd..fb1421f 100644 --- a/Profile_Demo/CMakeLists.txt +++ b/Profile_Demo/CMakeLists.txt @@ -1,6 +1,8 @@ -if (ENABLE_CUDA) - blt_add_executable( - NAME profile_raja - SOURCES profile_raja.cpp - DEPENDS_ON RAJA umpire cuda) +if (ENABLE_CUDA) + if (RAJA_ENABLE_CALIPER) + blt_add_executable( + NAME profile_raja + SOURCES profile_raja.cpp + DEPENDS_ON RAJA umpire cuda) + endif() endif()