Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround nvlink bug #118

Merged
merged 3 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
28 changes: 8 additions & 20 deletions src/physics/base/Secondary.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,16 @@ namespace celeritas
*/
struct Secondary
{
ParticleDefId def_id; //!< New particle type
units::MevEnergy energy; //!< New kinetic energy
Real3 direction; //!< New direction
ParticleDefId def_id{}; //!< New particle type
units::MevEnergy energy{zero_quantity()}; //!< New kinetic energy
Real3 direction; //!< New direction

// Default to invalid state
CELER_FUNCTION
Secondary() : def_id(ParticleDefId{}), energy(zero_quantity()) {}

// Whether the secondary survived cutoffs
explicit inline CELER_FUNCTION operator bool() const;
//! Whether the secondary survived cutoffs
explicit CELER_FUNCTION operator bool() const
{
return static_cast<bool>(this->def_id);
}
};

//---------------------------------------------------------------------------//
// INLINE FUNCTIONS
//---------------------------------------------------------------------------//
/*!
* Whether the Secondary succeeded.
*/
CELER_FUNCTION Secondary::operator bool() const
{
return static_cast<bool>(this->def_id);
}

//---------------------------------------------------------------------------//
} // namespace celeritas
5 changes: 3 additions & 2 deletions src/physics/em/detail/BetheHeitler.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
//---------------------------------------------------------------------------//
#include "BetheHeitler.hh"

#include "base/Assert.hh"
#include "base/KernelParamCalculator.cuda.hh"
#include "physics/base/SecondaryAllocatorView.hh"
#include "random/cuda/RngEngine.hh"
#include "physics/base/ModelInterface.hh"
#include "physics/base/ParticleTrackView.hh"
#include "physics/base/PhysicsTrackView.hh"
#include "physics/base/SecondaryAllocatorView.hh"
#include "physics/material/MaterialTrackView.hh"
#include "random/cuda/RngEngine.hh"
#include "BetheHeitlerInteractor.hh"

namespace celeritas
Expand Down
5 changes: 3 additions & 2 deletions src/physics/em/detail/KleinNishina.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
//---------------------------------------------------------------------------//
#include "KleinNishina.hh"

#include "base/Assert.hh"
#include "base/KernelParamCalculator.cuda.hh"
#include "physics/base/SecondaryAllocatorView.hh"
#include "random/cuda/RngEngine.hh"
#include "physics/base/ModelInterface.hh"
#include "physics/base/ParticleTrackView.hh"
#include "physics/base/PhysicsTrackView.hh"
#include "random/cuda/RngEngine.hh"
#include "physics/base/SecondaryAllocatorView.hh"
#include "KleinNishinaInteractor.hh"

namespace celeritas
Expand Down
4 changes: 2 additions & 2 deletions src/physics/em/detail/LivermorePE.cu
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#include "LivermorePE.hh"

#include "base/KernelParamCalculator.cuda.hh"
#include "physics/base/SecondaryAllocatorView.hh"
#include "random/cuda/RngEngine.hh"
#include "physics/base/ModelInterface.hh"
#include "physics/base/ParticleTrackView.hh"
#include "physics/base/PhysicsTrackView.hh"
#include "physics/base/SecondaryAllocatorView.hh"
#include "physics/material/ElementSelector.hh"
#include "physics/material/MaterialTrackView.hh"
#include "random/cuda/RngEngine.hh"
#include "LivermorePEInteractor.hh"
#include "LivermorePEMicroXsCalculator.hh"

Expand Down