Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions particle_structs/test/initParticles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ int main(int argc, char* argv[]) {
int* ptcls_per_elem = new int[ne];
std::vector<int>* ids = new std::vector<int>[ne];
distribute_particles(ne, np, 0, ptcls_per_elem, ids);

Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(4, 4);
{
Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(4, 4);
SCS::kkLidView ptcls_per_elem_v("ptcls_per_elem_v", ne);
SCS::kkGidView element_gids_v("", 0);
SCS::kkLidView particle_element("particle_element", np);
Expand Down
2 changes: 1 addition & 1 deletion particle_structs/test/lambdaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ int main(int argc, char* argv[]) {
int* ptcls_per_elem = new int[ne];
std::vector<int>* ids = new std::vector<int>[ne];
distribute_particles(ne, np, 0, ptcls_per_elem, ids);
Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(4, 32);
{
Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(4, 32);
SCS::kkLidView ptcls_per_elem_v("ptcls_per_elem_v", ne);
SCS::kkGidView element_gids_v("", 0);
particle_structs::hostToDevice(ptcls_per_elem_v, ptcls_per_elem);
Expand Down
3 changes: 1 addition & 2 deletions particle_structs/test/scs_padding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ int main(int argc, char* argv[]) {
std::vector<int>* ids = new std::vector<int>[ne];
distribute_particles(ne, np, 2, ptcls_per_elem, ids);
int C = 4;
Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(128, C);

{
Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(128, C);
SCS::kkLidView ptcls_per_elem_v("ptcls_per_elem_v", ne);
SCS::kkGidView element_gids_v("", 0);
particle_structs::hostToDevice(ptcls_per_elem_v, ptcls_per_elem);
Expand Down
40 changes: 20 additions & 20 deletions particle_structs/test/typeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ using particle_structs::MemberTypes;
int main(int argc, char** argv) {
MPI_Init(&argc, &argv);
Kokkos::initialize(argc,argv);
typedef MemberTypes<int> Type1;
typedef MemberTypes<int,double[2]> Type2;
typedef MemberTypes<int[3],double[2],char> Type3;
{
typedef MemberTypes<int> Type1;
typedef MemberTypes<int,double[2]> Type2;
typedef MemberTypes<int[3],double[2],char> Type3;

printf("Type1: %lu\n",Type1::memsize);
PS_ALWAYS_ASSERT(Type1::memsize == sizeof(int));
printf("Type2: %lu\n",Type2::memsize);
PS_ALWAYS_ASSERT(Type2::memsize == sizeof(int) + 2*sizeof(double));
printf("Type3: %lu\n",Type3::memsize);
PS_ALWAYS_ASSERT(Type3::memsize == 3*sizeof(int) + 2*sizeof(double) + sizeof(char));
printf("Type3 start of doubles: %lu\n",Type3::sizeToIndex<1>());
PS_ALWAYS_ASSERT(Type3::sizeToIndex<1>() == 3*sizeof(int));
printf("Type1: %lu\n",Type1::memsize);
PS_ALWAYS_ASSERT(Type1::memsize == sizeof(int));
printf("Type2: %lu\n",Type2::memsize);
PS_ALWAYS_ASSERT(Type2::memsize == sizeof(int) + 2*sizeof(double));
printf("Type3: %lu\n",Type3::memsize);
PS_ALWAYS_ASSERT(Type3::memsize == 3*sizeof(int) + 2*sizeof(double) + sizeof(char));
printf("Type3 start of doubles: %lu\n",Type3::sizeToIndex<1>());
PS_ALWAYS_ASSERT(Type3::sizeToIndex<1>() == 3*sizeof(int));

int ne = 5;
int np = 10;
int* ptcls_per_elem = new int[ne];
std::vector<int>* ids = new std::vector<int>[ne];
distribute_particles(ne,np, 0, ptcls_per_elem, ids);
typedef Kokkos::DefaultExecutionSpace exe_space;
Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(128, 4);
typedef SellCSigma<Type2> SCS;
{
int ne = 5;
int np = 10;
int* ptcls_per_elem = new int[ne];
std::vector<int>* ids = new std::vector<int>[ne];
distribute_particles(ne,np, 0, ptcls_per_elem, ids);
typedef Kokkos::DefaultExecutionSpace exe_space;
Kokkos::TeamPolicy<exe_space> po = pumipic::TeamPolicyAuto(128, 4);
typedef SellCSigma<Type2> SCS;
SCS::kkLidView ptcls_per_elem_v("ptcls_per_elem_v", ne);
SCS::kkGidView element_gids_v("", 0);
particle_structs::hostToDevice(ptcls_per_elem_v, ptcls_per_elem);
Expand Down