Skip to content

Commit

Permalink
Particles: More Specializations (#51)
Browse files Browse the repository at this point in the history
Add a few more template specializations as used in ImpactX and
HiPACE++ particle containers.
  • Loading branch information
ax3l authored Jul 22, 2022
1 parent 49278e6 commit 411e052
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/Particle/ArrayOfStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ void make_ArrayOfStructs(py::module &m)
}

void init_ArrayOfStructs(py::module& m) {
make_ArrayOfStructs<7,0> (m);
make_ArrayOfStructs< 0, 0> (m);
make_ArrayOfStructs< 7, 0> (m);
make_ArrayOfStructs< 1, 1> (m);
make_ArrayOfStructs< 2, 1> (m);
}
11 changes: 7 additions & 4 deletions src/Particle/Particle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,11 @@ void init_Particle(py::module& m) {
;
py::enum_<PIdx::IntValues>(pidx, "IntValues")
;
make_Particle<PIdx::nRealAttribs, PIdx::nIntAttribs> (m);
make_Particle<1, 1> (m);
make_Particle<2, 1> (m);
make_Particle<3, 2> (m);
make_Particle< PIdx::nRealAttribs, PIdx::nIntAttribs > (m);
make_Particle< 1, 1 > (m);
make_Particle< 2, 1 > (m);
make_Particle< 3, 2 > (m);
make_Particle< 4, 0 > (m); // HiPACE++ 22.07
make_Particle< 5, 0 > (m); // ImpactX 22.07
make_Particle< 37, 1> (m); // HiPACE++ 22.07
}
5 changes: 4 additions & 1 deletion src/Particle/ParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,8 @@ void init_ParticleContainer(py::module& m) {
// TODO: we might need to move all or most of the defines in here into a
// test/example submodule, so they do not collide with downstream projects
make_ParticleContainer< 1, 1, 2, 1> (m);
make_ParticleContainer<0,0,7,0> (m);
make_ParticleContainer< 0, 0, 4, 0> (m); // HiPACE++ 22.07
make_ParticleContainer< 0, 0, 5, 0> (m); // ImpactX 22.07
make_ParticleContainer< 0, 0, 7, 0> (m);
make_ParticleContainer< 0, 0, 37, 1> (m); // HiPACE++ 22.07
}
5 changes: 4 additions & 1 deletion src/Particle/ParticleTile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@ void init_ParticleTile(py::module& m) {
// TODO: we might need to move all or most of the defines in here into a
// test/example submodule, so they do not collide with downstream projects
make_ParticleTile< 1, 1, 2, 1> (m);
make_ParticleTile<0,0,7,0> (m);
make_ParticleTile< 0, 0, 4, 0> (m); // HiPACE++ 22.07
make_ParticleTile< 0, 0, 5, 0> (m); // ImpactX 22.07
make_ParticleTile< 0, 0, 7, 0> (m);
make_ParticleTile< 0, 0, 37, 1> (m); // HiPACE++ 22.07
}
7 changes: 5 additions & 2 deletions src/Particle/StructOfArrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ void make_StructOfArrays(py::module &m)


void init_StructOfArrays(py::module& m) {
make_StructOfArrays< 2, 1> (m);
make_StructOfArrays<7,0> (m);
make_StructOfArrays< 2, 1 > (m);
make_StructOfArrays< 4, 0 > (m); // HiPACE++ 22.07
make_StructOfArrays< 5, 0 > (m); // ImpactX 22.07
make_StructOfArrays< 7, 0 > (m);
make_StructOfArrays< 37, 1> (m); // HiPACE++ 22.07
}

0 comments on commit 411e052

Please sign in to comment.