diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 0abe612bc..2eed8cd83 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -6,7 +6,7 @@ jobs: edit: name: clang-format if: ${{ github.event.comment.body == 'format this please' }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: CLANG_FORMAT: clang-format steps: diff --git a/benchmark/cajita/Cajita_SparsePartitionerPerformance.cpp b/benchmark/cajita/Cajita_SparsePartitionerPerformance.cpp index 4706bdf4e..8290e2a2a 100644 --- a/benchmark/cajita/Cajita_SparsePartitionerPerformance.cpp +++ b/benchmark/cajita/Cajita_SparsePartitionerPerformance.cpp @@ -42,8 +42,7 @@ int current = 0; int uniqueNumber() { return current++; } Kokkos::View -generateRandomTileSequence( int tiles_per_dim ) -{ +generateRandomTileSequence( int tiles_per_dim ) { Kokkos::View tiles_host( "random_tile_sequence_host", tiles_per_dim * tiles_per_dim * tiles_per_dim ); diff --git a/cajita/src/Cajita_Array.hpp b/cajita/src/Cajita_Array.hpp index c6b58b173..f288e7240 100644 --- a/cajita/src/Cajita_Array.hpp +++ b/cajita/src/Cajita_Array.hpp @@ -300,8 +300,8 @@ class Array public: //! Subview type. - using subview_type = decltype( createSubview( - _data, _layout->indexSpace( Ghost(), Local() ) ) ); + using subview_type = decltype( + createSubview( _data, _layout->indexSpace( Ghost(), Local() ) ) ); //! Subview array layout type. using subview_layout = typename subview_type::array_layout; //! Subview memory traits. diff --git a/cajita/src/Cajita_GlobalGrid_impl.hpp b/cajita/src/Cajita_GlobalGrid_impl.hpp index 05e2ad1aa..dcce34da9 100644 --- a/cajita/src/Cajita_GlobalGrid_impl.hpp +++ b/cajita/src/Cajita_GlobalGrid_impl.hpp @@ -49,16 +49,14 @@ GlobalGrid::GlobalGrid( // Duplicate the communicator and store in a std::shared_ptr so that // all copies point to the same object [comm, num_space_dim_copy, ranks_per_dim_copy, periodic_dims_copy, - reorder_cart_ranks]() - { + reorder_cart_ranks]() { auto p = std::make_unique(); MPI_Cart_create( comm, num_space_dim_copy, ranks_per_dim_copy, periodic_dims_copy, reorder_cart_ranks, p.get() ); return p.release(); }(), // Custom deleter to mark the communicator for deallocation - []( MPI_Comm* p ) - { + []( MPI_Comm* p ) { MPI_Comm_free( p ); delete p; } ); diff --git a/cajita/src/Cajita_Halo.hpp b/cajita/src/Cajita_Halo.hpp index 37d9d8bd0..c84ae58fb 100644 --- a/cajita/src/Cajita_Halo.hpp +++ b/cajita/src/Cajita_Halo.hpp @@ -228,8 +228,7 @@ class Halo auto local_grid = getLocalGrid( arrays... ); // Function to get the local id of the neighbor. - auto neighbor_id = []( const std::array& ijk ) - { + auto neighbor_id = []( const std::array& ijk ) { int id = ijk[0]; for ( std::size_t d = 1; d < num_space_dim; ++d ) id += num_space_dim * id + ijk[d]; @@ -238,8 +237,7 @@ class Halo // Neighbor id flip function. This lets us compute what neighbor we // are relative to a given neighbor. - auto flip_id = [=]( const std::array& ijk ) - { + auto flip_id = [=]( const std::array& ijk ) { std::array flip_ijk; for ( std::size_t d = 0; d < num_space_dim; ++d ) flip_ijk[d] = -ijk[d]; diff --git a/cajita/src/Cajita_LocalGrid_impl.hpp b/cajita/src/Cajita_LocalGrid_impl.hpp index 698778850..9f4e88887 100644 --- a/cajita/src/Cajita_LocalGrid_impl.hpp +++ b/cajita/src/Cajita_LocalGrid_impl.hpp @@ -1040,7 +1040,7 @@ auto LocalGrid::faceSharedIndexSpace( template template std::enable_if_t<3 == NSD, IndexSpace<3>> -LocalGrid::edgeIndexSpace( Own, Edge, Local ) const + LocalGrid::edgeIndexSpace( Own, Edge, Local ) const { // Compute the lower bound. std::array min; @@ -1073,7 +1073,7 @@ LocalGrid::edgeIndexSpace( Own, Edge, Local ) const template template std::enable_if_t<3 == NSD, IndexSpace<3>> -LocalGrid::edgeIndexSpace( Ghost, Edge, Local ) const + LocalGrid::edgeIndexSpace( Ghost, Edge, Local ) const { // Compute the size. std::array size; diff --git a/cajita/unit_test/tstHalo2d.hpp b/cajita/unit_test/tstHalo2d.hpp index e30e4c2dc..9c61da04b 100644 --- a/cajita/unit_test/tstHalo2d.hpp +++ b/cajita/unit_test/tstHalo2d.hpp @@ -58,8 +58,7 @@ void checkGather( const std::array& is_dim_periodic, // This function checks if an index is in the low boundary halo in the // given dimension - auto in_boundary_min_halo = [&]( const int i, const int dim ) - { + auto in_boundary_min_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || !global_grid.onLowBoundary( dim ) ) return false; else @@ -68,8 +67,7 @@ void checkGather( const std::array& is_dim_periodic, // This function checks if an index is in the high boundary halo of in the // given dimension - auto in_boundary_max_halo = [&]( const int i, const int dim ) - { + auto in_boundary_max_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || !global_grid.onHighBoundary( dim ) ) return false; else @@ -116,8 +114,7 @@ void checkScatter( const std::array& is_dim_periodic, // This function checks if an index is in the halo of a low neighbor in // the given dimension - auto in_dim_min_halo = [&]( const int i, const int dim ) - { + auto in_dim_min_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || global_grid.dimBlockId( dim ) > 0 ) return i < ( owned_space.min( dim ) + halo_width + haloPad( typename Array::entity_type(), dim ) ); @@ -127,8 +124,7 @@ void checkScatter( const std::array& is_dim_periodic, // This function checks if an index is in the halo of a high neighbor in // the given dimension - auto in_dim_max_halo = [&]( const int i, const int dim ) - { + auto in_dim_max_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || global_grid.dimBlockId( dim ) < global_grid.dimNumBlock( dim ) - 1 ) return i >= ( owned_space.max( dim ) - halo_width ); diff --git a/cajita/unit_test/tstHalo3d.hpp b/cajita/unit_test/tstHalo3d.hpp index 2cbef69a3..6db97d21d 100644 --- a/cajita/unit_test/tstHalo3d.hpp +++ b/cajita/unit_test/tstHalo3d.hpp @@ -65,8 +65,7 @@ void checkGather( const std::array& is_dim_periodic, // This function checks if an index is in the low boundary halo in the // given dimension - auto in_boundary_min_halo = [&]( const int i, const int dim ) - { + auto in_boundary_min_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || !global_grid.onLowBoundary( dim ) ) return false; else @@ -75,8 +74,7 @@ void checkGather( const std::array& is_dim_periodic, // This function checks if an index is in the high boundary halo of in the // given dimension - auto in_boundary_max_halo = [&]( const int i, const int dim ) - { + auto in_boundary_max_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || !global_grid.onHighBoundary( dim ) ) return false; else @@ -131,8 +129,7 @@ void checkScatter( const std::array& is_dim_periodic, // This function checks if an index is in the halo of a low neighbor in // the given dimension - auto in_dim_min_halo = [&]( const int i, const int dim ) - { + auto in_dim_min_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || global_grid.dimBlockId( dim ) > 0 ) return i < ( owned_space.min( dim ) + halo_width + haloPad( typename Array::entity_type(), dim ) ); @@ -142,8 +139,7 @@ void checkScatter( const std::array& is_dim_periodic, // This function checks if an index is in the halo of a high neighbor in // the given dimension - auto in_dim_max_halo = [&]( const int i, const int dim ) - { + auto in_dim_max_halo = [&]( const int i, const int dim ) { if ( is_dim_periodic[dim] || global_grid.dimBlockId( dim ) < global_grid.dimNumBlock( dim ) - 1 ) return i >= ( owned_space.max( dim ) - halo_width ); diff --git a/cajita/unit_test/tstIndexConversion.hpp b/cajita/unit_test/tstIndexConversion.hpp index 944c0eef2..dcdae52f8 100644 --- a/cajita/unit_test/tstIndexConversion.hpp +++ b/cajita/unit_test/tstIndexConversion.hpp @@ -112,8 +112,7 @@ void testConversion3d( const std::array& is_dim_periodic ) Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), index_view ); auto l2g_view_host = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), l2g_view ); - auto check_results = [&]( const IndexSpace<3>& space ) - { + auto check_results = [&]( const IndexSpace<3>& space ) { for ( int i = space.min( Dim::I ); i < space.max( Dim::I ); ++i ) for ( int j = space.min( Dim::J ); j < space.max( Dim::J ); ++j ) for ( int k = space.min( Dim::K ); k < space.max( Dim::K ); @@ -207,8 +206,7 @@ void testConversion2d( const std::array& is_dim_periodic ) Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), index_view ); auto l2g_view_host = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), l2g_view ); - auto check_results = [&]( const IndexSpace<2>& space ) - { + auto check_results = [&]( const IndexSpace<2>& space ) { for ( int i = space.min( Dim::I ); i < space.max( Dim::I ); ++i ) for ( int j = space.min( Dim::J ); j < space.max( Dim::J ); ++j ) for ( int d = 0; d < 2; ++d ) diff --git a/cajita/unit_test/tstLocalMesh2d.hpp b/cajita/unit_test/tstLocalMesh2d.hpp index 86b6f6a48..5c7118dcd 100644 --- a/cajita/unit_test/tstLocalMesh2d.hpp +++ b/cajita/unit_test/tstLocalMesh2d.hpp @@ -362,10 +362,12 @@ void irregularTest2d( const std::array& ranks_per_dim ) double ref_cell_size = 8.0 * std::atan( 1.0 ) / ncell; std::array num_cell = { ncell, ncell }; - auto i_func = [=]( const int i ) - { return 0.5 * std::cos( i * ref_cell_size ) + low_corner[Dim::I]; }; - auto j_func = [=]( const int j ) - { return 2.0 * std::cos( j * ref_cell_size ) + low_corner[Dim::J]; }; + auto i_func = [=]( const int i ) { + return 0.5 * std::cos( i * ref_cell_size ) + low_corner[Dim::I]; + }; + auto j_func = [=]( const int j ) { + return 2.0 * std::cos( j * ref_cell_size ) + low_corner[Dim::J]; + }; std::array, 2> edges; for ( int n = 0; n < num_cell[Dim::I] + 1; ++n ) diff --git a/cajita/unit_test/tstLocalMesh3d.hpp b/cajita/unit_test/tstLocalMesh3d.hpp index 3c7347123..dd12ec662 100644 --- a/cajita/unit_test/tstLocalMesh3d.hpp +++ b/cajita/unit_test/tstLocalMesh3d.hpp @@ -583,12 +583,15 @@ void irregularTest3d( const std::array& ranks_per_dim ) double ref_cell_size = 8.0 * std::atan( 1.0 ) / ncell; std::array num_cell = { ncell, ncell, ncell }; - auto i_func = [=]( const int i ) - { return 0.5 * std::cos( i * ref_cell_size ) + low_corner[Dim::I]; }; - auto j_func = [=]( const int j ) - { return 2.0 * std::cos( j * ref_cell_size ) + low_corner[Dim::J]; }; - auto k_func = [=]( const int k ) - { return 1.5 * std::cos( k * ref_cell_size ) + low_corner[Dim::K]; }; + auto i_func = [=]( const int i ) { + return 0.5 * std::cos( i * ref_cell_size ) + low_corner[Dim::I]; + }; + auto j_func = [=]( const int j ) { + return 2.0 * std::cos( j * ref_cell_size ) + low_corner[Dim::J]; + }; + auto k_func = [=]( const int k ) { + return 1.5 * std::cos( k * ref_cell_size ) + low_corner[Dim::K]; + }; std::array, 3> edges; for ( int n = 0; n < num_cell[Dim::I] + 1; ++n ) diff --git a/cajita/unit_test/tstSparseArray.hpp b/cajita/unit_test/tstSparseArray.hpp index 6234bcd76..87a7f1823 100644 --- a/cajita/unit_test/tstSparseArray.hpp +++ b/cajita/unit_test/tstSparseArray.hpp @@ -78,25 +78,24 @@ generate_random_partition( std::array ranks_per_dim, // convert std::set to device-side view template auto set2view( const std::set>& in_set ) - -> Kokkos::View -{ - // set => view (host) - typedef typename TEST_EXECSPACE::array_layout layout; - Kokkos::View host_view( "view_host", - in_set.size() ); - int i = 0; - for ( auto it = in_set.begin(); it != in_set.end(); ++it ) - { - for ( int d = 0; d < 3; ++d ) - host_view( i, d ) = ( *it )[d]; - ++i; - } + -> Kokkos::View { + // set => view (host) + typedef typename TEST_EXECSPACE::array_layout layout; + Kokkos::View host_view( + "view_host", in_set.size() ); + int i = 0; + for ( auto it = in_set.begin(); it != in_set.end(); ++it ) + { + for ( int d = 0; d < 3; ++d ) + host_view( i, d ) = ( *it )[d]; + ++i; + } - // create tiles view on device - Kokkos::View dev_view = - Kokkos::create_mirror_view_and_copy( TEST_MEMSPACE(), host_view ); - return dev_view; -} + // create tiles view on device + Kokkos::View dev_view = + Kokkos::create_mirror_view_and_copy( TEST_MEMSPACE(), host_view ); + return dev_view; + } // return random generated particles and occupied tile numbers (last two params) template @@ -118,9 +117,9 @@ void generate_random_particles( const int particle_number, // all the activated tiles sit inside the valid partition range start[d] = global_low_corner[d] + cell_size * ( 2.01f + cell_per_tile_dim * (T)part_start[d] ); - size[d] = - cell_size * - ( cell_per_tile_dim * (T)( part_end[d] - part_start[d] ) - 4.02f ); + size[d] = cell_size * + ( cell_per_tile_dim * ( T )( part_end[d] - part_start[d] ) - + 4.02f ); } // insert random particles to the set diff --git a/cajita/unit_test/tstSparseDimPartitioner.hpp b/cajita/unit_test/tstSparseDimPartitioner.hpp index 9eb6c185b..5c7bfa138 100644 --- a/cajita/unit_test/tstSparseDimPartitioner.hpp +++ b/cajita/unit_test/tstSparseDimPartitioner.hpp @@ -163,12 +163,10 @@ void uniform_distribution_automatic_rank() EXPECT_FLOAT_EQ( imbalance_factor, gt_imbalance_factor ); } -auto generate_random_tiles( const std::array, 3>& gt_partition, - const Kokkos::Array& cart_rank, - const int size_tile_per_dim, - int occupy_tile_num_per_rank ) - -> Kokkos::View -{ +auto generate_random_tiles( + const std::array, 3>& gt_partition, + const Kokkos::Array& cart_rank, const int size_tile_per_dim, + int occupy_tile_num_per_rank ) -> Kokkos::View { // register valid tiles in each MPI rank // compute the sub-domain size (divided by the ground truth partition) const int area_size = size_tile_per_dim * size_tile_per_dim; @@ -223,8 +221,7 @@ auto generate_random_particles( const std::array, 3>& gt_partition, const Kokkos::Array& cart_rank, int occupy_par_num_per_rank, const std::array global_low_corner, double dx, - int cell_num_per_tile_dim ) -> Kokkos::View -{ + int cell_num_per_tile_dim ) -> Kokkos::View { std::set> par_set; double start[3], size[3]; diff --git a/core/src/Cabana_CommunicationPlan.hpp b/core/src/Cabana_CommunicationPlan.hpp index 380020d90..14439ae49 100644 --- a/core/src/Cabana_CommunicationPlan.hpp +++ b/core/src/Cabana_CommunicationPlan.hpp @@ -179,8 +179,7 @@ auto countSendsAndCreateSteering( const ExportRankView element_export_ranks, // reserve space in global array via a loop over neighbor counts Kokkos::parallel_for( Kokkos::TeamThreadRange( team, comm_size ), - [&]( const int i ) - { + [&]( const int i ) { // global memory atomic add, reserves space global_offset[i] = Kokkos::atomic_fetch_add( &neighbor_counts( i ), histo[i] ); @@ -295,8 +294,9 @@ auto countSendsAndCreateSteering( const ExportRankView element_export_ranks, Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, neighbor_counts_dup.extent( 0 ) ), - [&]( const index_type thread_id, int& result ) - { result += neighbor_counts_dup( thread_id, i ); }, + [&]( const index_type thread_id, int& result ) { + result += neighbor_counts_dup( thread_id, i ); + }, thread_counts ); neighbor_counts( i ) = thread_counts; } ); @@ -321,8 +321,7 @@ auto countSendsAndCreateSteering( const ExportRankView element_export_ranks, Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, neighbor_ids_dup.extent( 0 ) ), - [&]( const index_type thread_id, index_type& result ) - { + [&]( const index_type thread_id, index_type& result ) { if ( neighbor_ids_dup( thread_id, i ) > 0 ) result += thread_id; }, @@ -435,15 +434,13 @@ class CommunicationPlan _comm_ptr.reset( // Duplicate the communicator and store in a std::shared_ptr so that // all copies point to the same object - [comm]() - { + [comm]() { auto p = std::make_unique(); MPI_Comm_dup( comm, p.get() ); return p.release(); }(), // Custom deleter to mark the communicator for deallocation - []( MPI_Comm* p ) - { + []( MPI_Comm* p ) { MPI_Comm_free( p ); delete p; } ); diff --git a/core/src/Cabana_Parallel.hpp b/core/src/Cabana_Parallel.hpp index 957011e1d..8f172c1e1 100644 --- a/core/src/Cabana_Parallel.hpp +++ b/core/src/Cabana_Parallel.hpp @@ -116,8 +116,9 @@ struct ParallelFor, Functor> Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, exec_policy_.arrayBegin( s ), exec_policy_.arrayEnd( s ) ), - [&]( index_type a ) - { Impl::functorTagDispatch( functor_, s, a ); } ); + [&]( index_type a ) { + Impl::functorTagDispatch( functor_, s, a ); + } ); } }; @@ -417,8 +418,7 @@ inline void neighbor_parallel_for( Kokkos::parallel_for( Kokkos::TeamThreadRange( team, neighbor_list_traits::numNeighbor( list, i ) ), - [&]( const index_type n ) - { + [&]( const index_type n ) { Impl::functorTagDispatch( functor, i, static_cast( @@ -489,9 +489,7 @@ inline void neighbor_parallel_for( const index_type nn = neighbor_list_traits::numNeighbor( list, i ); Kokkos::parallel_for( - Kokkos::TeamThreadRange( team, nn ), - [&]( const index_type n ) - { + Kokkos::TeamThreadRange( team, nn ), [&]( const index_type n ) { const index_type j = neighbor_list_traits::getNeighbor( list, i, n ); @@ -568,16 +566,13 @@ inline void neighbor_parallel_for( const index_type nn = neighbor_list_traits::numNeighbor( list, i ); Kokkos::parallel_for( - Kokkos::TeamThreadRange( team, nn ), - [&]( const index_type n ) - { + Kokkos::TeamThreadRange( team, nn ), [&]( const index_type n ) { const index_type j = neighbor_list_traits::getNeighbor( list, i, n ); Kokkos::parallel_for( Kokkos::ThreadVectorRange( team, n + 1, nn ), - [&]( const index_type a ) - { + [&]( const index_type a ) { const index_type k = neighbor_list_traits::getNeighbor( list, i, a ); Impl::functorTagDispatch( functor, i, j, k ); @@ -820,8 +815,7 @@ inline void neighbor_parallel_reduce( Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, neighbor_list_traits::numNeighbor( list, i ) ), - [&]( const index_type n, ReduceType& nval ) - { + [&]( const index_type n, ReduceType& nval ) { Impl::functorTagDispatch( functor, i, static_cast( @@ -901,8 +895,7 @@ inline void neighbor_parallel_reduce( const index_type nn = neighbor_list_traits::numNeighbor( list, i ); Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, nn ), - [&]( const index_type n, ReduceType& nval ) - { + [&]( const index_type n, ReduceType& nval ) { const index_type j = neighbor_list_traits::getNeighbor( list, i, n ); @@ -987,16 +980,14 @@ inline void neighbor_parallel_reduce( const index_type nn = neighbor_list_traits::numNeighbor( list, i ); Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, nn ), - [&]( const index_type n, ReduceType& nval ) - { + [&]( const index_type n, ReduceType& nval ) { const index_type j = neighbor_list_traits::getNeighbor( list, i, n ); ReduceType reduce_a = 0; Kokkos::parallel_reduce( Kokkos::ThreadVectorRange( team, n + 1, nn ), - [&]( const index_type a, ReduceType& aval ) - { + [&]( const index_type a, ReduceType& aval ) { const index_type k = neighbor_list_traits::getNeighbor( list, i, a ); Impl::functorTagDispatch( functor, i, j, k, @@ -1094,8 +1085,7 @@ for_each_neighbor( const IndexType i, const TeamMemberType team, Kokkos::parallel_for( Kokkos::TeamThreadRange( team, neighbor_list_traits::numNeighbor( list, i ) ), - [&]( const IndexType n ) - { + [&]( const IndexType n ) { Impl::functorTagDispatch( neighbor_functor, i, static_cast( diff --git a/core/src/Cabana_ParticleList.hpp b/core/src/Cabana_ParticleList.hpp index e1a786a7a..9b0ab45d0 100644 --- a/core/src/Cabana_ParticleList.hpp +++ b/core/src/Cabana_ParticleList.hpp @@ -243,7 +243,7 @@ class ParticleList //! Get a slice of a given field. template slice_type::index> - slice( FieldTag ) const + slice( FieldTag ) const { return Cabana::slice::index>( _aosoa, FieldTag::label() ); diff --git a/core/src/Cabana_VerletList.hpp b/core/src/Cabana_VerletList.hpp index 3d5a218ec..710c82b77 100644 --- a/core/src/Cabana_VerletList.hpp +++ b/core/src/Cabana_VerletList.hpp @@ -314,8 +314,7 @@ struct VerletListBuilder std::size_t b_offset = bin_data_1d.binOffset( cell ); Kokkos::parallel_for( Kokkos::TeamThreadRange( team, 0, bin_data_1d.binSize( cell ) ), - [&]( const int bi ) - { + [&]( const int bi ) { // Get the true particle id. The binned particle index is the // league rank of the team. std::size_t pid = linked_cell_list.permutation( bi + b_offset ); @@ -353,8 +352,9 @@ struct VerletListBuilder stencil_count += cell_count; } } - Kokkos::single( Kokkos::PerThread( team ), [&]() - { _data.counts( pid ) = stencil_count; } ); + Kokkos::single( Kokkos::PerThread( team ), [&]() { + _data.counts( pid ) = stencil_count; + } ); } } ); } @@ -530,8 +530,7 @@ struct VerletListBuilder std::size_t b_offset = bin_data_1d.binOffset( cell ); Kokkos::parallel_for( Kokkos::TeamThreadRange( team, 0, bin_data_1d.binSize( cell ) ), - [&]( const int bi ) - { + [&]( const int bi ) { // Get the true particle id. The binned particle index is the // league rank of the team. std::size_t pid = linked_cell_list.permutation( bi + b_offset ); @@ -576,8 +575,9 @@ struct VerletListBuilder TeamVectorOpTag ) const { Kokkos::parallel_for( - Kokkos::ThreadVectorRange( team, num_n ), [&]( const int n ) - { neighbor_kernel( pid, x_p, y_p, z_p, n_offset, n ); } ); + Kokkos::ThreadVectorRange( team, num_n ), [&]( const int n ) { + neighbor_kernel( pid, x_p, y_p, z_p, n_offset, n ); + } ); } // Neighbor fill serial loop. @@ -588,9 +588,9 @@ struct VerletListBuilder const int num_n, TeamOpTag ) const { for ( int n = 0; n < num_n; n++ ) - Kokkos::single( - Kokkos::PerThread( team ), - [&]() { neighbor_kernel( pid, x_p, y_p, z_p, n_offset, n ); } ); + Kokkos::single( Kokkos::PerThread( team ), [&]() { + neighbor_kernel( pid, x_p, y_p, z_p, n_offset, n ); + } ); } // Neighbor fill kernel. diff --git a/core/unit_test/tstDeepCopy.hpp b/core/unit_test/tstDeepCopy.hpp index 2a2b6bc87..77dbcca07 100644 --- a/core/unit_test/tstDeepCopy.hpp +++ b/core/unit_test/tstDeepCopy.hpp @@ -202,8 +202,7 @@ void testMirror() using SameSpaceMirror = decltype( same_space_mirror ); using HostSpaceMirror = decltype( host_space_mirror ); auto check_mirrors = [&]( SameSpaceMirror same_space_mirror, - HostSpaceMirror host_space_mirror ) - { + HostSpaceMirror host_space_mirror ) { static_assert( std::is_same::value, diff --git a/example/cajita_tutorial/15_interpolation/interpolation_example.cpp b/example/cajita_tutorial/15_interpolation/interpolation_example.cpp index bc0015fe7..3f96abe1b 100644 --- a/example/cajita_tutorial/15_interpolation/interpolation_example.cpp +++ b/example/cajita_tutorial/15_interpolation/interpolation_example.cpp @@ -440,7 +440,7 @@ void interpolationExample() * *************************************************************************/ G2PExampleFunctor, Kokkos::View> - example_g2p { scalar_particle_field, tensor_particle_field }; + example_g2p{ scalar_particle_field, tensor_particle_field }; Cajita::g2p( *vector_grid_field, *vector_halo, particle_positions, num_particles, Cajita::Spline<1>(), example_g2p ); }