Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:11:43

0001 //------------------------------- -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 //! \file celeritas/track/CounterAlgorithms.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/Types.hh"
0010 #include "corecel/data/Collection.hh"
0011 #include "corecel/data/ObserverPtr.hh"
0012 #include "celeritas/Types.hh"
0013 
0014 #include "CoreStateCounters.hh"
0015 
0016 namespace celeritas
0017 {
0018 //---------------------------------------------------------------------------//
0019 template<MemSpace M>
0020 using CoreStateCounterRef
0021     = Collection<CoreStateCounters, Ownership::reference, M>;
0022 
0023 //---------------------------------------------------------------------------//
0024 void initialize_counters(
0025     CoreStateCounterRef<MemSpace::host> const&, size_type, StreamId);
0026 void initialize_counters(
0027     CoreStateCounterRef<MemSpace::device> const&, size_type, StreamId);
0028 
0029 void add_pending(
0030     CoreStateCounterRef<MemSpace::host> const&, size_type, StreamId);
0031 void add_pending(
0032     CoreStateCounterRef<MemSpace::device> const&, size_type, StreamId);
0033 
0034 void add_pending(CoreStateCounterRef<MemSpace::host> const&,
0035                  ObserverPtr<size_type, MemSpace::host>,
0036                  StreamId);
0037 void add_pending(CoreStateCounterRef<MemSpace::device> const&,
0038                  ObserverPtr<size_type, MemSpace::device>,
0039                  StreamId);
0040 
0041 void add_primaries(
0042     CoreStateCounterRef<MemSpace::host> const&, size_type, StreamId);
0043 void add_primaries(
0044     CoreStateCounterRef<MemSpace::device> const&, size_type, StreamId);
0045 
0046 void update_active(
0047     CoreStateCounterRef<MemSpace::host> const&, size_type, StreamId);
0048 void update_active(
0049     CoreStateCounterRef<MemSpace::device> const&, size_type, StreamId);
0050 
0051 void update_alive(
0052     CoreStateCounterRef<MemSpace::host> const&, size_type, StreamId);
0053 void update_alive(
0054     CoreStateCounterRef<MemSpace::device> const&, size_type, StreamId);
0055 
0056 void update_secondaries(CoreStateCounterRef<MemSpace::host> const&,
0057                         ObserverPtr<size_type, MemSpace::host>,
0058                         size_type,
0059                         StreamId);
0060 void update_secondaries(CoreStateCounterRef<MemSpace::device> const&,
0061                         ObserverPtr<size_type, MemSpace::device>,
0062                         size_type,
0063                         StreamId);
0064 
0065 //---------------------------------------------------------------------------//
0066 }  // namespace celeritas