Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-26 09:34:35

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 corecel/io/OpenmpOutput.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "OutputInterface.hh"
0010 
0011 namespace celeritas
0012 {
0013 //---------------------------------------------------------------------------//
0014 /*!
0015  * Save OpenMP environment/config information to JSON.
0016  *
0017  * This saves maximum number of threads as well as binding information. Since
0018  * this should never be run inside a \c parallel block, the local \c
0019  * num_threads value is never saved.
0020  */
0021 class OpenmpOutput final : public OutputInterface
0022 {
0023   public:
0024     //! Category of data to write
0025     Category category() const final { return Category::system; };
0026 
0027     //! Key for the entry inside the category.
0028     std::string_view label() const final { return "openmp"; }
0029 
0030     // Write output to the given JSON object
0031     void output(JsonPimpl*) const final;
0032 };
0033 
0034 //---------------------------------------------------------------------------//
0035 }  // namespace celeritas