diff --git a/core/src/Cabana_ExecutionPolicy.hpp b/core/src/Cabana_ExecutionPolicy.hpp index c50e48ccc..30bf9a679 100644 --- a/core/src/Cabana_ExecutionPolicy.hpp +++ b/core/src/Cabana_ExecutionPolicy.hpp @@ -16,6 +16,8 @@ namespace Cabana { +namespace Experimental +{ //---------------------------------------------------------------------------// /*! \class RangePolicy @@ -57,6 +59,7 @@ class RangePolicy //---------------------------------------------------------------------------// +} // end namespace Experimental } // end namespace Cabana #endif // end CABANA_EXECUTIONPOLICY_HPP diff --git a/core/src/Cabana_NeighborList.hpp b/core/src/Cabana_NeighborList.hpp index d5712a106..cc495474a 100644 --- a/core/src/Cabana_NeighborList.hpp +++ b/core/src/Cabana_NeighborList.hpp @@ -71,6 +71,8 @@ class NeighborList const int neighbor_index ); }; +namespace Experimental +{ //---------------------------------------------------------------------------// // Neighbor Parallel For //---------------------------------------------------------------------------// @@ -244,6 +246,8 @@ inline void neighbor_parallel_for( const ExecutionPolicy& exec_policy, //---------------------------------------------------------------------------// +} // end namespace Experimental + } // end namespace Cabana #endif // end CABANA_NEIGHBORLIST_HPP diff --git a/core/src/Cabana_Parallel.hpp b/core/src/Cabana_Parallel.hpp index acfd02ac9..c4c4b9fb6 100644 --- a/core/src/Cabana_Parallel.hpp +++ b/core/src/Cabana_Parallel.hpp @@ -95,6 +95,8 @@ getArrayBounds( const int begin, } // end namespace impl +namespace Experimental +{ //---------------------------------------------------------------------------// // Algorithm tags. @@ -378,6 +380,7 @@ inline void parallel_for( const ExecutionPolicy& exec_policy, //---------------------------------------------------------------------------// +} // end namespace Experimental } // end namespace Cabana #endif // end CABANA_PARALLEL_HPP diff --git a/core/src/impl/Cabana_PerformanceTraits.hpp b/core/src/impl/Cabana_PerformanceTraits.hpp index 98f98f113..ad8a9dfb2 100644 --- a/core/src/impl/Cabana_PerformanceTraits.hpp +++ b/core/src/impl/Cabana_PerformanceTraits.hpp @@ -37,7 +37,7 @@ class PerformanceTraits { public: static constexpr int vector_length = 16; - using parallel_for_tag = StructParallelTag; + using parallel_for_tag = Experimental::StructParallelTag; }; #endif @@ -49,7 +49,7 @@ class PerformanceTraits { public: static constexpr int vector_length = 16; - using parallel_for_tag = StructParallelTag; + using parallel_for_tag = Experimental::StructParallelTag; }; #endif @@ -61,7 +61,7 @@ class PerformanceTraits { public: static constexpr int vector_length = 16; - using parallel_for_tag = StructParallelTag; + using parallel_for_tag = Experimental::StructParallelTag; }; #endif @@ -73,7 +73,7 @@ class PerformanceTraits { public: static constexpr int vector_length = Kokkos::Impl::CudaTraits::WarpSize; - using parallel_for_tag = IndexParallelTag; + using parallel_for_tag = Experimental::IndexParallelTag; }; #endif diff --git a/core/unit_test/tstNeighborList.hpp b/core/unit_test/tstNeighborList.hpp index 088f655b2..03237d0ec 100644 --- a/core/unit_test/tstNeighborList.hpp +++ b/core/unit_test/tstNeighborList.hpp @@ -383,11 +383,11 @@ void testNeighborParallelFor() { Kokkos::atomic_add( &serial_result(i), n ); }; auto team_count_op = KOKKOS_LAMBDA( const int i, const int n ) { Kokkos::atomic_add( &team_result(i), n ); }; - Cabana::RangePolicy policy( aosoa ); - Cabana::neighbor_parallel_for( - policy, serial_count_op, nlist, Cabana::SerialNeighborOpTag() ); - Cabana::neighbor_parallel_for( - policy, team_count_op, nlist, Cabana::TeamNeighborOpTag() ); + Cabana::Experimental::RangePolicy policy( aosoa ); + Cabana::Experimental::neighbor_parallel_for( + policy, serial_count_op, nlist, Cabana::Experimental::SerialNeighborOpTag() ); + Cabana::Experimental::neighbor_parallel_for( + policy, team_count_op, nlist, Cabana::Experimental::TeamNeighborOpTag() ); // Get the expected result in serial for ( int p = 0; p < num_particle; ++p ) diff --git a/core/unit_test/tstParallel.hpp b/core/unit_test/tstParallel.hpp index e8cb4f90c..0b359978d 100644 --- a/core/unit_test/tstParallel.hpp +++ b/core/unit_test/tstParallel.hpp @@ -143,7 +143,7 @@ void runTest() AoSoA_t aosoa( num_data ); // Create an execution policy using the begin and end of the AoSoA. - Cabana::RangePolicy + Cabana::Experimental::RangePolicy range_policy( 0, aosoa.size() ); // Create a functor to operate on. @@ -158,7 +158,8 @@ void runTest() OpType func_1( aosoa, fval, dval, ival ); // Loop in parallel using 1D struct parallelism. - Cabana::parallel_for( range_policy, func_1, Cabana::StructParallelTag() ); + Cabana::Experimental::parallel_for( + range_policy, func_1, Cabana::Experimental::StructParallelTag() ); // Check data members for proper initialization. checkDataMembers( aosoa, fval, dval, ival, dim_1, dim_2, dim_3 ); @@ -170,7 +171,8 @@ void runTest() OpType func_2( aosoa, fval, dval, ival ); // Loop in parallel using 1D array parallelism. - Cabana::parallel_for( range_policy, func_2, Cabana::ArrayParallelTag() ); + Cabana::Experimental::parallel_for( + range_policy, func_2, Cabana::Experimental::ArrayParallelTag() ); // Check data members for proper initialization. checkDataMembers( aosoa, fval, dval, ival, dim_1, dim_2, dim_3 ); @@ -182,8 +184,8 @@ void runTest() OpType func_3( aosoa, fval, dval, ival ); // Loop in parallel using 2D struct and array parallelism. - Cabana::parallel_for( - range_policy, func_3, Cabana::StructAndArrayParallelTag() ); + Cabana::Experimental::parallel_for( + range_policy, func_3, Cabana::Experimental::StructAndArrayParallelTag() ); // Check data members for proper initialization. checkDataMembers( aosoa, fval, dval, ival, dim_1, dim_2, dim_3 ); @@ -191,8 +193,9 @@ void runTest() // Do one more loop but this time auto-dispatch. Reuse the first functor // but this time create an execution policy that automatically grabs begin // and end from the aosoa. - Cabana::RangePolicy aosoa_policy( aosoa ); - Cabana::parallel_for( aosoa_policy, func_1 ); + Cabana::Experimental::RangePolicy + aosoa_policy( aosoa ); + Cabana::Experimental::parallel_for( aosoa_policy, func_1 ); // Check data members for proper initialization. fval = 3.4;