Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-15 08:54:49

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/random/RngReseed.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/Assert.hh"
0010 #include "corecel/Macros.hh"
0011 #include "corecel/Types.hh"
0012 #include "corecel/random/data/RngData.hh"
0013 #include "celeritas/Types.hh"
0014 
0015 namespace celeritas
0016 {
0017 //---------------------------------------------------------------------------//
0018 // Reinitialize the RNG states on host/device at the start of an event
0019 void reseed_rng(DeviceCRef<RngParamsData> const&,
0020                 DeviceRef<RngStateData> const&,
0021                 StreamId,
0022                 UniqueEventId);
0023 
0024 void reseed_rng(HostCRef<RngParamsData> const&,
0025                 HostRef<RngStateData> const&,
0026                 StreamId,
0027                 UniqueEventId);
0028 
0029 #if !CELER_USE_DEVICE && (!defined(__DOXYGEN__) || __DOXYGEN__ > 0x010908)
0030 //---------------------------------------------------------------------------//
0031 /*!
0032  * Reinitialize the RNG states on device at the start of an event.
0033  */
0034 inline void reseed_rng(DeviceCRef<RngParamsData> const&,
0035                        DeviceRef<RngStateData> const&,
0036                        StreamId,
0037                        UniqueEventId)
0038 {
0039     CELER_ASSERT_UNREACHABLE();
0040 }
0041 #endif
0042 
0043 //---------------------------------------------------------------------------//
0044 }  // namespace celeritas