Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:31

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2023-2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file celeritas/track/CoreStateCounters.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include "corecel/Types.hh"
0011 
0012 namespace celeritas
0013 {
0014 //---------------------------------------------------------------------------//
0015 /*!
0016  * Counters for within-step track initialization and activity.
0017  *
0018  * These counters are updated *by value on the host at every step* so they
0019  * should not be stored in TrackInitStateData because then the device-memory
0020  * copy will not be synchronized.
0021  *
0022  * \todo Drop the 'num' prefix since we know they're counters.
0023  */
0024 struct CoreStateCounters
0025 {
0026     //!@{
0027     //! \name Set after primaries are generated
0028     size_type num_generated{0};  //!< Number of track initializers created
0029     //!@}
0030     //
0031     //!@{
0032     //! \name Updated during generation and initialization
0033     size_type num_initializers{0};  //!< Number of track initializers
0034     size_type num_vacancies{0};  //!< Number of empty track slots
0035     //!@}
0036 
0037     //!@{
0038     //! \name Set after tracks are initialized
0039     size_type num_active{0};  //!< Number of active tracks at start
0040     //!@}
0041 
0042     //!@{
0043     //! \name Set after secondaries are generated
0044     size_type num_secondaries{0};  //!< Number of secondaries produced
0045     size_type num_alive{0};  //!< Number of alive tracks at end
0046     //!@}
0047 };
0048 
0049 //---------------------------------------------------------------------------//
0050 }  // namespace celeritas