Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
lebuller committed Nov 30, 2023
1 parent 6ec0cd2 commit ab8e9e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
10 changes: 4 additions & 6 deletions core/unit_test/neighbor_unit_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ struct NeighborListTestData
}
};


//---------------------------------------------------------------------------//
// Default test settings.
struct NeighborListTestDataOrdered
Expand All @@ -1021,9 +1020,9 @@ struct NeighborListTestDataOrdered
AoSoA_t aosoa;

TestNeighborList<typename TEST_EXECSPACE::array_layout, Kokkos::HostSpace>
N2_list_copy;
N2_list_copy;

NeighborListTestDataOrdered( const int particle_x)
NeighborListTestDataOrdered( const int particle_x )
{
int num_particle = particle_x * particle_x * particle_x;

Expand All @@ -1039,7 +1038,8 @@ struct NeighborListTestDataOrdered
#endif

Cabana::createParticles( Cabana::InitRandom(), positions,
positions.size(), grid_min, grid_max, 0, 1000000 );
positions.size(), grid_min, grid_max, 0,
1000000 );

#ifdef KOKKOS_ENABLE_OPENMPTARGET // FIXME_OPENMPTARGET
Cabana::deep_copy( aosoa, aosoa_copy );
Expand All @@ -1049,8 +1049,6 @@ struct NeighborListTestDataOrdered
auto N2_list = computeFullNeighborList( positions, test_radius );
N2_list_copy = createTestListHostCopy( N2_list );
}


};

//---------------------------------------------------------------------------//
Expand Down
13 changes: 8 additions & 5 deletions core/unit_test/tstNeighborList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ void testNeighborHistogram()
// Create the neighbor histogram
{
int num_bin = 10;
auto nhist = neighborHistogram( TEST_EXECSPACE{}, position.size(), nlist, num_bin );
auto host_histogram = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), nhist );
auto nhist = neighborHistogram( TEST_EXECSPACE{}, position.size(),
nlist, num_bin );
auto host_histogram =
Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), nhist );

double bin_id[10] = { 3, 6, 9, 12, 15, 18, 21, 24, 27, 30 };
double bin_count[10] = { 7, 4, 87, 6, 153, 219, 12, 1, 281, 222 };
Expand All @@ -370,12 +372,13 @@ void testNeighborHistogram()
}
}


// Create the neighbor histogram
{
int num_bin = 5;
auto nhist = neighborHistogram( TEST_EXECSPACE{}, position.size(), nlist, num_bin );
auto host_histogram = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), nhist );
auto nhist = neighborHistogram( TEST_EXECSPACE{}, position.size(),
nlist, num_bin );
auto host_histogram =
Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), nhist );

double bin_id[5] = { 6, 12, 18, 24, 30 };
double bin_count[5] = { 11, 93, 372, 13, 503 };
Expand Down

0 comments on commit ab8e9e5

Please sign in to comment.